#include <pqComparativeVisPanel.h>
#include <pqPipelineBrowserWidget.h>
#include <pqProxyInformationWidget.h>
-#include <pqSettings.h>
#include <pqDataInformationWidget.h>
#include <pqPVAnimationWidget.h>
#include <pqFindDataSelectionDisplayFrame.h>
#include <pqDeleteReaction.h>
#include <vtkPVGeneralSettings.h>
+#include <vtkSMSettings.h>
class ResizeHelper : public pqPVAnimationWidget
{
// PROPERTIES, DISPLAY and VIEW:
// See ParaViewMainWindow.cxx - those three panels can be separated or grouped.
- pqSettings *settings = pqApplicationCore::instance()->settings();
+ vtkSMSettings* settings = vtkSMSettings::GetInstance();
// Properties dock (previously called OBJECT_INSPECTOR)
QDockWidget* propertiesDock = new QDockWidget( tr( "TTL_OBJECT_INSPECTOR" ), desk );
myDockWidgets[propertiesDock] = true;
propertiesDock->hide();
+ int propertiesPanelMode = settings->GetSettingAsInt(
+ ".settings.GeneralSettings.PropertiesPanelMode", vtkPVGeneralSettings::ALL_IN_ONE);
+
// Display dock
- QDockWidget* displayPropertiesDock = new QDockWidget( tr( "TTL_DISPLAY" ), desk );
- displayPropertiesDock->setObjectName("displayPropertiesDock");
- displayPropertiesDock->setAllowedAreas( Qt::LeftDockWidgetArea|Qt::RightDockWidgetArea );
- desk->addDockWidget( Qt::LeftDockWidgetArea, displayPropertiesDock );
-
- pqPropertiesPanel* displayPropertiesPanel = new pqPropertiesPanel();
- displayPropertiesPanel->setObjectName("displayPropertiesPanel");
- displayPropertiesPanel->setProperty("panelMode", QVariant(2)); // probably to have only the Display part
- displayPropertiesDock->setWidget(displayPropertiesPanel);
- myDockWidgets[displayPropertiesDock] = false;
- displayPropertiesDock->hide();
+ QDockWidget* displayPropertiesDock = 0;
+ if (propertiesPanelMode == vtkPVGeneralSettings::SEPARATE_DISPLAY_PROPERTIES ||
+ propertiesPanelMode == vtkPVGeneralSettings::ALL_SEPARATE )
+ {
+ displayPropertiesDock = new QDockWidget( tr( "TTL_DISPLAY" ), desk );
+ displayPropertiesDock->setObjectName("displayPropertiesDock");
+ displayPropertiesDock->setAllowedAreas( Qt::LeftDockWidgetArea|Qt::RightDockWidgetArea );
+ desk->addDockWidget( Qt::LeftDockWidgetArea, displayPropertiesDock );
+
+ pqPropertiesPanel* displayPropertiesPanel = new pqPropertiesPanel();
+ displayPropertiesPanel->setObjectName("displayPropertiesPanel");
+ displayPropertiesPanel->setProperty("panelMode", QVariant(2)); // probably to have only the Display part
+ displayPropertiesDock->setWidget(displayPropertiesPanel);
+ myDockWidgets[displayPropertiesDock] = false;
+ displayPropertiesDock->hide();
+ }
// View dock
- QDockWidget* viewPropertiesDock = new QDockWidget( tr( "TTL_VIEW_PANEL" ), desk );
- viewPropertiesDock->setObjectName("viewPropertiesDock");
- viewPropertiesDock->setAllowedAreas( Qt::LeftDockWidgetArea|Qt::RightDockWidgetArea );
- desk->addDockWidget( Qt::LeftDockWidgetArea, viewPropertiesDock );
-
- pqPropertiesPanel* viewPropertiesPanel = new pqPropertiesPanel();
- viewPropertiesPanel->setObjectName("viewPropertiesPanel");
- viewPropertiesPanel->setProperty("panelMode", QVariant(4)); // probably to have only the View part
- viewPropertiesDock->setWidget(viewPropertiesPanel);
- myDockWidgets[viewPropertiesDock] = false;
- viewPropertiesDock->hide();
-
- // Taken from ParaViewMainWindow.cxx:
- int propertiesPanelMode = settings->value(
- "GeneralSettings.PropertiesPanelMode", vtkPVGeneralSettings::ALL_IN_ONE).toInt();
+ QDockWidget* viewPropertiesDock = 0;
+ if (propertiesPanelMode == vtkPVGeneralSettings::SEPARATE_VIEW_PROPERTIES ||
+ propertiesPanelMode == vtkPVGeneralSettings::ALL_SEPARATE )
+ {
+ viewPropertiesDock = new QDockWidget( tr( "TTL_VIEW_PANEL" ), desk );
+ viewPropertiesDock->setObjectName("viewPropertiesDock");
+ viewPropertiesDock->setAllowedAreas( Qt::LeftDockWidgetArea|Qt::RightDockWidgetArea );
+ desk->addDockWidget( Qt::LeftDockWidgetArea, viewPropertiesDock );
+
+ pqPropertiesPanel* viewPropertiesPanel = new pqPropertiesPanel();
+ viewPropertiesPanel->setObjectName("viewPropertiesPanel");
+ viewPropertiesPanel->setProperty("panelMode", QVariant(4)); // probably to have only the View part
+ viewPropertiesDock->setWidget(viewPropertiesPanel);
+ myDockWidgets[viewPropertiesDock] = false;
+ viewPropertiesDock->hide();
+ }
+
switch (propertiesPanelMode)
{
case vtkPVGeneralSettings::SEPARATE_DISPLAY_PROPERTIES:
- viewPropertiesDock->hide();
propertiesPanel->setPanelMode(
pqPropertiesPanel::SOURCE_PROPERTIES|pqPropertiesPanel::VIEW_PROPERTIES);
break;
case vtkPVGeneralSettings::SEPARATE_VIEW_PROPERTIES:
- displayPropertiesDock->hide();
propertiesPanel->setPanelMode(
pqPropertiesPanel::SOURCE_PROPERTIES|pqPropertiesPanel::DISPLAY_PROPERTIES);
break;
default:
propertiesPanel->setPanelMode(
pqPropertiesPanel::SOURCE_PROPERTIES|pqPropertiesPanel::VIEW_PROPERTIES|pqPropertiesPanel::DISPLAY_PROPERTIES);
- viewPropertiesDock->hide();
- displayPropertiesDock->hide();
break;
}
myDockWidgets[informationDock] = true;
+ if ( viewPropertiesDock )
desk->tabifyDockWidget(propertiesDock, viewPropertiesDock);
- desk->tabifyDockWidget(propertiesDock, displayPropertiesDock);
+ if ( displayPropertiesDock )
+ desk->tabifyDockWidget(propertiesDock, displayPropertiesDock);
desk->tabifyDockWidget(propertiesDock, informationDock);
propertiesDock->raise();