ParaView
Static Public Member Functions | List of all members
pqNamedWidgets Class Reference

Links Qt widgets with server manager properties by name. More...

#include <pqNamedWidgets.h>

Static Public Member Functions

static void createWidgets (QGridLayout *l, vtkSMProxy *pxy, bool summaryOnly=false)
 populate a grid layout with widgets to represent the properties More...
 
static void link (QWidget *parent, pqSMProxy proxy, pqPropertyManager *property_manager, const QStringList *exceptions=NULL)
 Link a collection of Qt child widgets with server manager properties by name. More...
 
static void unlink (QWidget *parent, pqSMProxy proxy, pqPropertyManager *property_manager)
 Remove links between Qt widgets and server manager properties. More...
 
static void linkObject (QObject *object, pqSMProxy proxy, const QString &property, pqPropertyManager *property_manager)
 
static void unlinkObject (QObject *object, pqSMProxy proxy, const QString &property, pqPropertyManager *property_manager)
 
static bool propertyInformation (QObject *object, QString &property, QString &signal)
 given an object, find the user property and its associated signal this is used to find which property of a widget to link with returns whether it was found for QCheckBox and QTextEdit, the signal names not derived from the user property More...
 
static void linkObject (QObject *o, const QString &property, const QString &signal, pqSMProxy proxy, vtkSMProperty *smProperty, int index, pqPropertyManager *pm)
 this function does the actual linking, and adds a range domain if one is needed More...
 
static void unlinkObject (QObject *o, const QString &property, const QString &signal, pqSMProxy proxy, vtkSMProperty *smProperty, int index, pqPropertyManager *pm)
 this function does the actual un-linking, and removes a range domain if one exists More...
 

Detailed Description

Links Qt widgets with server manager properties by name.

A Qt widget will be considered a "match" for a property if its name is any one of the forms:

PropertyName PropertyName:String PropertyName:Digit PropertyName:String:Digit

... where PropertyName is the name of the server manager property in question.

The first form is the most used, when there is a single Qt widget associated with a property.

The second form is used when more than one Qt widget will be associated with a single property. An example would be a property controlled by a slider widget plus a spin box. In this case the two widgets might be named "Foo:Slider" and "Foo:Spin". The choice of identifier for individual widgets is not significant, as long as it is unique.

The third and fourth forms are used when Qt widgets will be associated with multi-element properties. The digits are used as indices to control with which property element a given widget will be associated.

If widgets can also represent domains (combo boxes has a fixed list of items, sliders or spin boxes have a minimum or maximum value), their domains will be linked as well so if the domain changes, the possible values or minimums/maximums will automatically updated.

Definition at line 75 of file pqNamedWidgets.h.

Member Function Documentation

§ createWidgets()

static void pqNamedWidgets::createWidgets ( QGridLayout *  l,
vtkSMProxy pxy,
bool  summaryOnly = false 
)
static

populate a grid layout with widgets to represent the properties

§ link()

static void pqNamedWidgets::link ( QWidget *  parent,
pqSMProxy  proxy,
pqPropertyManager property_manager,
const QStringList *  exceptions = NULL 
)
static

Link a collection of Qt child widgets with server manager properties by name.

§ unlink()

static void pqNamedWidgets::unlink ( QWidget *  parent,
pqSMProxy  proxy,
pqPropertyManager property_manager 
)
static

Remove links between Qt widgets and server manager properties.

§ linkObject() [1/2]

static void pqNamedWidgets::linkObject ( QObject *  object,
pqSMProxy  proxy,
const QString &  property,
pqPropertyManager property_manager 
)
static

§ unlinkObject() [1/2]

static void pqNamedWidgets::unlinkObject ( QObject *  object,
pqSMProxy  proxy,
const QString &  property,
pqPropertyManager property_manager 
)
static

§ propertyInformation()

static bool pqNamedWidgets::propertyInformation ( QObject *  object,
QString &  property,
QString &  signal 
)
static

given an object, find the user property and its associated signal this is used to find which property of a widget to link with returns whether it was found for QCheckBox and QTextEdit, the signal names not derived from the user property

§ linkObject() [2/2]

static void pqNamedWidgets::linkObject ( QObject *  o,
const QString &  property,
const QString &  signal,
pqSMProxy  proxy,
vtkSMProperty smProperty,
int  index,
pqPropertyManager pm 
)
static

this function does the actual linking, and adds a range domain if one is needed

§ unlinkObject() [2/2]

static void pqNamedWidgets::unlinkObject ( QObject *  o,
const QString &  property,
const QString &  signal,
pqSMProxy  proxy,
vtkSMProperty smProperty,
int  index,
pqPropertyManager pm 
)
static

this function does the actual un-linking, and removes a range domain if one exists


The documentation for this class was generated from the following file: