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 @@
// ================================================================================================
#include "completinglualineedit.h"
#include "application/gui/scriptingwidget.h"
#include "application/gui/luatablewidget.h"
#include <QAbstractItemModel>
#include <QAbstractItemView>
......
......@@ -48,6 +48,7 @@
#include "scripting/glue/globalluatable.h"
#include "scripting/luagen/properties/propertycollectionluascriptgenerator.h"
#include "scripting/luagen/properties/abstractpropertylua.h"
#include "application/gui/luatablewidget.h"
#endif
namespace campvis {
......@@ -70,6 +71,7 @@ namespace campvis {
, _selectedDataContainer(0)
, _logViewer(0)
, _scriptingConsoleWidget(nullptr)
, _luaTreeWidget(nullptr)
, _workflowWidget(nullptr)
{
cgtAssert(_application != 0, "Application must not be 0.");
......@@ -88,7 +90,11 @@ namespace campvis {
setCorner(Qt::BottomLeftCorner, Qt::LeftDockWidgetArea);
setCorner(Qt::TopLeftCorner, Qt::LeftDockWidgetArea);
#ifdef CAMPVIS_HAS_SCRIPTING
setCorner(Qt::BottomRightCorner, Qt::BottomDockWidgetArea);
#else
setCorner(Qt::BottomRightCorner, Qt::RightDockWidgetArea);
#endif
setCorner(Qt::TopRightCorner, Qt::RightDockWidgetArea);
setTabPosition(Qt::TopDockWidgetArea, QTabWidget::North);
......@@ -171,8 +177,13 @@ namespace campvis {
_scriptingConsoleWidget = new ScriptingWidget(this);
ui.scriptingConsoleDock->setWidget(_scriptingConsoleWidget);
connect(_scriptingConsoleWidget, SIGNAL(s_commandExecuted(const QString&)), this, SLOT(onLuaCommandExecuted(const QString&)));
_luaTreeWidget = new LuaTableTreeWidget(this);
ui.scriptingInspectorDock->setWidget(_luaTreeWidget);
#else
ui.scriptingConsoleDock->setVisible(false);
ui.scriptingInspectorDock->setVisible(false);
#endif
_workflowWidget = new WorkflowControllerWidget(_application, this);
......@@ -451,7 +462,7 @@ namespace campvis {
_application->getLuaVmState()->getGlobalTable()->updateValueMap();
_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
}
......
......@@ -48,6 +48,7 @@ namespace campvis {
class DataContainerInspectorWidget;
class DataContainerInspectorCanvas;
class MdiDockableWindow;
class LuaTableTreeWidget;
/**
* Main Window for the CAMPVis application.
......@@ -217,6 +218,7 @@ namespace campvis {
LogViewerWidget* _logViewer; ///< Widget displaying log messages
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
QComboBox* _cbProcessorFactory; ///< Combobox for selecting the Processor from the ProcessorFactory
......
......@@ -36,7 +36,6 @@ namespace campvis {
, _editCommand(nullptr)
, _btnExecute(nullptr)
, _btnClear(nullptr)
, _luaTreeWidget(nullptr)
, _currentPosition(-1)
{
setupGUI();
......@@ -62,9 +61,6 @@ namespace campvis {
QVBoxLayout* leftColumnLayout = new QVBoxLayout();
mainLayout->addLayout(leftColumnLayout);
_luaTreeWidget = new LuaTableTreeWidget(this);
mainLayout->addWidget(_luaTreeWidget);
QHBoxLayout* controlsLayout = new QHBoxLayout();
leftColumnLayout->addLayout(controlsLayout);
......
......@@ -31,7 +31,6 @@
#include "tbb/mutex.h"
#include "application/gui/completinglualineedit.h"
#include "application/gui/luatablewidget.h"
#include "application/tools/bufferinglog.h"
#include "application/gui/loghighlighter.h"
......@@ -78,7 +77,6 @@ namespace campvis {
*/
void deinit();
LuaTableTreeWidget* _luaTreeWidget; ///< Tree widget showing the global Lua variables
CompletingLuaLineEdit* _editCommand; ///< Text field to enter Lua commands
protected:
......
......@@ -23,7 +23,7 @@
<x>0</x>
<y>0</y>
<width>1000</width>
<height>21</height>
<height>20</height>
</rect>
</property>
</widget>
......@@ -79,6 +79,15 @@
</attribute>
<widget class="QWidget" name="workflowDockContents"/>
</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>
<resources/>
<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