Skip to content
Snippets Groups Projects
Commit c57262c2 authored by Mark Olesen's avatar Mark Olesen
Browse files

Cleanup/fixup paraview readers

- remove patch/point text labels upon deletion

- combined client/server plugin instead of separate .so files
  first experiment with adding panel decorations

- directory reorganization
parent 08fb4d58
Branches
Tags
No related merge requests found
Showing
with 77 additions and 9 deletions
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
cd ${0%/*} || exit 1 # run from this directory cd ${0%/*} || exit 1 # run from this directory
set -x set -x
# deal with client/server vs combined plugins
rm -f $FOAM_LIBBIN/libPV3FoamReader* 2>/dev/null
rm -rf PV3FoamReader/Make rm -rf PV3FoamReader/Make
wclean libso vtkPV3Foam wclean libso vtkPV3Foam
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# the pqReader.xml file contains xml defining readers with their # the pqReader.xml file contains xml defining readers with their
# file extensions and descriptions. # file extensions and descriptions.
cmake_minimum_required(VERSION 2.4) CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
FIND_PACKAGE(ParaView REQUIRED) FIND_PACKAGE(ParaView REQUIRED)
INCLUDE(${PARAVIEW_USE_FILE}) INCLUDE(${PARAVIEW_USE_FILE})
...@@ -33,19 +33,45 @@ SET( ...@@ -33,19 +33,45 @@ SET(
"Single output directory for building all libraries." "Single output directory for building all libraries."
) )
# Build the server-side plugin
#
# Defined combined plugin
#
# Extend the auto-generated panel
QT4_WRAP_CPP(MOC_SRCS pqPV3FoamReaderPanel.h)
ADD_PARAVIEW_OBJECT_PANEL(IFACES IFACE_SRCS
CLASS_NAME pqPV3FoamReaderPanel
XML_NAME PV3FoamReader # name of SourceProxy in *SM.xml
XML_GROUP sources
)
ADD_PARAVIEW_PLUGIN( ADD_PARAVIEW_PLUGIN(
PV3FoamReader_SM "1.0" PV3FoamReader_SM "1.0"
SERVER_MANAGER_XML PV3FoamReader_SM.xml SERVER_MANAGER_XML PV3FoamReader_SM.xml
SERVER_MANAGER_SOURCES vtkPV3FoamReader.cxx SERVER_MANAGER_SOURCES vtkPV3FoamReader.cxx
GUI_INTERFACES ${IFACES}
GUI_SOURCES ${MOC_SRCS} ${UI_SRCS} ${IFACE_SRCS}
GUI_RESOURCE_FILES PV3FoamReader.xml
) )
# Build the client-side plugin # #
ADD_PARAVIEW_PLUGIN( # # Define the server-side portion of the reader plugin
PV3FoamReader # #
"1.0" # ADD_PARAVIEW_PLUGIN(
GUI_RESOURCES PV3FoamReader.qrc # PV3FoamReader_SM "1.0"
) # SERVER_MANAGER_XML PV3FoamReader_SM.xml
# SERVER_MANAGER_SOURCES vtkPV3FoamReader.cxx
# )
# #
# # Define the client-side portion of the reader plugin
# #
# ADD_PARAVIEW_PLUGIN(
# PV3FoamReader "1.0"
# GUI_RESOURCES PV3FoamReader.qrc
# )
#
TARGET_LINK_LIBRARIES( TARGET_LINK_LIBRARIES(
PV3FoamReader_SM PV3FoamReader_SM
......
#ifndef __pqPV3FoamReaderPanel_h
#define __pqPV3FoamReaderPanel_h
#include "pqAutoGeneratedObjectPanel.h"
#include <QLabel>
#include <QLayout>
//
// Custom panel for PV3FoamReader source.
//
class pqPV3FoamReaderPanel
:
public pqAutoGeneratedObjectPanel
{
Q_OBJECT;
typedef pqAutoGeneratedObjectPanel Superclass;
public:
pqPV3FoamReaderPanel(pqProxy *proxy, QWidget *p)
:
pqAutoGeneratedObjectPanel(proxy, p)
{
this->layout()->addWidget
(
new QLabel("Plugin for reading OpenFOAM meshes/results", this)
);
}
//virtual ~pqPV3FoamReaderPanel();
protected:
};
#endif //__pqPV3FoamReaderPanel_h
...@@ -113,7 +113,12 @@ vtkPV3FoamReader::~vtkPV3FoamReader() ...@@ -113,7 +113,12 @@ vtkPV3FoamReader::~vtkPV3FoamReader()
{ {
vtkDebugMacro(<<"Deconstructor"); vtkDebugMacro(<<"Deconstructor");
delete foamData_; if (foamData_)
{
// remove patch names
updatePatchNamesView(false);
delete foamData_;
}
if (FileName) if (FileName)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment