Commit 7b6547ba 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 26c322ca
......@@ -2,6 +2,9 @@
cd ${0%/*} || exit 1 # run from this directory
set -x
# deal with client/server vs combined plugins
rm -f $FOAM_LIBBIN/libPV3FoamReader* 2>/dev/null
rm -rf PV3FoamReader/Make
wclean libso vtkPV3Foam
......
......@@ -7,7 +7,7 @@
# the pqReader.xml file contains xml defining readers with their
# file extensions and descriptions.
cmake_minimum_required(VERSION 2.4)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
FIND_PACKAGE(ParaView REQUIRED)
INCLUDE(${PARAVIEW_USE_FILE})
......@@ -33,19 +33,45 @@ SET(
"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(
PV3FoamReader_SM "1.0"
SERVER_MANAGER_XML PV3FoamReader_SM.xml
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(
PV3FoamReader
"1.0"
GUI_RESOURCES PV3FoamReader.qrc
)
# #
# # Define the server-side portion of the reader plugin
# #
# ADD_PARAVIEW_PLUGIN(
# 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(
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()
{
vtkDebugMacro(<<"Deconstructor");
delete foamData_;
if (foamData_)
{
// remove patch names
updatePatchNamesView(false);
delete foamData_;
}
if (FileName)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment