ENH: update QT interface code for ParaView reader (issue #337)
- remove old (ParaView-3) files - Works in 4.4.0, 5.0.1, 5.2.0 etc STYLE: - slots now use SM properties directly without a second lookup. This reduces exposure of the QT elements and simplifies the coding. - avoid focus borders on the Qt elements - place the "use Polyhedron" checkbox into a column - move "Cache Mesh" down in the GUI (an advanced feature and thus should be less prominent) - obtain button labels/tooltip directly from the XML content
This commit is contained in:
parent
4eb679614c
commit
2c96ec7550
@ -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
|
||||
|
@ -1,5 +0,0 @@
|
||||
<RCC>
|
||||
<qresource prefix="/ParaViewResources" >
|
||||
<file>PVFoamReader.xml</file>
|
||||
</qresource>
|
||||
</RCC>
|
@ -1,7 +0,0 @@
|
||||
<ParaViewReaders>
|
||||
<!-- deprecated with paraview-4.3, use hints in *SM.xml -->
|
||||
<Reader name="PVFoamReader"
|
||||
extensions="OpenFOAM"
|
||||
file_description="OpenFOAM Reader">
|
||||
</Reader>
|
||||
</ParaViewReaders>
|
@ -5,14 +5,14 @@
|
||||
class="vtkPVFoamReader">
|
||||
|
||||
<!-- File name - compulsory -->
|
||||
<StringVectorProperty
|
||||
<StringVectorProperty animateable="0"
|
||||
name="FileName"
|
||||
command="SetFileName"
|
||||
number_of_elements="1"
|
||||
animateable="0">
|
||||
panel_visibility="never">
|
||||
<FileListDomain name="files"/>
|
||||
<Documentation>
|
||||
Specifies the filename for the OpenFOAM Reader.
|
||||
The filename for the OpenFOAM reader module.
|
||||
</Documentation>
|
||||
</StringVectorProperty>
|
||||
|
||||
@ -27,157 +27,151 @@
|
||||
</Documentation>
|
||||
</DoubleVectorProperty>
|
||||
|
||||
<!-- Cache Mesh check-box -->
|
||||
<IntVectorProperty
|
||||
name="UiCacheMesh"
|
||||
command="SetCacheMesh"
|
||||
number_of_elements="1"
|
||||
is_internal="1"
|
||||
default_values="1"
|
||||
animateable="0">
|
||||
<BooleanDomain name="bool"/>
|
||||
<Documentation>
|
||||
Cache the fvMesh in memory.
|
||||
</Documentation>
|
||||
</IntVectorProperty>
|
||||
|
||||
<!-- Refresh button -->
|
||||
<IntVectorProperty
|
||||
name="UiRefresh"
|
||||
<IntVectorProperty animateable="0"
|
||||
name="Refresh"
|
||||
command="SetRefresh"
|
||||
number_of_elements="1"
|
||||
is_internal="0"
|
||||
default_values="0"
|
||||
animateable="0">
|
||||
number_of_elements="1"
|
||||
panel_visibility="default">
|
||||
<BooleanDomain name="bool"/>
|
||||
<Documentation>
|
||||
Rescan for updated timesteps/fields.
|
||||
Rescan for updated times/fields.
|
||||
</Documentation>
|
||||
</IntVectorProperty>
|
||||
|
||||
<!-- Skip Zero Time check-box -->
|
||||
<IntVectorProperty
|
||||
name="UiZeroTime"
|
||||
<IntVectorProperty animateable="0"
|
||||
name="ZeroTime"
|
||||
label="Skip Zero Time"
|
||||
command="SetSkipZeroTime"
|
||||
default_values="1"
|
||||
number_of_elements="1"
|
||||
is_internal="1"
|
||||
default_values="0"
|
||||
animateable="0">
|
||||
panel_visibility="default">
|
||||
<BooleanDomain name="bool"/>
|
||||
<Documentation>
|
||||
Skip including the 0/ time directory
|
||||
Ignore the 0/ time directory.
|
||||
</Documentation>
|
||||
</IntVectorProperty>
|
||||
|
||||
<!-- Include Sets check-box -->
|
||||
<IntVectorProperty animateable="0"
|
||||
name="IncludeSets"
|
||||
command="SetIncludeSets"
|
||||
default_values="0"
|
||||
number_of_elements="1"
|
||||
panel_visibility="default">
|
||||
<BooleanDomain name="bool"/>
|
||||
<Documentation>
|
||||
Search the polyMesh/sets/ directory
|
||||
</Documentation>
|
||||
</IntVectorProperty>
|
||||
|
||||
<!-- Include Zones check-box -->
|
||||
<IntVectorProperty animateable="0"
|
||||
name="IncludeZones"
|
||||
command="SetIncludeZones"
|
||||
default_values="0"
|
||||
number_of_elements="1"
|
||||
panel_visibility="default">
|
||||
<BooleanDomain name="bool"/>
|
||||
<Documentation>
|
||||
ZoneMesh information is used to find {cell,face,point}Zones.
|
||||
The polyMesh/ directory is only checked on startup.
|
||||
</Documentation>
|
||||
</IntVectorProperty>
|
||||
|
||||
<!-- Show Groups Only check-box -->
|
||||
<IntVectorProperty animateable="0"
|
||||
name="ShowGroupsOnly"
|
||||
label="Groups Only"
|
||||
command="SetShowGroupsOnly"
|
||||
default_values="0"
|
||||
number_of_elements="1"
|
||||
panel_visibility="default">
|
||||
<BooleanDomain name="bool"/>
|
||||
<Documentation>
|
||||
Show patchGroups only.
|
||||
</Documentation>
|
||||
</IntVectorProperty>
|
||||
|
||||
<!-- Show Patch Names check-box -->
|
||||
<IntVectorProperty animateable="0"
|
||||
name="ShowPatchNames"
|
||||
label="Patch Names"
|
||||
command="SetShowPatchNames"
|
||||
default_values="0"
|
||||
number_of_elements="1"
|
||||
panel_visibility="default">
|
||||
<BooleanDomain name="bool"/>
|
||||
<Documentation>
|
||||
Show patch names in render window.
|
||||
</Documentation>
|
||||
</IntVectorProperty>
|
||||
|
||||
<!-- Interpolate Fields check-box -->
|
||||
<IntVectorProperty
|
||||
name="UiInterpolateVolFields"
|
||||
<IntVectorProperty animateable="0"
|
||||
name="InterpolateFields"
|
||||
command="SetInterpolateVolFields"
|
||||
number_of_elements="1"
|
||||
is_internal="1"
|
||||
default_values="1"
|
||||
animateable="0">
|
||||
number_of_elements="1"
|
||||
panel_visibility="default">
|
||||
<BooleanDomain name="bool"/>
|
||||
<Documentation>
|
||||
Interpolate volume fields into point fields
|
||||
Interpolate volFields into pointFields.
|
||||
</Documentation>
|
||||
</IntVectorProperty>
|
||||
|
||||
<!-- Extrapolate Patches check-box -->
|
||||
<IntVectorProperty
|
||||
name="UiExtrapolatePatches"
|
||||
<IntVectorProperty animateable="0"
|
||||
name="ExtrapolatePatches"
|
||||
command="SetExtrapolatePatches"
|
||||
number_of_elements="1"
|
||||
is_internal="1"
|
||||
default_values="0"
|
||||
animateable="0">
|
||||
number_of_elements="1"
|
||||
panel_visibility="default">
|
||||
<BooleanDomain name="bool"/>
|
||||
<Documentation>
|
||||
Extrapolate internalField to non-constraint patches
|
||||
Extrapolate internalField to non-constraint patches.
|
||||
</Documentation>
|
||||
</IntVectorProperty>
|
||||
|
||||
<!-- Force GUI update check box -->
|
||||
<IntVectorProperty animateable="0"
|
||||
name="UpdateGUI"
|
||||
command="SetUpdateGUI"
|
||||
default_values="0"
|
||||
number_of_elements="1"
|
||||
panel_visibility="default">
|
||||
<BooleanDomain name="bool"/>
|
||||
<Documentation>
|
||||
Force reader GUI update.
|
||||
</Documentation>
|
||||
</IntVectorProperty>
|
||||
|
||||
<!-- Use VTK Polyhedron check-box -->
|
||||
<IntVectorProperty
|
||||
<IntVectorProperty animateable="0"
|
||||
name="UseVTKPolyhedron"
|
||||
label="Use VTK Polyhedron"
|
||||
command="SetUseVTKPolyhedron"
|
||||
number_of_elements="1"
|
||||
default_values="0"
|
||||
animateable="0">
|
||||
number_of_elements="1"
|
||||
panel_visibility="default">
|
||||
<BooleanDomain name="bool"/>
|
||||
<Documentation>
|
||||
Use vtkPolyhedron instead of decomposing polyhedra.
|
||||
</Documentation>
|
||||
</IntVectorProperty>
|
||||
|
||||
<!-- Include Sets check-box -->
|
||||
<IntVectorProperty
|
||||
name="UiIncludeSets"
|
||||
command="SetIncludeSets"
|
||||
<!-- Cache Mesh check-box -->
|
||||
<IntVectorProperty animateable="0"
|
||||
name="CacheMesh"
|
||||
command="SetCacheMesh"
|
||||
default_values="1"
|
||||
number_of_elements="1"
|
||||
is_internal="1"
|
||||
default_values="0"
|
||||
animateable="0">
|
||||
<Documentation>
|
||||
Search the polyMesh/sets/ directory
|
||||
</Documentation>
|
||||
<BooleanDomain name="bool"/>
|
||||
</IntVectorProperty>
|
||||
|
||||
<!-- Include Zones check-box -->
|
||||
<IntVectorProperty
|
||||
name="UiIncludeZones"
|
||||
command="SetIncludeZones"
|
||||
number_of_elements="1"
|
||||
is_internal="1"
|
||||
default_values="0"
|
||||
animateable="0">
|
||||
<Documentation>
|
||||
ZoneMesh information is used to find {cell,face,point}Zones.
|
||||
The polyMesh/ directory is only checked on startup.
|
||||
</Documentation>
|
||||
<BooleanDomain name="bool"/>
|
||||
</IntVectorProperty>
|
||||
|
||||
<!-- Show Patch Names check-box -->
|
||||
<IntVectorProperty
|
||||
name="UiShowPatchNames"
|
||||
command="SetShowPatchNames"
|
||||
number_of_elements="1"
|
||||
default_values="0"
|
||||
is_internal="1"
|
||||
animateable="0">
|
||||
panel_visibility="default">
|
||||
<BooleanDomain name="bool"/>
|
||||
<Documentation>
|
||||
Show patch names in render window
|
||||
</Documentation>
|
||||
</IntVectorProperty>
|
||||
|
||||
<!-- Show Groups Only check-box -->
|
||||
<IntVectorProperty
|
||||
name="UiShowGroupsOnly"
|
||||
command="SetShowGroupsOnly"
|
||||
number_of_elements="1"
|
||||
default_values="0"
|
||||
is_internal="1"
|
||||
animateable="0">
|
||||
<BooleanDomain name="bool"/>
|
||||
<Documentation>
|
||||
Show groups only
|
||||
</Documentation>
|
||||
</IntVectorProperty>
|
||||
|
||||
<!-- Force GUI update check box -->
|
||||
<IntVectorProperty
|
||||
name="UpdateGUI"
|
||||
command="SetUpdateGUI"
|
||||
number_of_elements="1"
|
||||
is_internal="1"
|
||||
default_values="0"
|
||||
animateable="0">
|
||||
<BooleanDomain name="bool"/>
|
||||
<Documentation>
|
||||
A simple way to cause a reader GUI modification.
|
||||
Cache the fvMesh in memory.
|
||||
</Documentation>
|
||||
</IntVectorProperty>
|
||||
|
||||
@ -191,7 +185,7 @@
|
||||
information_only="1">
|
||||
<ArraySelectionInformationHelper attribute_name="Part"/>
|
||||
</StringVectorProperty>
|
||||
<StringVectorProperty
|
||||
<StringVectorProperty animateable="0"
|
||||
name="PartStatus"
|
||||
label="Mesh Parts"
|
||||
command="SetPartArrayStatus"
|
||||
@ -199,16 +193,14 @@
|
||||
repeat_command="1"
|
||||
number_of_elements_per_command="2"
|
||||
element_types="2 0"
|
||||
information_property="PartArrayStatus"
|
||||
animateable="0">
|
||||
information_property="PartArrayStatus">
|
||||
<ArraySelectionDomain name="array_list">
|
||||
<RequiredProperties>
|
||||
<Property name="PartArrayStatus" function="ArrayList"/>
|
||||
</RequiredProperties>
|
||||
</ArraySelectionDomain>
|
||||
<Documentation>
|
||||
This property contains a list of the mesh parts
|
||||
(patches, groups, sets, zones).
|
||||
The list of mesh parts (patches, groups, sets, zones).
|
||||
</Documentation>
|
||||
</StringVectorProperty>
|
||||
|
||||
@ -218,7 +210,7 @@
|
||||
information_only="1">
|
||||
<ArraySelectionInformationHelper attribute_name="VolField"/>
|
||||
</StringVectorProperty>
|
||||
<StringVectorProperty
|
||||
<StringVectorProperty animateable="0"
|
||||
name="VolFieldStatus"
|
||||
label="Volume Fields"
|
||||
command="SetVolFieldArrayStatus"
|
||||
@ -226,16 +218,13 @@
|
||||
repeat_command="1"
|
||||
number_of_elements_per_command="2"
|
||||
element_types="2 0"
|
||||
information_property="VolFieldArrayStatus"
|
||||
animateable="0">
|
||||
information_property="VolFieldArrayStatus">
|
||||
<ArraySelectionDomain name="array_list">
|
||||
<RequiredProperties>
|
||||
<Property name="VolFieldArrayStatus" function="ArrayList"/>
|
||||
</RequiredProperties>
|
||||
</ArraySelectionDomain>
|
||||
<Documentation>
|
||||
This property contains a list of the volume fields
|
||||
</Documentation>
|
||||
<Documentation>The list of volume fields.</Documentation>
|
||||
</StringVectorProperty>
|
||||
|
||||
<!-- Available Lagrangian fields array -->
|
||||
@ -244,7 +233,7 @@
|
||||
information_only="1">
|
||||
<ArraySelectionInformationHelper attribute_name="LagrangianField"/>
|
||||
</StringVectorProperty>
|
||||
<StringVectorProperty
|
||||
<StringVectorProperty animateable="0"
|
||||
name="LagrangianFieldStatus"
|
||||
label="Lagrangian Fields"
|
||||
command="SetLagrangianFieldArrayStatus"
|
||||
@ -252,16 +241,13 @@
|
||||
repeat_command="1"
|
||||
number_of_elements_per_command="2"
|
||||
element_types="2 0"
|
||||
information_property="LagrangianFieldArrayStatus"
|
||||
animateable="0">
|
||||
information_property="LagrangianFieldArrayStatus">
|
||||
<ArraySelectionDomain name="array_list">
|
||||
<RequiredProperties>
|
||||
<Property name="LagrangianFieldArrayStatus" function="ArrayList"/>
|
||||
</RequiredProperties>
|
||||
</ArraySelectionDomain>
|
||||
<Documentation>
|
||||
This property contains a list of the lagrangian fields
|
||||
</Documentation>
|
||||
<Documentation>The list of Lagrangian fields.</Documentation>
|
||||
</StringVectorProperty>
|
||||
|
||||
<!-- Available pointFields array -->
|
||||
@ -270,7 +256,7 @@
|
||||
information_only="1">
|
||||
<ArraySelectionInformationHelper attribute_name="PointField"/>
|
||||
</StringVectorProperty>
|
||||
<StringVectorProperty
|
||||
<StringVectorProperty animateable="0"
|
||||
name="PointFieldStatus"
|
||||
label="Point Fields"
|
||||
command="SetPointFieldArrayStatus"
|
||||
@ -278,31 +264,50 @@
|
||||
repeat_command="1"
|
||||
number_of_elements_per_command="2"
|
||||
element_types="2 0"
|
||||
information_property="PointFieldArrayStatus"
|
||||
animateable="0">
|
||||
information_property="PointFieldArrayStatus">
|
||||
<ArraySelectionDomain name="array_list">
|
||||
<RequiredProperties>
|
||||
<Property name="PointFieldArrayStatus" function="ArrayList"/>
|
||||
</RequiredProperties>
|
||||
</ArraySelectionDomain>
|
||||
<Documentation>
|
||||
This property contains a list of the point fields
|
||||
</Documentation>
|
||||
<Documentation>The list of point fields.</Documentation>
|
||||
</StringVectorProperty>
|
||||
|
||||
<Hints>
|
||||
<Property name="FileName" show="0"/>
|
||||
<Property name="UiCacheMesh" show="0"/>
|
||||
<Property name="UiZeroTime" show="0"/>
|
||||
<Property name="UiRefresh" show="0"/>
|
||||
<Property name="UiShowPatchNames" show="0"/>
|
||||
<Property name="UiShowGroupsOnly" show="0"/>
|
||||
<Property name="UiIncludeSets" show="0"/>
|
||||
<Property name="UiIncludeZones" show="0"/>
|
||||
<ReaderFactory extensions="OpenFOAM"
|
||||
file_description="OpenFOAM"/>
|
||||
<ReaderFactory
|
||||
extensions="OpenFOAM"
|
||||
file_description="OpenFOAM reader module" />
|
||||
</Hints>
|
||||
|
||||
<PropertyGroup
|
||||
label="General Controls"
|
||||
panel_widget="openfoam_reader_general_controls">
|
||||
<Property name="Refresh"/>
|
||||
<Property name="ZeroTime"/>
|
||||
<Property name="IncludeSets"/>
|
||||
<Property name="IncludeZones"/>
|
||||
<Property name="InterpolateFields"/>
|
||||
<Property name="ExtrapolatePatches"/>
|
||||
<Property name="ShowGroupsOnly"/>
|
||||
<Property name="ShowPatchNames"/>
|
||||
<Property name="UpdateGUI"/>
|
||||
<Property name="UseVTKPolyhedron"/>
|
||||
<Property name="CacheMesh"/>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup label="Parts">
|
||||
<Property name="PartArrayStatus"/>
|
||||
<Property name="PartStatus"/>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup label="Fields">
|
||||
<Property name="VolFieldArrayStatus"/>
|
||||
<Property name="VolFieldStatus"/>
|
||||
<Property name="LagrangianFieldArrayStatus"/>
|
||||
<Property name="LagrangianFieldStatus"/>
|
||||
<Property name="PointFieldArrayStatus"/>
|
||||
<Property name="PointFieldStatus"/>
|
||||
</PropertyGroup>
|
||||
|
||||
</SourceProxy>
|
||||
</ProxyGroup>
|
||||
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "pqFoamReaderControls.h"
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QFrame>
|
||||
#include <QGridLayout>
|
||||
#include <QPushButton>
|
||||
|
||||
#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()
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
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
|
||||
|
||||
// ************************************************************************* //
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "pqPVFoamReaderPanel.h"
|
||||
|
||||
// QT
|
||||
#include <QGridLayout>
|
||||
#include <QCheckBox>
|
||||
#include <QLabel>
|
||||
#include <QLayout>
|
||||
#include <QString>
|
||||
#include <QPushButton>
|
||||
#include <QtDebug>
|
||||
|
||||
// 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();
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
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
|
||||
|
||||
// ************************************************************************* //
|
@ -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?
|
||||
}
|
||||
|
||||
|
||||
|
@ -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
|
||||
};
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user