Commit 95b2248a authored by Artur Grunau's avatar Artur Grunau
Browse files

Dock DataContainerInspectorWidget in the MDI area

DataContainerInspectorWidget was previously stored in a regular dock
widget, but because of its rather large dimensions it didn't fit well in
any of the docking areas.

Put DataContainerInspectorWidget in an MdiDockableWindow and add it to
the MDI area. It fits much better there, and can still be undocked if
need be.
parent a00b0215
...@@ -56,7 +56,7 @@ namespace campvis { ...@@ -56,7 +56,7 @@ namespace campvis {
, _pipelineWidget(0) , _pipelineWidget(0)
, _propCollectionWidget(0) , _propCollectionWidget(0)
, _dcInspectorWidget(0) , _dcInspectorWidget(0)
, _dcInspectorDock(0) , _dcInspectorWindow(0)
, _btnExecute(0) , _btnExecute(0)
, _btnShowDataContainerInspector(0) , _btnShowDataContainerInspector(0)
, _selectedPipeline(0) , _selectedPipeline(0)
...@@ -251,15 +251,14 @@ namespace campvis { ...@@ -251,15 +251,14 @@ namespace campvis {
void MainWindow::onBtnShowDataContainerInspectorClicked() { void MainWindow::onBtnShowDataContainerInspectorClicked() {
if (_selectedPipeline != 0) { if (_selectedPipeline != 0) {
if (_dcInspectorDock == 0) { if (_dcInspectorWindow == 0) {
_dcInspectorDock = dockPrimaryWidget("Data Container inspector", _dcInspectorWidget); _dcInspectorWindow = _mdiArea->addWidget(_dcInspectorWidget);
} else { _dcInspectorWindow->setWindowTitle(tr("Data Container Inspector"));
// Activate the dock's tab
_dcInspectorDock->setVisible(true);
_dcInspectorDock->raise();
} }
_dcInspectorWidget->setDataContainer(&(_selectedPipeline->getDataContainer())); _dcInspectorWidget->setDataContainer(&(_selectedPipeline->getDataContainer()));
_dcInspectorWindow->show();
_dcInspectorWindow->activateWindow();
} }
} }
......
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
namespace campvis { namespace campvis {
class DataContainerInspectorWidget; class DataContainerInspectorWidget;
class DataContainerInspectorCanvas; class DataContainerInspectorCanvas;
class MdiDockableWindow;
/** /**
* Main Window for the CAMPVis application. * Main Window for the CAMPVis application.
...@@ -176,7 +177,7 @@ namespace campvis { ...@@ -176,7 +177,7 @@ namespace campvis {
QScrollArea* _pipelinePropertiesScrollArea; ///< Scroll area for _pipelinePropertiesWidget QScrollArea* _pipelinePropertiesScrollArea; ///< Scroll area for _pipelinePropertiesWidget
PropertyCollectionWidget* _propCollectionWidget; ///< Widget for brosing the PropertyCollection of the selected pipeline/processor PropertyCollectionWidget* _propCollectionWidget; ///< Widget for brosing the PropertyCollection of the selected pipeline/processor
DataContainerInspectorWidget* _dcInspectorWidget; ///< Widget for inspecting the DataContainer of the selected pipeline. DataContainerInspectorWidget* _dcInspectorWidget; ///< Widget for inspecting the DataContainer of the selected pipeline.
QDockWidget* _dcInspectorDock; ///< Dock storing the above DataContainerInspectorWidget instance. MdiDockableWindow* _dcInspectorWindow; ///< Window displaying the above DataContainerInspectorWidget instance.
QPushButton* _btnExecute; ///< Button to execute the selected pipeline/processor QPushButton* _btnExecute; ///< Button to execute the selected pipeline/processor
QPushButton* _btnShowDataContainerInspector; ///< Button to show the DataContainerInspector for the selected pipeline QPushButton* _btnShowDataContainerInspector; ///< Button to show the DataContainerInspector for the selected pipeline
......
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