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 {
, _pipelineWidget(0)
, _propCollectionWidget(0)
, _dcInspectorWidget(0)
, _dcInspectorDock(0)
, _dcInspectorWindow(0)
, _btnExecute(0)
, _btnShowDataContainerInspector(0)
, _selectedPipeline(0)
......@@ -251,15 +251,14 @@ namespace campvis {
void MainWindow::onBtnShowDataContainerInspectorClicked() {
if (_selectedPipeline != 0) {
if (_dcInspectorDock == 0) {
_dcInspectorDock = dockPrimaryWidget("Data Container inspector", _dcInspectorWidget);
} else {
// Activate the dock's tab
_dcInspectorDock->setVisible(true);
_dcInspectorDock->raise();
if (_dcInspectorWindow == 0) {
_dcInspectorWindow = _mdiArea->addWidget(_dcInspectorWidget);
_dcInspectorWindow->setWindowTitle(tr("Data Container Inspector"));
}
_dcInspectorWidget->setDataContainer(&(_selectedPipeline->getDataContainer()));
_dcInspectorWindow->show();
_dcInspectorWindow->activateWindow();
}
}
......
......@@ -50,6 +50,7 @@
namespace campvis {
class DataContainerInspectorWidget;
class DataContainerInspectorCanvas;
class MdiDockableWindow;
/**
* Main Window for the CAMPVis application.
......@@ -176,7 +177,7 @@ namespace campvis {
QScrollArea* _pipelinePropertiesScrollArea; ///< Scroll area for _pipelinePropertiesWidget
PropertyCollectionWidget* _propCollectionWidget; ///< Widget for brosing the PropertyCollection of the selected pipeline/processor
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* _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