Hello List,

I have downloaded the ParaView-3.4.0 source and have a good build.

I have a custom reader and a custom object panel for the reader, and all is 
working well.

I also have a custom filter to operate on the reader's output, and it too is 
working well.

Last, I have a custom object panel for the filter; it inherits, for now, from 
pqNamedObjectPanel.
I can build it, (generate the .so) and load it into paraview (it is in the 
Plugin Manager / Local Plugins list).
But my plugin's object panel is not being called.  I get paraview's auto 
generated panel instead.  My panel's constructor is not getting called.

I found a similar post from 7/2008, but no resolution...

<http://www.paraview.org/pipermail/paraview/2008-July/008787.html>

The filter's xml file, the CMakeLists.txt, and panel source code are below.  
Anyone have a hint what I am missing or did wrong?

Thanks, Chris

PBSIMWarpFilter.xml:

<ServerManagerConfiguration>
  <ProxyGroup name="filters">
    <!-- Beginning of PBSIMWarpFilter -->
    <SourceProxy name="PBSIMWarpFilter" 
                 class="vtkPBSIMWarpFilter"
                 label="PBSIMWarpFilter">
      <InputProperty
        name="Input"
        command="SetInputConnection">
      </InputProperty>      
      <StringVectorProperty name="RailInfo"
                            command="GetRails" 
                            information_only="1"> 
        <StringArrayHelper/>
      </StringVectorProperty>      
      <StringVectorProperty  name="SelectRail"
                             command="SetActiveRail" 
                             number_of_elements="1" 
                             element_types="2" 
                             animateable="0">
        <StringListDomain name="AvailableRails">
          <RequiredProperties>
            <Property name="RailInfo" function="ArraySelection"/>
          </RequiredProperties>
        </StringListDomain>
      </StringVectorProperty>      
      <DoubleVectorProperty 
        name="Scale"
        command="SetScale"
        number_of_elements="1"
        default_values="250.0">
      </DoubleVectorProperty>      
    </SourceProxy>
    <!-- End of PBSIMWarpFilter -->
  </ProxyGroup>
</ServerManagerConfiguration>

CMakeLists.txt:

cmake_minimum_required(VERSION 2.6)

FIND_PACKAGE(ParaView REQUIRED)
INCLUDE(${PARAVIEW_USE_FILE})

#server-side...
ADD_PARAVIEW_PLUGIN(PBSIMReader "1.0"
  SERVER_MANAGER_XML PBSIMSM.xml
  SERVER_MANAGER_SOURCES vtkPBSIMReader.cxx vtkPBSIMParser.cxx )
  
ADD_PARAVIEW_PLUGIN(PBSIMWarpFilter "1.0"
  SERVER_MANAGER_XML PBSIMWarpFilter.xml
  SERVER_MANAGER_SOURCES vtkPBSIMWarpFilter.cxx )
  
#client-side...
ADD_PARAVIEW_PLUGIN(PBSIMReaderGUI "1.0"
  GUI_RESOURCES PBSIMQT.qrc )

QT4_WRAP_CPP(MOC_1_SRCS pqPBSIMObjectPanel.h)

ADD_PARAVIEW_OBJECT_PANEL(
  IFACES_1 IFACE_1_SRCS
  CLASS_NAME pqPBSIMObjectPanel
  XML_NAME PBSIMReader XML_GROUP sources)
  
ADD_PARAVIEW_PLUGIN(PBSIMObjectPanel "1.0"
  GUI_INTERFACES ${IFACES_1}
  GUI_SOURCES pqPBSIMObjectPanel.cxx ${MOC_1_SRCS} ${IFACE_1_SRCS})
  
QT4_WRAP_CPP(MOC_2_SRCS pqPBSIMWarpFilterObjectPanel.h)
  
ADD_PARAVIEW_OBJECT_PANEL(
  IFACES_2 IFACE_2_SRCS
  CLASS_NAME pqPBSIMWarpFilterObjectPanel
  XML_NAME PBSIMWarpFilter XML_GROUP filters)
  
ADD_PARAVIEW_PLUGIN(PBSIMWarpFilterObjectPanel "1.0"
  GUI_INTERFACES ${IFACES_2}
  GUI_SOURCES pqPBSIMWarpFilterObjectPanel.cxx ${MOC_2_SRCS} ${IFACE_2_SRCS})

pqPBSIMWarpFilterObjectPanel.cxx:

//
// pqPBSIMWarpFilterObjectPanel.cxx
#include "pqPBSIMWarpFilterObjectPanel.h"

#include "pqObjectPanelInterface.h"

#include <QLabel>
#include <QComboBox>
#include <QLayout>

#include "pqPropertyManager.h"
#include "pqNamedWidgets.h"

#include "vtkSMDoubleVectorProperty.h"
#include "vtkSMIntVectorProperty.h"

#include <iostream>

//----------------------------------------------------------------------------
pqPBSIMWarpFilterObjectPanel::pqPBSIMWarpFilterObjectPanel(pqProxy* pxy, 
QWidget* p)
  : pqNamedObjectPanel(pxy,p)
{
  cout << "In pqPBSIMWarpFilterObjectPanel::constructor..." << endl; 
 
  this->layout()->addWidget(new QLabel("Testing, this is from the plugin", 
this));
}

pqPBSIMWarpFilterObjectPanel::~pqPBSIMWarpFilterObjectPanel()
{}

void pqPBSIMWarpFilterObjectPanel::accept()
{  
  cout << "In pqPBSIMWarpFilterObjectPanel::accept..." << endl;
  this->Superclass::accept();
  this->updatePanel();
}

void pqPBSIMWarpFilterObjectPanel::updatePanel()
{
  cout << "In pqPBSIMWarpFilterObjectPanel::updatePanel..." << endl;
}

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to