Commit 8bfe9d17 authored by andy's avatar andy
Browse files

ENH: restructured pv reader interface

parent c049c3c4
......@@ -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);
}
......
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