ENH: PV4 reader - use button for update gui

This commit is contained in:
andy 2014-01-13 16:49:49 +00:00
parent 11379a0e03
commit f29b56d9b1
2 changed files with 20 additions and 2 deletions

View File

@ -172,6 +172,7 @@
name="UpdateGUI" name="UpdateGUI"
command="SetUpdateGUI" command="SetUpdateGUI"
number_of_elements="1" number_of_elements="1"
is_internal="1"
default_values="0" default_values="0"
animateable="0"> animateable="0">
<BooleanDomain name="bool"/> <BooleanDomain name="bool"/>

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -71,7 +71,7 @@ pqPV4FoamReaderPanel::pqPV4FoamReaderPanel
if ((prop = this->proxy()->GetProperty("UiRefresh")) != 0) if ((prop = this->proxy()->GetProperty("UiRefresh")) != 0)
{ {
prop->SetImmediateUpdate(1); prop->SetImmediateUpdate(1);
QPushButton *refresh = new QPushButton("Refresh Times"); QPushButton* refresh = new QPushButton("Refresh Times");
refresh->setToolTip("Rescan for updated times/fields."); refresh->setToolTip("Rescan for updated times/fields.");
form->addWidget(refresh, 0, 0, Qt::AlignLeft); form->addWidget(refresh, 0, 0, Qt::AlignLeft);
@ -334,6 +334,23 @@ pqPV4FoamReaderPanel::pqPV4FoamReaderPanel
QFrame* hline3 = new QFrame(this); QFrame* hline3 = new QFrame(this);
hline3->setFrameStyle(QFrame::HLine | QFrame::Sunken); hline3->setFrameStyle(QFrame::HLine | QFrame::Sunken);
form->addWidget(hline3, 7, 0, 1, 3); form->addWidget(hline3, 7, 0, 1, 3);
// update GUI button
if ((prop = this->proxy()->GetProperty("UpdateGUI")) != 0)
{
prop->SetImmediateUpdate(1);
QPushButton* updateGUI = new QPushButton("Update GUI");
updateGUI->setToolTip("Update GUI");
form->addWidget(updateGUI, 8, 0, Qt::AlignLeft);
QObject::connect
(
updateGUI,
SIGNAL(clicked()),
this,
SLOT(setModified())
);
}
} }