From cb29fc7c1ca94800449fbcb45e00cec3bc0947fe Mon Sep 17 00:00:00 2001 From: andy <andy> Date: Thu, 27 Sep 2012 15:09:32 +0100 Subject: [PATCH] ENH: restructured pv reader interface --- .../PV3FoamReader/pqPV3FoamReaderPanel.cxx | 105 +++++++++++------- 1 file changed, 66 insertions(+), 39 deletions(-) diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/pqPV3FoamReaderPanel.cxx b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/pqPV3FoamReaderPanel.cxx index babdd460c92..f795ed8eec7 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/pqPV3FoamReaderPanel.cxx +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/pqPV3FoamReaderPanel.cxx @@ -62,6 +62,9 @@ pqPV3FoamReaderPanel::pqPV3FoamReaderPanel QGridLayout* form = new QGridLayout(); this->PanelLayout->addLayout(form, 0, 0, 1, -1); + // ROW 0 + // ~~~~~ + vtkSMProperty* prop = 0; // refresh button for updating times/fields @@ -107,10 +110,16 @@ pqPV3FoamReaderPanel::pqPV3FoamReaderPanel ); } + // ROW 1 + // ~~~~~ + QFrame* hline1 = new QFrame(this); hline1->setFrameStyle(QFrame::HLine | QFrame::Sunken); form->addWidget(hline1, 1, 0, 1, 3); + // ROW 2 + // ~~~~~ + // checkbox for caching mesh if ((prop = this->proxy()->GetProperty("UiCacheMesh")) != 0) { @@ -137,35 +146,38 @@ pqPV3FoamReaderPanel::pqPV3FoamReaderPanel ); } + // cell 2,1 empty - // checkbox for patch names - if ((prop = this->proxy()->GetProperty("UiShowPatchNames")) != 0) + // ROW 3 + // ~~~~~ + + // checkbox for include sets + if ((prop = this->proxy()->GetProperty("UiIncludeSets")) != 0) { // immediate update on the Server Manager side prop->SetImmediateUpdate(true); - ShowPatchNames_ = new QCheckBox("Patch Names"); - ShowPatchNames_->setChecked + IncludeSets_ = new QCheckBox("Include Sets"); + IncludeSets_->setChecked ( vtkSMIntVectorProperty::SafeDownCast(prop)->GetElement(0) ); - ShowPatchNames_->setToolTip + IncludeSets_->setToolTip ( - "Show patch names in render window." + "Search the polyMesh/sets/ directory." ); - // row/col 0,1 - form->addWidget(ShowPatchNames_, 2, 1, Qt::AlignLeft); + // row/col 1,0 + form->addWidget(IncludeSets_, 3, 0, Qt::AlignLeft); connect ( - ShowPatchNames_, + IncludeSets_, SIGNAL(stateChanged(int)), this, - SLOT(ShowPatchNamesToggled()) + SLOT(IncludeSetsToggled()) ); } - // checkbox for Groups Only if ((prop = this->proxy()->GetProperty("UiShowGroupsOnly")) != 0) { @@ -183,7 +195,7 @@ pqPV3FoamReaderPanel::pqPV3FoamReaderPanel ); // row/col 2, 2 - form->addWidget(ShowGroupsOnly_, 2, 2, Qt::AlignLeft); + form->addWidget(ShowGroupsOnly_, 3, 1, Qt::AlignLeft); connect ( ShowGroupsOnly_, @@ -194,62 +206,74 @@ pqPV3FoamReaderPanel::pqPV3FoamReaderPanel } - // checkbox for include sets - if ((prop = this->proxy()->GetProperty("UiIncludeSets")) != 0) + // ROW 4 + // ~~~~~ + + // checkbox for include zones + if ((prop = this->proxy()->GetProperty("UiIncludeZones")) != 0) { // immediate update on the Server Manager side prop->SetImmediateUpdate(true); - IncludeSets_ = new QCheckBox("Include Sets"); - IncludeSets_->setChecked + IncludeZones_ = new QCheckBox("Include Zones"); + IncludeZones_->setChecked ( vtkSMIntVectorProperty::SafeDownCast(prop)->GetElement(0) ); - IncludeSets_->setToolTip + IncludeZones_->setToolTip ( - "Search the polyMesh/sets/ directory." + "ZoneMesh information is used to find {cell,face,point}Zones. " + "The polyMesh/ directory is only checked on startup." ); - // row/col 1,0 - form->addWidget(IncludeSets_, 3, 0, Qt::AlignLeft); + // row/col 1,1 + form->addWidget(IncludeZones_, 4, 0, Qt::AlignLeft); connect ( - IncludeSets_, + IncludeZones_, SIGNAL(stateChanged(int)), this, - SLOT(IncludeSetsToggled()) + SLOT(IncludeZonesToggled()) ); } - - // checkbox for include zones - if ((prop = this->proxy()->GetProperty("UiIncludeZones")) != 0) + // checkbox for patch names + if ((prop = this->proxy()->GetProperty("UiShowPatchNames")) != 0) { // immediate update on the Server Manager side prop->SetImmediateUpdate(true); - IncludeZones_ = new QCheckBox("Include Zones"); - IncludeZones_->setChecked + ShowPatchNames_ = new QCheckBox("Patch Names"); + ShowPatchNames_->setChecked ( vtkSMIntVectorProperty::SafeDownCast(prop)->GetElement(0) ); - IncludeZones_->setToolTip + ShowPatchNames_->setToolTip ( - "ZoneMesh information is used to find {cell,face,point}Zones. " - "The polyMesh/ directory is only checked on startup." + "Show patch names in render window." ); - // row/col 1,1 - form->addWidget(IncludeZones_, 3, 1, Qt::AlignLeft); + // row/col 0,1 + form->addWidget(ShowPatchNames_, 4, 1, Qt::AlignLeft); connect ( - IncludeZones_, + ShowPatchNames_, SIGNAL(stateChanged(int)), this, - SLOT(IncludeZonesToggled()) + SLOT(ShowPatchNamesToggled()) ); } + // ROW 5 + // ~~~~~ + + QFrame* hline2 = new QFrame(this); + hline2->setFrameStyle(QFrame::HLine | QFrame::Sunken); + form->addWidget(hline2, 5, 0, 1, 3); + + // ROW 6 + // ~~~~~ + // checkbox for vol field interpolation if ((prop = this->proxy()->GetProperty("UiInterpolateVolFields")) != 0) { @@ -267,7 +291,7 @@ pqPV3FoamReaderPanel::pqPV3FoamReaderPanel ); // row/col 1,1 - form->addWidget(InterpolateVolFields_, 4, 0, Qt::AlignLeft); + form->addWidget(InterpolateVolFields_, 6, 0, Qt::AlignLeft); connect ( InterpolateVolFields_, @@ -294,7 +318,7 @@ pqPV3FoamReaderPanel::pqPV3FoamReaderPanel ); // row/col 1,1 - form->addWidget(ExtrapolatePatches_, 4, 1, Qt::AlignLeft); + form->addWidget(ExtrapolatePatches_, 6, 1, Qt::AlignLeft); connect ( ExtrapolatePatches_, @@ -304,9 +328,12 @@ pqPV3FoamReaderPanel::pqPV3FoamReaderPanel ); } - QFrame* hline2 = new QFrame(this); - hline2->setFrameStyle(QFrame::HLine | QFrame::Sunken); - form->addWidget(hline2, 5, 0, 1, 3); + // ROW 7 + // ~~~~~ + + QFrame* hline3 = new QFrame(this); + hline3->setFrameStyle(QFrame::HLine | QFrame::Sunken); + form->addWidget(hline3, 7, 0, 1, 3); } -- GitLab