Commit 1a057140 authored by grunau's avatar grunau
Browse files

Show visualisation pipeline widgets in an MDI area

The main window's central widget has been changed to an MDI area. All
visualisation pipeline widgets are now displayed as subwindows in it.
This approach should help us to better utilise the space in the centre
of the main window.

git-svn-id: https://camplinux.in.tum.de/svn/campvis/branches/gui-redux@524 bb408c1c-ae56-11e1-83d9-df6b3e0c105e
parent 4c4e6d0c
......@@ -37,12 +37,14 @@
#include "core/pipeline/abstractpipeline.h"
#include "core/pipeline/abstractprocessor.h"
#include <QMdiSubWindow>
namespace campvis {
MainWindow::MainWindow(CampVisApplication* application)
: QMainWindow()
, _application(application)
, _centralWidget(0)
, _mdiArea(0)
, _pipelineWidget(0)
, _propCollectionWidget(0)
, _dcInspectorWidget(0)
......@@ -73,6 +75,10 @@ namespace campvis {
setTabPosition(Qt::TopDockWidgetArea, QTabWidget::North);
_mdiArea = new QMdiArea();
_mdiArea->tileSubWindows();
setCentralWidget(_mdiArea);
_pipelineWidget = new PipelineTreeWidget();
ui.pipelineTreeDock->setWidget(_pipelineWidget);
......@@ -89,7 +95,7 @@ namespace campvis {
_btnShowDataContainerInspector = new QPushButton("Inspect DataContainer of Selected Pipeline", rightWidget);
rightLayout->addWidget(_btnShowDataContainerInspector);
_propCollectionWidget = new PropertyCollectionWidget(_centralWidget);
_propCollectionWidget = new PropertyCollectionWidget();
rightLayout->addWidget(_propCollectionWidget);
_logViewer = new LogViewerWidget();
......@@ -186,7 +192,8 @@ namespace campvis {
}
void MainWindow::addVisualizationPipelineWidget(const std::string& name, QWidget* widget) {
dockPrimaryWidget(name, widget);
QMdiSubWindow* subWindow = _mdiArea->addSubWindow(widget);
subWindow->setWindowTitle(QString::fromStdString(name));
}
QDockWidget* MainWindow::dockPrimaryWidget(const std::string& name, QWidget* widget) {
......
......@@ -42,6 +42,7 @@
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QPushButton>
#include <QMdiArea>
#include <vector>
namespace campvis {
......@@ -141,7 +142,7 @@ namespace campvis {
CampVisApplication* _application; ///< Pointer to the application hosting the whole stuff
QWidget* _centralWidget; ///< Central widget of the MainWindow
QMdiArea* _mdiArea; ///< MDI area (the window's central widget)
PipelineTreeWidget* _pipelineWidget; ///< Widget for browsing the active pipelines
PropertyCollectionWidget* _propCollectionWidget; ///< Widget for brosing the PropertyCollection of the selected pipeline/processor
DataContainerInspectorWidget* _dcInspectorWidget; ///< Widget for inspecting the DataContainer of 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