Skip to content

Commit

Permalink
Separate the PropertyPanel in 3 Panel: Property, View, Display
Browse files Browse the repository at this point in the history
  • Loading branch information
NickLaurenson committed Mar 7, 2019
1 parent 2790ef7 commit d2c74d4
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 6 deletions.
18 changes: 13 additions & 5 deletions vvMainWindow.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -236,18 +236,22 @@ class vvMainWindow::pqInternals
// vtkSMPropertyHelper(view->getProxy(),"MultiSamples").Set(1);
view->getProxy()->UpdateVTKObjects();

// properties panel
// Specify each Properties Panel as we do want to present one panel per dock
this->Ui.propertiesPanel->setPanelMode(pqPropertiesPanel::SOURCE_PROPERTIES);
this->Ui.viewPropertiesPanel->setPanelMode(pqPropertiesPanel::VIEW_PROPERTIES);
this->Ui.displayPropertiesPanel->setPanelMode(pqPropertiesPanel::DISPLAY_PROPERTIES);

// connect apply button
applyBehaviors->registerPanel(this->Ui.propertiesPanel);
// Enable help from the properties panel.
QObject::connect(this->Ui.propertiesPanelDock->widget(),
QObject::connect(this->Ui.propertiesPanel,
SIGNAL(helpRequested(const QString&, const QString&)),
window, SLOT(showHelpForProxy(const QString&, const QString&)));

/// hook delete to pqDeleteReaction.
QAction* tempDeleteAction = new QAction(window);
pqDeleteReaction* handler = new pqDeleteReaction(tempDeleteAction);
handler->connect(this->Ui.propertiesPanelDock->widget(),
handler->connect(this->Ui.propertiesPanel,
SIGNAL(deleteRequested(pqPipelineSource*)),
SLOT(deleteSource(pqPipelineSource*)));

Expand All @@ -259,13 +263,17 @@ class vvMainWindow::pqInternals

// organize dockable widget in tab
window->setTabPosition(Qt::LeftDockWidgetArea, QTabWidget::North);
window->tabifyDockWidget(this->Ui.propertiesPanelDock, this->Ui.colorMapEditorDock);
window->tabifyDockWidget(this->Ui.propertiesDock, this->Ui.colorMapEditorDock);
window->tabifyDockWidget(this->Ui.viewPropertiesDock, this->Ui.colorMapEditorDock);
window->tabifyDockWidget(this->Ui.displayPropertiesDock, this->Ui.colorMapEditorDock);
window->tabifyDockWidget(this->Ui.spreadSheetDock, this->Ui.informationDock);
window->tabifyDockWidget(this->Ui.spreadSheetDock, this->Ui.memoryInspectorDock);

// hide docker by default
this->Ui.pipelineBrowserDock->hide();
this->Ui.propertiesPanelDock->hide();
this->Ui.propertiesDock->hide();
this->Ui.viewPropertiesDock->hide();
this->Ui.displayPropertiesDock->hide();
this->Ui.colorMapEditorDock->hide();
this->Ui.spreadSheetDock->hide();
this->Ui.informationDock->hide();
Expand Down
20 changes: 19 additions & 1 deletion vvMainWindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@
</attribute>
<widget class="pqPipelineBrowserWidget" name="pipelineBrowser"/>
</widget>
<widget class="QDockWidget" name="propertiesPanelDock">
<widget class="QDockWidget" name="propertiesDock">
<property name="features">
<set>QDockWidget::AllDockWidgetFeatures</set>
</property>
Expand Down Expand Up @@ -298,6 +298,24 @@
</attribute>
<widget class="pqProxyInformationWidget" name="proxyInformationWidget"/>
</widget>
<widget class="QDockWidget" name="displayPropertiesDock">
<property name="windowTitle">
<string>Display</string>
</property>
<attribute name="dockWidgetArea">
<number>2</number>
</attribute>
<widget class="pqPropertiesPanel" name="displayPropertiesPanel"/>
</widget>
<widget class="QDockWidget" name="viewPropertiesDock">
<property name="windowTitle">
<string>View</string>
</property>
<attribute name="dockWidgetArea">
<number>2</number>
</attribute>
<widget class="pqPropertiesPanel" name="viewPropertiesPanel"/>
</widget>
<action name="actionE_xit">
<property name="text">
<string>E&amp;xit</string>
Expand Down

0 comments on commit d2c74d4

Please sign in to comment.