[Paraview] Creating a PV 3 Plugin - qrc File

Mike Jackson imikejackson at gmail.com
Wed Feb 20 18:38:19 EST 2008


OK. I got my VOI working and it seems to work because what I think are
two reasons:

1) It is a Settable property
2) The values come from QLineEdits

I have a bunch of other QLabels that are just "getters" to display
some information that the reader gathers during RequestInformation.
These values are NOT doing anything in the GUI.

Here is a typical example:

In the Server Manager XML file I have:

      <IntVectorProperty name="NumberOfSlices"
        command="GetNumberOfSlices" number_of_elements="1"
        default_values="-1" information_only="1" >
                <SimpleIntInformationHelper />
         </IntVectorProperty>

In the Header of my Custom Reader I have:
vtkGetMacro(NumberOfSlices, vtkTypeInt32);

and in my .ui file that QLabel is named:
NumberOfSlices.

The default value doesn't even get used from the Server Manager XML.
And turning on Debug for my custom reader tells me that the "Get***"
Methods are never being called.

So where did I screw this up?

Thanks
Mike




On Wed, Feb 20, 2008 at 3:47 PM,  <clinton at elemtech.com> wrote:
>
> You have have multiple Qt widgets connected to one server manager property.
> If you want the connection made between your widgets and the server manager
> automatically, then suffix the Qt widget names with _0, _1, _2 for which
> index of the property they are connected with.  If you're going to set/get
> the values yourself, then you can name them another way.
>
> Or if you want to make separate server manager properties, and have one Qt
> widget for each, you'll have to have corresponding properties on your filter.
>
> Clint
>
>
> On Wednesday 20 February 2008 12:59:10 pm Mike Jackson wrote:
> > >From the ParaView wiki:
> >
> > "pqLoadedFormObjectPanel - if you want to design your form in the Qt
> > Designer, you get a .ui file as a result. You can use this class to
> > load the .ui file. If the names of widgets created in the Qt Designer
> > correspond with server manager objects, they will automatically be
> > hooked up"
> >
> > So, basically I need ServerManager XML for each "thing" I want to
> > display in the gui?
> >
> > So I have a VOI that I am setting from the GUI. The QLineEdits are
> > named "VOIXMin, VOIXMax.... ".
> >
> > Based on that I would need some xml in my server manager file
> > like this:
> >
> >
> >   <IntVectorProperty name="VOIXMin" command="SetVOIXMin"
> >         number_of_elements="1" default_values="0" />
> >
> > ---
> > Mike
> >
> > On Wed, Feb 20, 2008 at 2:33 PM, Mike Jackson <imikejackson at gmail.com>
> wrote:
> > > On Wed, Feb 20, 2008 at 1:49 PM,  <clinton at elemtech.com> wrote:
> > > > On Wednesday 20 February 2008 11:40:00 am Mike Jackson wrote:
> > > > > I was able to get plugins working on windows so I'll just work in
> > > > > that env for a bit.
> > > > >
> > > > > Question: In my .qrc file I am not really sure what I should be
> > > > > putting in there.
> > > > >
> > > > > Currently I have:
> > > > >
> > > > > <RCC>
> > > > >     <qresource prefix="/ClientPlugin" >
> > > > >         <file>pqH5RoboMetReader.ui</file>
> > > > >     </qresource>
> > > > > </RCC>
> > > > >
> > > > > The layout of my project is:
> > > > >
> > > > > PVRoboMet
> > > > >   src
> > > > >     ClientPlugin
> > > > >        Resources
> > > > >           pqH5RoboMetReader.qrc
> > > > >           pqH5RoboMetReader.ui
> > > > >
> > > > >
> > > > > I am not really sure what I should be putting for "qresource prefix"
> > > > > ?
> > > >
> > > > If you use pqLoadedFormObjectPanel in your plugin, it doesn't matter
> > > > what your prefix is.
> > > >
> > > > > When I try to load my plugin ParaView gives back a dialog that says
> > > > > the plugin failed to load. ( Some actual text in that dialog box
> > > > > would be useful)
> > > >
> > > > Update your code.  Its been fixed in CVS today, so you'll get the
> > > > reason for failure.
> > > >
> > > > Clint
> > >
> > > Things are working now. I just need to start hooking up my widgets to
> > > start getting values from the server side. At least this all works on
> > > windows. I have no idea what the deal on my OS X machine is (Either
> > > 10.4 or 10.5).
> > >
> > >
> > >
> > > ---
> > >
> > > Mike Jackson
> > > imikejackson _at_ gee-mail dot com
>
>
>



-- 
Mike Jackson
imikejackson _at_ gee-mail dot com


More information about the ParaView mailing list