16.12.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit 4768160f authored by Christian Schulte zu Berge's avatar Christian Schulte zu Berge
Browse files

Moved the lua variable inspector tree widget into a separate dock on the right...

Moved the lua variable inspector tree widget into a separate dock on the right hand side in MainWindow.

refs #643
parent f98600be
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
// ================================================================================================ // ================================================================================================
#include "completinglualineedit.h" #include "completinglualineedit.h"
#include "application/gui/scriptingwidget.h" #include "application/gui/luatablewidget.h"
#include <QAbstractItemModel> #include <QAbstractItemModel>
#include <QAbstractItemView> #include <QAbstractItemView>
......
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
#include "scripting/glue/globalluatable.h" #include "scripting/glue/globalluatable.h"
#include "scripting/luagen/properties/propertycollectionluascriptgenerator.h" #include "scripting/luagen/properties/propertycollectionluascriptgenerator.h"
#include "scripting/luagen/properties/abstractpropertylua.h" #include "scripting/luagen/properties/abstractpropertylua.h"
#include "application/gui/luatablewidget.h"
#endif #endif
namespace campvis { namespace campvis {
...@@ -70,6 +71,7 @@ namespace campvis { ...@@ -70,6 +71,7 @@ namespace campvis {
, _selectedDataContainer(0) , _selectedDataContainer(0)
, _logViewer(0) , _logViewer(0)
, _scriptingConsoleWidget(nullptr) , _scriptingConsoleWidget(nullptr)
, _luaTreeWidget(nullptr)
, _workflowWidget(nullptr) , _workflowWidget(nullptr)
{ {
cgtAssert(_application != 0, "Application must not be 0."); cgtAssert(_application != 0, "Application must not be 0.");
...@@ -88,7 +90,11 @@ namespace campvis { ...@@ -88,7 +90,11 @@ namespace campvis {
setCorner(Qt::BottomLeftCorner, Qt::LeftDockWidgetArea); setCorner(Qt::BottomLeftCorner, Qt::LeftDockWidgetArea);
setCorner(Qt::TopLeftCorner, Qt::LeftDockWidgetArea); setCorner(Qt::TopLeftCorner, Qt::LeftDockWidgetArea);
#ifdef CAMPVIS_HAS_SCRIPTING
setCorner(Qt::BottomRightCorner, Qt::BottomDockWidgetArea);
#else
setCorner(Qt::BottomRightCorner, Qt::RightDockWidgetArea); setCorner(Qt::BottomRightCorner, Qt::RightDockWidgetArea);
#endif
setCorner(Qt::TopRightCorner, Qt::RightDockWidgetArea); setCorner(Qt::TopRightCorner, Qt::RightDockWidgetArea);
setTabPosition(Qt::TopDockWidgetArea, QTabWidget::North); setTabPosition(Qt::TopDockWidgetArea, QTabWidget::North);
...@@ -171,8 +177,13 @@ namespace campvis { ...@@ -171,8 +177,13 @@ namespace campvis {
_scriptingConsoleWidget = new ScriptingWidget(this); _scriptingConsoleWidget = new ScriptingWidget(this);
ui.scriptingConsoleDock->setWidget(_scriptingConsoleWidget); ui.scriptingConsoleDock->setWidget(_scriptingConsoleWidget);
connect(_scriptingConsoleWidget, SIGNAL(s_commandExecuted(const QString&)), this, SLOT(onLuaCommandExecuted(const QString&))); connect(_scriptingConsoleWidget, SIGNAL(s_commandExecuted(const QString&)), this, SLOT(onLuaCommandExecuted(const QString&)));
_luaTreeWidget = new LuaTableTreeWidget(this);
ui.scriptingInspectorDock->setWidget(_luaTreeWidget);
#else #else
ui.scriptingConsoleDock->setVisible(false); ui.scriptingConsoleDock->setVisible(false);
ui.scriptingInspectorDock->setVisible(false);
#endif #endif
_workflowWidget = new WorkflowControllerWidget(_application, this); _workflowWidget = new WorkflowControllerWidget(_application, this);
...@@ -451,7 +462,7 @@ namespace campvis { ...@@ -451,7 +462,7 @@ namespace campvis {
_application->getLuaVmState()->getGlobalTable()->updateValueMap(); _application->getLuaVmState()->getGlobalTable()->updateValueMap();
_scriptingConsoleWidget->_editCommand->setCompleter(new LuaCompleter(_application->getLuaVmState(), _scriptingConsoleWidget->_editCommand)); _scriptingConsoleWidget->_editCommand->setCompleter(new LuaCompleter(_application->getLuaVmState(), _scriptingConsoleWidget->_editCommand));
_scriptingConsoleWidget->_luaTreeWidget->update(_application->getLuaVmState(), LuaTreeItem::FULL_MODEL); _luaTreeWidget->update(_application->getLuaVmState(), LuaTreeItem::FULL_MODEL);
} }
#endif #endif
} }
......
...@@ -48,6 +48,7 @@ namespace campvis { ...@@ -48,6 +48,7 @@ namespace campvis {
class DataContainerInspectorWidget; class DataContainerInspectorWidget;
class DataContainerInspectorCanvas; class DataContainerInspectorCanvas;
class MdiDockableWindow; class MdiDockableWindow;
class LuaTableTreeWidget;
/** /**
* Main Window for the CAMPVis application. * Main Window for the CAMPVis application.
...@@ -217,6 +218,7 @@ namespace campvis { ...@@ -217,6 +218,7 @@ namespace campvis {
LogViewerWidget* _logViewer; ///< Widget displaying log messages LogViewerWidget* _logViewer; ///< Widget displaying log messages
ScriptingWidget* _scriptingConsoleWidget; ///< Widget showing the scripting console (if available) ScriptingWidget* _scriptingConsoleWidget; ///< Widget showing the scripting console (if available)
LuaTableTreeWidget* _luaTreeWidget; ///< Tree widget showing the global Lua variables
WorkflowControllerWidget* _workflowWidget; ///< Widget showing the workflow controller WorkflowControllerWidget* _workflowWidget; ///< Widget showing the workflow controller
QComboBox* _cbProcessorFactory; ///< Combobox for selecting the Processor from the ProcessorFactory QComboBox* _cbProcessorFactory; ///< Combobox for selecting the Processor from the ProcessorFactory
......
...@@ -36,7 +36,6 @@ namespace campvis { ...@@ -36,7 +36,6 @@ namespace campvis {
, _editCommand(nullptr) , _editCommand(nullptr)
, _btnExecute(nullptr) , _btnExecute(nullptr)
, _btnClear(nullptr) , _btnClear(nullptr)
, _luaTreeWidget(nullptr)
, _currentPosition(-1) , _currentPosition(-1)
{ {
setupGUI(); setupGUI();
...@@ -62,9 +61,6 @@ namespace campvis { ...@@ -62,9 +61,6 @@ namespace campvis {
QVBoxLayout* leftColumnLayout = new QVBoxLayout(); QVBoxLayout* leftColumnLayout = new QVBoxLayout();
mainLayout->addLayout(leftColumnLayout); mainLayout->addLayout(leftColumnLayout);
_luaTreeWidget = new LuaTableTreeWidget(this);
mainLayout->addWidget(_luaTreeWidget);
QHBoxLayout* controlsLayout = new QHBoxLayout(); QHBoxLayout* controlsLayout = new QHBoxLayout();
leftColumnLayout->addLayout(controlsLayout); leftColumnLayout->addLayout(controlsLayout);
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
#include "tbb/mutex.h" #include "tbb/mutex.h"
#include "application/gui/completinglualineedit.h" #include "application/gui/completinglualineedit.h"
#include "application/gui/luatablewidget.h"
#include "application/tools/bufferinglog.h" #include "application/tools/bufferinglog.h"
#include "application/gui/loghighlighter.h" #include "application/gui/loghighlighter.h"
...@@ -78,7 +77,6 @@ namespace campvis { ...@@ -78,7 +77,6 @@ namespace campvis {
*/ */
void deinit(); void deinit();
LuaTableTreeWidget* _luaTreeWidget; ///< Tree widget showing the global Lua variables
CompletingLuaLineEdit* _editCommand; ///< Text field to enter Lua commands CompletingLuaLineEdit* _editCommand; ///< Text field to enter Lua commands
protected: protected:
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>1000</width> <width>1000</width>
<height>21</height> <height>20</height>
</rect> </rect>
</property> </property>
</widget> </widget>
...@@ -79,6 +79,15 @@ ...@@ -79,6 +79,15 @@
</attribute> </attribute>
<widget class="QWidget" name="workflowDockContents"/> <widget class="QWidget" name="workflowDockContents"/>
</widget> </widget>
<widget class="QDockWidget" name="scriptingInspectorDock">
<property name="windowTitle">
<string>Scripting Variable Inspector</string>
</property>
<attribute name="dockWidgetArea">
<number>2</number>
</attribute>
<widget class="QWidget" name="scriptingInspectorDockContents"/>
</widget>
</widget> </widget>
<resources/> <resources/>
<connections/> <connections/>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment