diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/CMakeLists.txt b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/CMakeLists.txt
index 49e64bf76c..6671a5d179 100644
--- a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/CMakeLists.txt
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/CMakeLists.txt
@@ -1,81 +1,65 @@
-# Create a plugin that adds a reader to the ParaView GUI
-# it is added in the file dialog when doing opens/saves.
+# Create a plugin to add a reader to the ParaView GUI
-# The qrc file is processed by Qt's resource compiler (rcc)
-# the qrc file must have a resource prefix of "/ParaViewResources"
-# and ParaView will read anything contained under that prefix
-# the pqReader.xml file contains xml defining readers with their
-# file extensions and descriptions.
+cmake_minimum_required(VERSION 2.8)
-CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
+find_package(ParaView REQUIRED)
+include(${PARAVIEW_USE_FILE})
-FIND_PACKAGE(ParaView REQUIRED)
-INCLUDE(${PARAVIEW_USE_FILE})
-
-LINK_DIRECTORIES(
+link_directories(
$ENV{FOAM_LIBBIN}
$ENV{FOAM_EXT_LIBBIN}
)
-INCLUDE_DIRECTORIES(
+include_directories(
$ENV{WM_PROJECT_DIR}/src/OpenFOAM/lnInclude
$ENV{WM_PROJECT_DIR}/src/OSspecific/$ENV{WM_OSTYPE}/lnInclude
$ENV{WM_PROJECT_DIR}/src/finiteVolume/lnInclude
${PROJECT_SOURCE_DIR}/../vtkPVFoam
)
-ADD_DEFINITIONS(
- -std=c++0x
+add_definitions(
+ -std=c++11
-DWM_$ENV{WM_PRECISION_OPTION}
-DWM_LABEL_SIZE=$ENV{WM_LABEL_SIZE}
)
# Set output library destination to plugin directory
-SET(
+set(
LIBRARY_OUTPUT_PATH $ENV{PV_PLUGIN_PATH}
CACHE INTERNAL
"Single output directory for building all libraries."
)
-#
-# Defined combined plugin
-#
+if (PARAVIEW_QT_VERSION VERSION_GREATER "4")
+ qt5_wrap_cpp(MOC_SRCS
+ pqFoamReaderControls.h
+ )
+else()
+ qt4_wrap_cpp(MOC_SRCS
+ pqFoamReaderControls.h
+ )
+endif()
-# Extend the auto-generated panel
-QT4_WRAP_CPP(MOC_SRCS pqPVFoamReaderPanel.h)
-
-ADD_PARAVIEW_OBJECT_PANEL(IFACES IFACE_SRCS
- CLASS_NAME pqPVFoamReaderPanel
- XML_NAME PVFoamReader # name of SourceProxy in *SM.xml
- XML_GROUP sources
+add_paraview_property_group_widget(IFACES0 IFACES0_SRCS
+ TYPE "openfoam_reader_general_controls"
+ CLASS_NAME pqFoamReaderControls
)
-# Separate GUI_RESOURCE_FILES deprecated with paraview 4.3
-# so check if version < 4.4
+add_paraview_plugin(
+ PVFoamReader_SM "1.0"
+ SERVER_MANAGER_XML PVFoamReader_SM.xml
+ SERVER_MANAGER_SOURCES vtkPVFoamReader.cxx
+ GUI_INTERFACES
+ ${IFACES0}
+ SOURCES
+ ${IFACES0_SRCS}
+ ${MOC_SRCS}
+ pqFoamReaderControls.cxx
+)
-IF(("${PARAVIEW_VERSION_MAJOR}" LESS 5) AND ("${PARAVIEW_VERSION_MINOR}" LESS 4))
- ADD_PARAVIEW_PLUGIN(
- PVFoamReader_SM "1.0"
- SERVER_MANAGER_XML PVFoamReader_SM.xml
- SERVER_MANAGER_SOURCES vtkPVFoamReader.cxx
- GUI_INTERFACES ${IFACES}
- GUI_SOURCES pqPVFoamReaderPanel.cxx
- ${MOC_SRCS} ${UI_SRCS} ${IFACE_SRCS}
- GUI_RESOURCE_FILES PVFoamReader.xml
- )
-ELSE()
- ADD_PARAVIEW_PLUGIN(
- PVFoamReader_SM "1.0"
- SERVER_MANAGER_XML PVFoamReader_SM.xml
- SERVER_MANAGER_SOURCES vtkPVFoamReader.cxx
- GUI_INTERFACES ${IFACES}
- GUI_SOURCES pqPVFoamReaderPanel.cxx
- ${MOC_SRCS} ${UI_SRCS} ${IFACE_SRCS}
- )
-ENDIF()
-TARGET_LINK_LIBRARIES(
+target_link_libraries(
PVFoamReader_SM
LINK_PUBLIC
vtkPVFoam
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/PVFoamReader.qrc b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/PVFoamReader.qrc
deleted file mode 100644
index 9bb30ea5c0..0000000000
--- a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/PVFoamReader.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
- PVFoamReader.xml
-
-
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/PVFoamReader.xml b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/PVFoamReader.xml
deleted file mode 100644
index 5507293c67..0000000000
--- a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/PVFoamReader.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/PVFoamReader_SM.xml b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/PVFoamReader_SM.xml
index 69bcfc0962..ebb0c3be93 100644
--- a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/PVFoamReader_SM.xml
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/PVFoamReader_SM.xml
@@ -5,14 +5,14 @@
class="vtkPVFoamReader">
-
+ panel_visibility="never">
- Specifies the filename for the OpenFOAM Reader.
+ The filename for the OpenFOAM reader module.
@@ -27,157 +27,151 @@
-
-
-
-
- Cache the fvMesh in memory.
-
-
-
-
+ number_of_elements="1"
+ panel_visibility="default">
- Rescan for updated timesteps/fields.
+ Rescan for updated times/fields.
-
+ panel_visibility="default">
- Skip including the 0/ time directory
+ Ignore the 0/ time directory.
+
+
+
+
+
+
+
+ Search the polyMesh/sets/ directory
+
+
+
+
+
+
+
+ ZoneMesh information is used to find {cell,face,point}Zones.
+ The polyMesh/ directory is only checked on startup.
+
+
+
+
+
+
+
+ Show patchGroups only.
+
+
+
+
+
+
+
+ Show patch names in render window.
-
+ number_of_elements="1"
+ panel_visibility="default">
- Interpolate volume fields into point fields
+ Interpolate volFields into pointFields.
-
+ number_of_elements="1"
+ panel_visibility="default">
- Extrapolate internalField to non-constraint patches
+ Extrapolate internalField to non-constraint patches.
+
+
+
+
+
+
+
+ Force reader GUI update.
-
+ number_of_elements="1"
+ panel_visibility="default">
Use vtkPolyhedron instead of decomposing polyhedra.
-
-
+
-
- Search the polyMesh/sets/ directory
-
-
-
-
-
-
-
- ZoneMesh information is used to find {cell,face,point}Zones.
- The polyMesh/ directory is only checked on startup.
-
-
-
-
-
-
+ panel_visibility="default">
- Show patch names in render window
-
-
-
-
-
-
-
- Show groups only
-
-
-
-
-
-
-
- A simple way to cause a reader GUI modification.
+ Cache the fvMesh in memory.
@@ -191,7 +185,7 @@
information_only="1">
-
+ information_property="PartArrayStatus">
- This property contains a list of the mesh parts
- (patches, groups, sets, zones).
+ The list of mesh parts (patches, groups, sets, zones).
@@ -218,7 +210,7 @@
information_only="1">
-
+ information_property="VolFieldArrayStatus">
-
- This property contains a list of the volume fields
-
+ The list of volume fields.
@@ -244,7 +233,7 @@
information_only="1">
-
+ information_property="LagrangianFieldArrayStatus">
-
- This property contains a list of the lagrangian fields
-
+ The list of Lagrangian fields.
@@ -270,7 +256,7 @@
information_only="1">
-
+ information_property="PointFieldArrayStatus">
-
- This property contains a list of the point fields
-
+ The list of point fields.
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/pqFoamReaderControls.cxx b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/pqFoamReaderControls.cxx
new file mode 100644
index 0000000000..95c3002d74
--- /dev/null
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/pqFoamReaderControls.cxx
@@ -0,0 +1,364 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration |
+ \\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
+ \\/ M anipulation |
+-------------------------------------------------------------------------------
+License
+ This file is part of OpenFOAM.
+
+ OpenFOAM is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with OpenFOAM. If not, see .
+
+\*---------------------------------------------------------------------------*/
+
+#include "pqFoamReaderControls.h"
+
+#include
+#include
+#include
+#include
+
+#include "pqApplicationCore.h"
+#include "pqPipelineRepresentation.h"
+#include "pqView.h"
+#include "vtkSMDocumentation.h"
+#include "vtkSMIntVectorProperty.h"
+#include "vtkSMPropertyGroup.h"
+#include "vtkSMSourceProxy.h"
+
+
+// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
+
+// file-scope
+static QAbstractButton* setButtonProperties
+(
+ QAbstractButton* b,
+ vtkSMIntVectorProperty* prop,
+ bool initChecked = true
+)
+{
+ QString tip;
+
+ vtkSMDocumentation* doc = prop->GetDocumentation();
+ if (doc)
+ {
+ const char* txt = doc->GetDescription();
+ if (txt)
+ {
+ tip = QString(txt).simplified();
+ }
+ }
+
+ b->setText(prop->GetXMLLabel());
+ if (tip.size())
+ {
+ b->setToolTip(tip);
+ }
+ b->setFocusPolicy(Qt::NoFocus); // avoid dotted border
+
+ // initial checked state
+ if (initChecked)
+ {
+ b->setChecked(prop->GetElement(0));
+ }
+
+ return b;
+}
+
+
+static vtkSMIntVectorProperty* lookupIntProp
+(
+ vtkSMPropertyGroup* group,
+ const char* name
+)
+{
+ vtkSMProperty* prop = group->GetProperty(name);
+
+ if (prop)
+ {
+ return vtkSMIntVectorProperty::SafeDownCast(prop);
+ }
+
+ return nullptr;
+}
+
+
+// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
+
+void pqFoamReaderControls::updatePartsStatus()
+{
+ vtkSMProperty* prop = this->proxy()->GetProperty("PartArrayStatus");
+ if (prop)
+ {
+ this->proxy()->UpdatePropertyInformation(prop);
+ }
+}
+
+
+void pqFoamReaderControls::updatePartsStatus(bool)
+{
+ updatePartsStatus();
+}
+
+
+// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
+
+void pqFoamReaderControls::refreshPressed()
+{
+ // Update everything
+ refresh_->Modified();
+
+ vtkSMSourceProxy::SafeDownCast(this->proxy())->UpdatePipeline();
+
+ // Update all views
+ pqApplicationCore::instance()->render();
+}
+
+
+void pqFoamReaderControls::cacheMesh(bool checked)
+{
+ cacheMesh_->SetElement(0, checked);
+}
+
+
+void pqFoamReaderControls::showPatchNames(bool checked)
+{
+ showPatchNames_->SetElement(0, checked);
+
+ // update the active view
+ if (this->view())
+ {
+ this->view()->render();
+ }
+ // OR: update all views
+ // pqApplicationCore::instance()->render();
+}
+
+
+void pqFoamReaderControls::showGroupsOnly(bool checked)
+{
+ showGroupsOnly_->SetElement(0, checked);
+ updatePartsStatus();
+}
+
+
+void pqFoamReaderControls::includeSets(bool checked)
+{
+ includeSets_->SetElement(0, checked);
+ updatePartsStatus();
+}
+
+
+void pqFoamReaderControls::includeZones(bool checked)
+{
+ includeZones_->SetElement(0, checked);
+ updatePartsStatus();
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
+
+pqFoamReaderControls::pqFoamReaderControls
+(
+ vtkSMProxy* proxy,
+ vtkSMPropertyGroup* group,
+ QWidget* parent
+)
+:
+ Superclass(proxy, parent),
+ refresh_(lookupIntProp(group, "Refresh")),
+ showPatchNames_(lookupIntProp(group, "ShowPatchNames")),
+ showGroupsOnly_(lookupIntProp(group, "ShowGroupsOnly")),
+ includeSets_(lookupIntProp(group, "IncludeSets")),
+ includeZones_(lookupIntProp(group, "IncludeZones")),
+ cacheMesh_(lookupIntProp(group, "CacheMesh"))
+{
+ typedef vtkSMIntVectorProperty intProp;
+
+ QGridLayout* form = new QGridLayout(this);
+
+ // ROW
+ // ~~~
+ int row = 0;
+
+ if (refresh_)
+ {
+ QPushButton* b = new QPushButton(this);
+ setButtonProperties(b, refresh_, false);
+ form->addWidget(b, row, 0, Qt::AlignLeft);
+
+ connect(b, SIGNAL(clicked()), this, SLOT(refreshPressed()));
+ refresh_->SetImmediateUpdate(true);
+ }
+
+ intProp* zeroTime = lookupIntProp(group, "ZeroTime");
+ if (zeroTime)
+ {
+ QCheckBox* b = new QCheckBox(this);
+ setButtonProperties(b, zeroTime);
+ form->addWidget(b, row, 1, Qt::AlignLeft);
+
+ addPropertyLink(b, "checked", SIGNAL(toggled(bool)), zeroTime);
+ }
+
+ // LINE
+ // ~~~~
+ ++row;
+ {
+ QFrame* hline = new QFrame(this);
+ hline->setFrameStyle(QFrame::HLine | QFrame::Sunken);
+ form->addWidget(hline, row, 0, 1, 4);
+ }
+
+ // ROW
+ // ~~~
+ ++row;
+
+ if (includeSets_)
+ {
+ QCheckBox* b = new QCheckBox(this);
+ setButtonProperties(b, includeSets_);
+ form->addWidget(b, row, 0, Qt::AlignLeft);
+
+ addPropertyLink(b, "checked", SIGNAL(toggled(bool)), includeSets_);
+
+ connect(b, SIGNAL(toggled(bool)), this, SLOT(includeSets(bool)));
+ includeSets_->SetImmediateUpdate(true);
+ }
+
+ if (showGroupsOnly_)
+ {
+ QCheckBox* b = new QCheckBox(this);
+ setButtonProperties(b, showGroupsOnly_);
+ form->addWidget(b, row, 1, Qt::AlignLeft);
+
+ addPropertyLink(b, "checked", SIGNAL(toggled(bool)), showGroupsOnly_);
+
+ connect(b, SIGNAL(toggled(bool)), this, SLOT(showGroupsOnly(bool)));
+ showGroupsOnly_->SetImmediateUpdate(true);
+ }
+
+
+ // ROW
+ // ~~~
+ ++row;
+
+ if (includeZones_)
+ {
+ QCheckBox* b = new QCheckBox(this);
+ setButtonProperties(b, includeZones_);
+ form->addWidget(b, row, 0, Qt::AlignLeft);
+
+ addPropertyLink(b, "checked", SIGNAL(toggled(bool)), includeZones_);
+
+ connect(b, SIGNAL(toggled(bool)), this, SLOT(includeZones(bool)));
+ includeZones_->SetImmediateUpdate(true);
+ }
+
+ if (showPatchNames_)
+ {
+ QCheckBox* b = new QCheckBox(this);
+ setButtonProperties(b, showPatchNames_);
+ form->addWidget(b, row, 1, Qt::AlignLeft);
+
+ connect(b, SIGNAL(toggled(bool)), this, SLOT(showPatchNames(bool)));
+ showPatchNames_->SetImmediateUpdate(true);
+ }
+
+ // LINE
+ // ~~~~
+ ++row;
+ {
+ QFrame* hline = new QFrame(this);
+ hline->setFrameStyle(QFrame::HLine | QFrame::Sunken);
+ form->addWidget(hline, row, 0, 1, 4);
+ }
+
+ // ROW
+ // ~~~
+ ++row;
+
+ intProp* interpolate = lookupIntProp(group, "InterpolateFields");
+ if (interpolate)
+ {
+ QCheckBox* b = new QCheckBox(this);
+ setButtonProperties(b, interpolate);
+ form->addWidget(b, row, 0, Qt::AlignLeft);
+
+ addPropertyLink(b, "checked", SIGNAL(toggled(bool)), interpolate);
+ }
+
+ intProp* extrapolate = lookupIntProp(group, "ExtrapolatePatches");
+ if (extrapolate)
+ {
+ QCheckBox* b = new QCheckBox(this);
+ setButtonProperties(b, extrapolate);
+ form->addWidget(b, row, 1, Qt::AlignLeft);
+
+ addPropertyLink(b, "checked", SIGNAL(toggled(bool)), extrapolate);
+ }
+
+ // LINE
+ // ~~~~
+ ++row;
+ {
+ QFrame* hline = new QFrame(this);
+ hline->setFrameStyle(QFrame::HLine | QFrame::Sunken);
+ form->addWidget(hline, row, 0, 1, 4);
+ }
+
+ // ROW
+ // ~~~
+ ++row;
+
+ intProp* updateGui = lookupIntProp(group, "UpdateGUI");
+ if (updateGui)
+ {
+ QPushButton* b = new QPushButton(this);
+ setButtonProperties(b, updateGui, false);
+ form->addWidget(b, row, 0, Qt::AlignLeft);
+
+ addPropertyLink(b, "checked", SIGNAL(clicked()), updateGui);
+ }
+
+ intProp* usePolyhedron = lookupIntProp(group, "UseVTKPolyhedron");
+ if (usePolyhedron)
+ {
+ QCheckBox* b = new QCheckBox(this);
+ setButtonProperties(b, usePolyhedron);
+ form->addWidget(b, row, 1, Qt::AlignLeft);
+
+ addPropertyLink(b, "checked", SIGNAL(toggled(bool)), usePolyhedron);
+ }
+
+ if (cacheMesh_)
+ {
+ QCheckBox* b = new QCheckBox(this);
+ setButtonProperties(b, cacheMesh_);
+ form->addWidget(b, row, 2, Qt::AlignLeft);
+
+ connect(b, SIGNAL(toggled(bool)), this, SLOT(cacheMesh(bool)));
+ cacheMesh_->SetImmediateUpdate(true);
+ }
+}
+
+
+// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
+
+pqFoamReaderControls::~pqFoamReaderControls()
+{}
+
+
+// ************************************************************************* //
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/pqFoamReaderControls.h b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/pqFoamReaderControls.h
new file mode 100644
index 0000000000..dd958f5e8c
--- /dev/null
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/pqFoamReaderControls.h
@@ -0,0 +1,118 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration |
+ \\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
+ \\/ M anipulation |
+-------------------------------------------------------------------------------
+License
+ This file is part of OpenFOAM.
+
+ OpenFOAM is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with OpenFOAM. If not, see .
+
+Class
+ pqFoamReaderControls
+
+Description
+ A custom property group widget for the PVFoamReader.
+
+SourceFiles
+ pqFoamReaderControls.cxx
+
+\*---------------------------------------------------------------------------*/
+#ifndef pqFoamReaderControls_h
+#define pqFoamReaderControls_h
+
+#include "pqPropertyWidget.h"
+
+// Forward declarations
+class vtkSMIntVectorProperty;
+
+
+/*---------------------------------------------------------------------------*\
+ Class pqFoamReaderControls Declaration
+\*---------------------------------------------------------------------------*/
+
+class pqFoamReaderControls
+:
+ public pqPropertyWidget
+{
+ Q_OBJECT;
+ typedef pqPropertyWidget Superclass;
+
+ // Private data
+
+ //- Refresh (bool property - as push button)
+ vtkSMIntVectorProperty* refresh_;
+
+ //- Show Patch Names (bool property)
+ vtkSMIntVectorProperty* showPatchNames_;
+
+ //- Show Groups Only (bool property)
+ vtkSMIntVectorProperty* showGroupsOnly_;
+
+ //- IncludeSets (bool property)
+ vtkSMIntVectorProperty* includeSets_;
+
+ //- IncludeZones (bool property)
+ vtkSMIntVectorProperty* includeZones_;
+
+ //- CacheMesh (bool property)
+ vtkSMIntVectorProperty* cacheMesh_;
+
+
+private slots:
+
+ // Private Member Functions
+
+ //- Update "PartArrayStatus" property information
+ void updatePartsStatus();
+
+ //- Update "PartArrayStatus" property information
+ void updatePartsStatus(bool unused);
+
+
+protected slots:
+
+ // Protected Member Functions
+
+ void refreshPressed();
+ void cacheMesh(bool checked);
+ void showPatchNames(bool checked);
+ void showGroupsOnly(bool checked);
+ void includeSets(bool checked);
+ void includeZones(bool checked);
+
+
+public:
+
+ //- Construct from components
+ pqFoamReaderControls
+ (
+ vtkSMProxy* proxy,
+ vtkSMPropertyGroup* group,
+ QWidget* parent = nullptr
+ );
+
+ //- Destructor
+ virtual ~pqFoamReaderControls();
+
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/pqPVFoamReaderPanel.cxx b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/pqPVFoamReaderPanel.cxx
deleted file mode 100644
index 521068d409..0000000000
--- a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/pqPVFoamReaderPanel.cxx
+++ /dev/null
@@ -1,485 +0,0 @@
-/*---------------------------------------------------------------------------*\
- ========= |
- \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
- \\ / O peration |
- \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
- \\/ M anipulation |
--------------------------------------------------------------------------------
-License
- This file is part of OpenFOAM.
-
- OpenFOAM is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- for more details.
-
- You should have received a copy of the GNU General Public License
- along with OpenFOAM. If not, see .
-
-\*---------------------------------------------------------------------------*/
-
-#include "pqPVFoamReaderPanel.h"
-
-// QT
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-// Paraview <-> QT UI
-#include "pqAnimationScene.h"
-#include "pqApplicationCore.h"
-#include "pqPipelineRepresentation.h"
-#include "pqServerManagerModel.h"
-#include "pqView.h"
-
-// Paraview Server Manager
-#include "vtkSMDoubleVectorProperty.h"
-#include "vtkSMIntVectorProperty.h"
-#include "vtkSMProperty.h"
-#include "vtkSMSourceProxy.h"
-
-
-// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
-
-pqPVFoamReaderPanel::pqPVFoamReaderPanel
-(
- pqProxy *proxy,
- QWidget *p
-)
-:
- pqAutoGeneratedObjectPanel(proxy, p)
-{
- // create first sublayout (at top of the panel)
- QGridLayout* form = new QGridLayout();
- this->PanelLayout->addLayout(form, 0, 0, 1, -1);
-
- // ROW 0
- // ~~~~~
-
- vtkSMProperty* prop = 0;
-
- // refresh button for updating times/fields
- if ((prop = this->proxy()->GetProperty("UiRefresh")) != 0)
- {
- prop->SetImmediateUpdate(1);
- QPushButton* refresh = new QPushButton("Refresh Times");
- refresh->setToolTip("Rescan for updated times/fields.");
-
- form->addWidget(refresh, 0, 0, Qt::AlignLeft);
- QObject::connect
- (
- refresh,
- SIGNAL(clicked()),
- this,
- SLOT(RefreshPressed())
- );
- }
-
- // checkbox for skip zeroTime
- if ((prop = this->proxy()->GetProperty("UiZeroTime")) != 0)
- {
- // immediate update on the Server Manager side
- prop->SetImmediateUpdate(true);
-
- ZeroTime_ = new QCheckBox("Skip Zero Time");
- ZeroTime_->setChecked
- (
- vtkSMIntVectorProperty::SafeDownCast(prop)->GetElement(0)
- );
- ZeroTime_->setToolTip
- (
- "Skip including the 0/ time directory."
- );
-
- form->addWidget(ZeroTime_, 0, 1, Qt::AlignLeft);
- connect
- (
- ZeroTime_,
- SIGNAL(stateChanged(int)),
- this,
- SLOT(ZeroTimeToggled())
- );
- }
-
- // 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)
- {
- // immediate update on the Server Manager side
- prop->SetImmediateUpdate(true);
-
- CacheMesh_ = new QCheckBox("Cache Mesh");
- CacheMesh_->setChecked
- (
- vtkSMIntVectorProperty::SafeDownCast(prop)->GetElement(0)
- );
- CacheMesh_->setToolTip
- (
- "Cache the fvMesh in memory."
- );
-
- form->addWidget(CacheMesh_, 2, 0, Qt::AlignLeft);
- connect
- (
- CacheMesh_,
- SIGNAL(stateChanged(int)),
- this,
- SLOT(CacheMeshToggled())
- );
- }
-
- // cell 2,1 empty
-
- // ROW 3
- // ~~~~~
-
- // checkbox for include sets
- if ((prop = this->proxy()->GetProperty("UiIncludeSets")) != 0)
- {
- // immediate update on the Server Manager side
- prop->SetImmediateUpdate(true);
-
- IncludeSets_ = new QCheckBox("Include Sets");
- IncludeSets_->setChecked
- (
- vtkSMIntVectorProperty::SafeDownCast(prop)->GetElement(0)
- );
- IncludeSets_->setToolTip
- (
- "Search the polyMesh/sets/ directory."
- );
-
- // row/col 1,0
- form->addWidget(IncludeSets_, 3, 0, Qt::AlignLeft);
- connect
- (
- IncludeSets_,
- SIGNAL(stateChanged(int)),
- this,
- SLOT(IncludeSetsToggled())
- );
- }
-
- // checkbox for Groups Only
- if ((prop = this->proxy()->GetProperty("UiShowGroupsOnly")) != 0)
- {
- // immediate update on the Server Manager side
- prop->SetImmediateUpdate(true);
-
- ShowGroupsOnly_ = new QCheckBox("Groups Only");
- ShowGroupsOnly_->setChecked
- (
- vtkSMIntVectorProperty::SafeDownCast(prop)->GetElement(0)
- );
- ShowGroupsOnly_->setToolTip
- (
- "Show patchGroups only."
- );
-
- // row/col 2, 2
- form->addWidget(ShowGroupsOnly_, 3, 1, Qt::AlignLeft);
- connect
- (
- ShowGroupsOnly_,
- SIGNAL(stateChanged(int)),
- this,
- SLOT(ShowGroupsOnlyToggled())
- );
- }
-
-
- // ROW 4
- // ~~~~~
-
- // checkbox for include zones
- if ((prop = this->proxy()->GetProperty("UiIncludeZones")) != 0)
- {
- // immediate update on the Server Manager side
- prop->SetImmediateUpdate(true);
-
- IncludeZones_ = new QCheckBox("Include Zones");
- IncludeZones_->setChecked
- (
- vtkSMIntVectorProperty::SafeDownCast(prop)->GetElement(0)
- );
- IncludeZones_->setToolTip
- (
- "ZoneMesh information is used to find {cell,face,point}Zones. "
- "The polyMesh/ directory is only checked on startup."
- );
-
- // row/col 1,1
- form->addWidget(IncludeZones_, 4, 0, Qt::AlignLeft);
- connect
- (
- IncludeZones_,
- SIGNAL(stateChanged(int)),
- this,
- SLOT(IncludeZonesToggled())
- );
- }
-
- // checkbox for patch names
- if ((prop = this->proxy()->GetProperty("UiShowPatchNames")) != 0)
- {
- // immediate update on the Server Manager side
- prop->SetImmediateUpdate(true);
-
- ShowPatchNames_ = new QCheckBox("Patch Names");
- ShowPatchNames_->setChecked
- (
- vtkSMIntVectorProperty::SafeDownCast(prop)->GetElement(0)
- );
- ShowPatchNames_->setToolTip
- (
- "Show patch names in render window."
- );
-
- // row/col 0,1
- form->addWidget(ShowPatchNames_, 4, 1, Qt::AlignLeft);
- connect
- (
- ShowPatchNames_,
- SIGNAL(stateChanged(int)),
- this,
- 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)
- {
- // immediate update on the Server Manager side
- prop->SetImmediateUpdate(true);
-
- InterpolateVolFields_ = new QCheckBox("Interpolate volFields");
- InterpolateVolFields_->setChecked
- (
- vtkSMIntVectorProperty::SafeDownCast(prop)->GetElement(0)
- );
- InterpolateVolFields_->setToolTip
- (
- "Interpolate volFields into pointFields"
- );
-
- // row/col 1,1
- form->addWidget(InterpolateVolFields_, 6, 0, Qt::AlignLeft);
- connect
- (
- InterpolateVolFields_,
- SIGNAL(stateChanged(int)),
- this,
- SLOT(InterpolateVolFieldsToggled())
- );
- }
-
- // checkbox for extrapolate patches
- if ((prop = this->proxy()->GetProperty("UiExtrapolatePatches")) != 0)
- {
- // immediate update on the Server Manager side
- prop->SetImmediateUpdate(true);
-
- ExtrapolatePatches_ = new QCheckBox("Extrapolate Patches");
- ExtrapolatePatches_->setChecked
- (
- vtkSMIntVectorProperty::SafeDownCast(prop)->GetElement(0)
- );
- ExtrapolatePatches_->setToolTip
- (
- "Extrapolate internalField to non-constraint patches"
- );
-
- // row/col 1,1
- form->addWidget(ExtrapolatePatches_, 6, 1, Qt::AlignLeft);
- connect
- (
- ExtrapolatePatches_,
- SIGNAL(stateChanged(int)),
- this,
- SLOT(ExtrapolatePatchesToggled())
- );
- }
-
- // ROW 7
- // ~~~~~
-
- QFrame* hline3 = new QFrame(this);
- hline3->setFrameStyle(QFrame::HLine | QFrame::Sunken);
- 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())
- );
- }
-}
-
-
-// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
-
-void pqPVFoamReaderPanel::CacheMeshToggled()
-{
- vtkSMIntVectorProperty::SafeDownCast
- (
- this->proxy()->GetProperty("UiCacheMesh")
- )->SetElement(0, CacheMesh_->isChecked());
-}
-
-
-void pqPVFoamReaderPanel::RefreshPressed()
-{
- // update everything
- vtkSMIntVectorProperty::SafeDownCast
- (
- this->proxy()->GetProperty("UiRefresh")
- )->Modified();
-
- vtkSMSourceProxy::SafeDownCast(this->proxy())->UpdatePipeline();
-
- // render all views
- pqApplicationCore::instance()->render();
-}
-
-
-void pqPVFoamReaderPanel::ZeroTimeToggled()
-{
- vtkSMIntVectorProperty::SafeDownCast
- (
- this->proxy()->GetProperty("UiZeroTime")
- )->SetElement(0, ZeroTime_->isChecked());
-
- this->setModified();
-}
-
-
-void pqPVFoamReaderPanel::ShowPatchNamesToggled()
-{
- vtkSMIntVectorProperty::SafeDownCast
- (
- this->proxy()->GetProperty("UiShowPatchNames")
- )->SetElement(0, ShowPatchNames_->isChecked());
-
- // update the active view
- if (this->view())
- {
- this->view()->render();
- }
- // OR: update all views
- // pqApplicationCore::instance()->render();
-}
-
-
-void pqPVFoamReaderPanel::ShowGroupsOnlyToggled()
-{
- vtkSMProperty* prop;
-
- vtkSMIntVectorProperty::SafeDownCast
- (
- this->proxy()->GetProperty("UiShowGroupsOnly")
- )->SetElement(0, ShowGroupsOnly_->isChecked());
-
- if ((prop = this->proxy()->GetProperty("PartArrayStatus")) != 0)
- {
- this->proxy()->UpdatePropertyInformation(prop);
- }
-}
-
-
-void pqPVFoamReaderPanel::IncludeSetsToggled()
-{
- vtkSMProperty* prop;
-
- vtkSMIntVectorProperty::SafeDownCast
- (
- this->proxy()->GetProperty("UiIncludeSets")
- )->SetElement(0, IncludeSets_->isChecked());
-
- if ((prop = this->proxy()->GetProperty("PartArrayStatus")) != 0)
- {
- this->proxy()->UpdatePropertyInformation(prop);
- }
-}
-
-
-void pqPVFoamReaderPanel::IncludeZonesToggled()
-{
- vtkSMProperty* prop;
-
- vtkSMIntVectorProperty::SafeDownCast
- (
- this->proxy()->GetProperty("UiIncludeZones")
- )->SetElement(0, IncludeZones_->isChecked());
-
- if ((prop = this->proxy()->GetProperty("PartArrayStatus")) != 0)
- {
- this->proxy()->UpdatePropertyInformation(prop);
- }
-}
-
-
-void pqPVFoamReaderPanel::ExtrapolatePatchesToggled()
-{
- vtkSMProperty* prop;
-
- vtkSMIntVectorProperty::SafeDownCast
- (
- this->proxy()->GetProperty("UiExtrapolatePatches")
- )->SetElement(0, ExtrapolatePatches_->isChecked());
-
- this->setModified();
-}
-
-
-void pqPVFoamReaderPanel::InterpolateVolFieldsToggled()
-{
- vtkSMProperty* prop;
-
- vtkSMIntVectorProperty::SafeDownCast
- (
- this->proxy()->GetProperty("UiInterpolateVolFields")
- )->SetElement(0, InterpolateVolFields_->isChecked());
-
- this->setModified();
-}
-
-
-// ************************************************************************* //
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/pqPVFoamReaderPanel.h b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/pqPVFoamReaderPanel.h
deleted file mode 100644
index 6ca0f3f7a5..0000000000
--- a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/pqPVFoamReaderPanel.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/*---------------------------------------------------------------------------*\
- ========= |
- \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
- \\ / O peration |
- \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
- \\/ M anipulation |
--------------------------------------------------------------------------------
-License
- This file is part of OpenFOAM.
-
- OpenFOAM is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- for more details.
-
- You should have received a copy of the GNU General Public License
- along with OpenFOAM. If not, see .
-
-Class
- pqPVFoamReaderPanel
-
-Description
- GUI modifications for the ParaView reader panel
-
- A custom panel for the PVFoamReader.
-
-SourceFiles
- pqPVFoamReaderPanel.cxx
-
-\*---------------------------------------------------------------------------*/
-#ifndef pqPVFoamReaderPanel_h
-#define pqPVFoamReaderPanel_h
-
-
-#include "pqAutoGeneratedObjectPanel.h"
-
-// Forward declaration of QT classes
-
-class QCheckBox;
-class QLineEdit;
-class QTimer;
-class QToolButton;
-
-// Forward declaration of ParaView classes
-class vtkSMSourceProxy;
-
-
-/*---------------------------------------------------------------------------*\
- Class pqPVFoamReaderPanel Declaration
-\*---------------------------------------------------------------------------*/
-
-class pqPVFoamReaderPanel
-:
- public pqAutoGeneratedObjectPanel
-{
- // Private data
- Q_OBJECT;
- typedef pqAutoGeneratedObjectPanel Superclass;
-
- //- ZeroTime checkbox
- QCheckBox* ZeroTime_;
-
- //- CacheMesh checkbox
- QCheckBox* CacheMesh_;
-
- //- Show Patch Names checkbox
- QCheckBox* ShowPatchNames_;
-
- //- Show Groups Only checkbox
- QCheckBox* ShowGroupsOnly_;
-
- //- IncludeSets checkbox
- QCheckBox* IncludeSets_;
-
- //- IncludeZones checkbox
- QCheckBox* IncludeZones_;
-
- //- InterpolateVolFields checkbox
- QCheckBox* InterpolateVolFields_;
-
- //- ExtrapolatePatches checkbox
- QCheckBox* ExtrapolatePatches_;
-
-
-protected slots:
-
- void CacheMeshToggled();
- void ZeroTimeToggled();
- void RefreshPressed();
- void ShowPatchNamesToggled();
- void ShowGroupsOnlyToggled();
- void IncludeSetsToggled();
- void IncludeZonesToggled();
- void InterpolateVolFieldsToggled();
- void ExtrapolatePatchesToggled();
-
-
-public:
-
- // Constructors
-
- //- Construct from components
- pqPVFoamReaderPanel(pqProxy*, QWidget*);
-};
-
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/vtkPVFoamReader.cxx b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/vtkPVFoamReader.cxx
index 6b539c5a68..d8af0bfea7 100644
--- a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/vtkPVFoamReader.cxx
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/vtkPVFoamReader.cxx
@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
- \\/ M anipulation |
+ \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@@ -76,19 +76,19 @@ vtkPVFoamReader::vtkPVFoamReader()
TimeStepRange[0] = 0;
TimeStepRange[1] = 0;
- CacheMesh = 1;
- Refresh = 0;
+ CacheMesh = true;
+ Refresh = false;
- SkipZeroTime = 0;
- ExtrapolatePatches = 0;
- UseVTKPolyhedron = 0;
- IncludeSets = 0;
- IncludeZones = 0;
- ShowPatchNames = 0;
- ShowGroupsOnly = 0;
- InterpolateVolFields = 1;
+ SkipZeroTime = false;
+ ExtrapolatePatches = false;
+ UseVTKPolyhedron = false;
+ IncludeSets = false;
+ IncludeZones = false;
+ ShowPatchNames = false;
+ ShowGroupsOnly = false;
+ InterpolateVolFields = true;
- UpdateGUI = 0;
+ UpdateGUI = false;
PartSelection = vtkDataArraySelection::New();
VolFieldSelection = vtkDataArraySelection::New();
@@ -151,10 +151,10 @@ vtkPVFoamReader::~vtkPVFoamReader()
}
- PartSelection->RemoveObserver(this->SelectionObserver);
- VolFieldSelection->RemoveObserver(this->SelectionObserver);
- PointFieldSelection->RemoveObserver(this->SelectionObserver);
- LagrangianFieldSelection->RemoveObserver(this->SelectionObserver);
+ PartSelection->RemoveAllObservers();
+ VolFieldSelection->RemoveAllObservers();
+ PointFieldSelection->RemoveAllObservers();
+ LagrangianFieldSelection->RemoveAllObservers();
SelectionObserver->Delete();
@@ -417,13 +417,13 @@ int vtkPVFoamReader::RequestData
}
-void vtkPVFoamReader::SetRefresh(int val)
+void vtkPVFoamReader::SetRefresh(bool val)
{
Modified();
}
-void vtkPVFoamReader::SetIncludeSets(int val)
+void vtkPVFoamReader::SetIncludeSets(bool val)
{
if (IncludeSets != val)
{
@@ -436,7 +436,7 @@ void vtkPVFoamReader::SetIncludeSets(int val)
}
-void vtkPVFoamReader::SetIncludeZones(int val)
+void vtkPVFoamReader::SetIncludeZones(bool val)
{
if (IncludeZones != val)
{
@@ -449,7 +449,7 @@ void vtkPVFoamReader::SetIncludeZones(int val)
}
-void vtkPVFoamReader::SetShowPatchNames(int val)
+void vtkPVFoamReader::SetShowPatchNames(bool val)
{
if (ShowPatchNames != val)
{
@@ -459,7 +459,7 @@ void vtkPVFoamReader::SetShowPatchNames(int val)
}
-void vtkPVFoamReader::SetShowGroupsOnly(int val)
+void vtkPVFoamReader::SetShowGroupsOnly(bool val)
{
if (ShowGroupsOnly != val)
{
@@ -502,7 +502,7 @@ void vtkPVFoamReader::updatePatchNamesView(const bool show)
);
}
- // use refresh here?
+ // Use refresh here?
}
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/vtkPVFoamReader.h b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/vtkPVFoamReader.h
index d29b80e1ff..74aeedda34 100644
--- a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/vtkPVFoamReader.h
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/vtkPVFoamReader.h
@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
- \\/ M anipulation |
+ \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@@ -79,57 +79,57 @@ public:
// Description:
// OpenFOAM mesh caching control
- vtkSetMacro(CacheMesh, int);
- vtkGetMacro(CacheMesh, int);
+ vtkSetMacro(CacheMesh, bool);
+ vtkGetMacro(CacheMesh, bool);
// Description:
// OpenFOAM refresh times/fields
- virtual void SetRefresh(int);
+ virtual void SetRefresh(bool);
// Description:
// OpenFOAM skip/include the 0/ time directory
- vtkSetMacro(SkipZeroTime, int);
- vtkGetMacro(SkipZeroTime, int);
+ vtkSetMacro(SkipZeroTime, bool);
+ vtkGetMacro(SkipZeroTime, bool);
// Description:
// GUI update control
- vtkSetMacro(UpdateGUI, int);
- vtkGetMacro(UpdateGUI, int);
+ vtkSetMacro(UpdateGUI, bool);
+ vtkGetMacro(UpdateGUI, bool);
// Description:
// OpenFOAM extrapolate internal values onto the patches
- vtkSetMacro(ExtrapolatePatches, int);
- vtkGetMacro(ExtrapolatePatches, int);
+ vtkSetMacro(ExtrapolatePatches, bool);
+ vtkGetMacro(ExtrapolatePatches, bool);
// Description:
// OpenFOAM use vtkPolyhedron instead of decomposing polyhedra
- vtkSetMacro(UseVTKPolyhedron, int);
- vtkGetMacro(UseVTKPolyhedron, int);
+ vtkSetMacro(UseVTKPolyhedron, bool);
+ vtkGetMacro(UseVTKPolyhedron, bool);
// Description:
// OpenFOAM read sets control
- virtual void SetIncludeSets(int);
- vtkGetMacro(IncludeSets, int);
+ virtual void SetIncludeSets(bool);
+ vtkGetMacro(IncludeSets, bool);
// Description:
// OpenFOAM read zones control
- virtual void SetIncludeZones(int);
- vtkGetMacro(IncludeZones, int);
+ virtual void SetIncludeZones(bool);
+ vtkGetMacro(IncludeZones, bool);
// Description:
// OpenFOAM display patch names control
- virtual void SetShowPatchNames(int);
- vtkGetMacro(ShowPatchNames, int);
+ virtual void SetShowPatchNames(bool);
+ vtkGetMacro(ShowPatchNames, bool);
// Description:
// OpenFOAM display patchGroups
- virtual void SetShowGroupsOnly(int);
- vtkGetMacro(ShowGroupsOnly, int);
+ virtual void SetShowGroupsOnly(bool);
+ vtkGetMacro(ShowGroupsOnly, bool);
// Description:
// OpenFOAM volField interpolation
- vtkSetMacro(InterpolateVolFields, int);
- vtkGetMacro(InterpolateVolFields, int);
+ vtkSetMacro(InterpolateVolFields, bool);
+ vtkGetMacro(InterpolateVolFields, bool);
// Description:
// Get the current timestep
@@ -218,29 +218,29 @@ protected:
private:
//- Disallow default bitwise copy construct
- vtkPVFoamReader(const vtkPVFoamReader&);
+ vtkPVFoamReader(const vtkPVFoamReader&) = delete;
//- Disallow default bitwise assignment
- void operator=(const vtkPVFoamReader&);
+ void operator=(const vtkPVFoamReader&) = delete;
//- Add/remove patch names to/from the view
void updatePatchNamesView(const bool show);
int TimeStepRange[2];
- int Refresh;
- int CacheMesh;
- int SkipZeroTime;
+ bool Refresh;
+ bool CacheMesh;
+ bool SkipZeroTime;
- int ExtrapolatePatches;
- int UseVTKPolyhedron;
- int IncludeSets;
- int IncludeZones;
- int ShowPatchNames;
- int ShowGroupsOnly;
- int InterpolateVolFields;
+ bool ExtrapolatePatches;
+ bool UseVTKPolyhedron;
+ bool IncludeSets;
+ bool IncludeZones;
+ bool ShowPatchNames;
+ bool ShowGroupsOnly;
+ bool InterpolateVolFields;
//- Dummy variable/switch to invoke a reader update
- int UpdateGUI;
+ bool UpdateGUI;
vtkDataArraySelection* PartSelection;
vtkDataArraySelection* VolFieldSelection;
@@ -250,9 +250,7 @@ private:
//- Cached data for output port0 (experimental!)
vtkMultiBlockDataSet* output0_;
- //BTX
Foam::vtkPVFoam* foamData_;
- //ETX
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoam.H b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoam.H
index 5fb4b0b0d8..fb3a988b86 100644
--- a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoam.H
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoam.H
@@ -56,11 +56,6 @@ SourceFiles
#ifndef vtkPVFoam_H
#define vtkPVFoam_H
-// do not include legacy strstream headers
-#ifndef VTK_EXCLUDE_STRSTREAM_HEADERS
-# define VTK_EXCLUDE_STRSTREAM_HEADERS
-#endif
-
#include "className.H"
#include "fileName.H"
#include "stringList.H"
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/vtkPVReaders/vtkPVReaders.H b/applications/utilities/postProcessing/graphics/PVReaders/vtkPVReaders/vtkPVReaders.H
index 958668105f..200939c315 100644
--- a/applications/utilities/postProcessing/graphics/PVReaders/vtkPVReaders/vtkPVReaders.H
+++ b/applications/utilities/postProcessing/graphics/PVReaders/vtkPVReaders/vtkPVReaders.H
@@ -36,11 +36,6 @@ SourceFiles
#ifndef vtkPVReaders_H
#define vtkPVReaders_H
-// do not include legacy strstream headers
-#ifndef VTK_EXCLUDE_STRSTREAM_HEADERS
-# define VTK_EXCLUDE_STRSTREAM_HEADERS
-#endif
-
#include "className.H"
#include "fileName.H"
#include "stringList.H"