ParaView
Public Types | Signals | Public Member Functions | Protected Slots | Protected Member Functions | Friends
pqProxy Class Reference

This class represents any registered Server Manager proxy. More...

#include <pqProxy.h>

Inheritance diagram for pqProxy:
Inheritance graph
[legend]
Collaboration diagram for pqProxy:
Collaboration graph
[legend]

List of all members.

Public Types

enum  ModifiedState { UNINITIALIZED, MODIFIED, UNMODIFIED }
 The modification state of this proxy. More...

Signals

void nameChanged (pqServerManagerModelItem *)
 Fired when the name of the proxy is changed.
void modifiedStateChanged (pqServerManagerModelItem *)
 Fired when the modified status changes for the proxy.

Public Member Functions

 pqProxy (const QString &group, const QString &name, vtkSMProxy *proxy, pqServer *server, QObject *parent=NULL)
virtual ~pqProxy ()
pqServergetServer () const
 Get the server on which this proxy exists.
void rename (const QString &newname)
 This is a convenience method.
const QString & getSMName ()
 Get the name with which this proxy is registered on the server manager.
const QString & getSMGroup ()
vtkSMProxygetProxy () const
 Get the vtkSMProxy this object stands for.
ModifiedState modifiedState () const
 Gets whether or not the source has been modified.
void setModifiedState (ModifiedState modified)
 Sets whether or not the source has been modified.
vtkPVXMLElementgetHints () const
 Returns the hints for this proxy, if any.
virtual void setDefaultPropertyValues ()
 Sets default values for the underlying proxy.
QList< vtkSMProxy * > getHelperProxies () const
 Returns a list of all helper proxies.
QList< vtkSMProxy * > getHelperProxies (const QString &key) const
 Returns a list of all the helper proxies added with a given key.
QList< QString > getHelperKeys () const
 Returns the keys for helper proxies.
virtual void addHelperProxy (const QString &key, vtkSMProxy *)
 Concept of helper proxies: A pqProxy is created for every important vtkSMProxy registered.
void removeHelperProxy (const QString &key, vtkSMProxy *)
void clearHelperProxies ()
 Unregisters all helper proxies.
void updateHelperProxies () const
 Updates the internal datastructures using the proxies currently registered under the group that would be used for helper proxies.
vtkSMSessionProxyManagerproxyManager () const
 Returns the proxy manager by calling this->getProxy()->GetProxyManager();.

Protected Slots

void onProxyRegistered (const QString &, const QString &, vtkSMProxy *)
void onProxyUnRegistered (const QString &, const QString &, vtkSMProxy *)

Protected Member Functions

void setSMName (const QString &new_name)
 Make this pqProxy take on a new identity.
virtual void initialize ()
virtual void addInternalHelperProxy (const QString &key, vtkSMProxy *) const
virtual void removeInternalHelperProxy (const QString &key, vtkSMProxy *) const

Friends

class pqServerManagerModel

Detailed Description

This class represents any registered Server Manager proxy.

It keeps essential information to locate the proxy as well as additional metadata such as user-specified label.

Definition at line 52 of file pqProxy.h.


Member Enumeration Documentation

The modification state of this proxy.

Enumerator:
UNINITIALIZED 
MODIFIED 
UNMODIFIED 

Definition at line 58 of file pqProxy.h.


Constructor & Destructor Documentation

pqProxy::pqProxy ( const QString &  group,
const QString &  name,
vtkSMProxy proxy,
pqServer server,
QObject *  parent = NULL 
)
virtual pqProxy::~pqProxy ( ) [virtual]

Member Function Documentation

pqServer* pqProxy::getServer ( ) const

Get the server on which this proxy exists.

void pqProxy::rename ( const QString &  newname)

This is a convenience method.

It re-registers the underlying proxy with the requested new name under the same group. Then it unregisters the proxy from the group with the old name. This operation is understood as renaming the proxy, since as a consequence, this pqProxy's SMName changes.

const QString& pqProxy::getSMName ( )

Get the name with which this proxy is registered on the server manager.

A proxy can be registered with more than one name on the Server Manager. This is the name/group which this pqProxy stands for.

const QString& pqProxy::getSMGroup ( )
vtkSMProxy* pqProxy::getProxy ( ) const

Get the vtkSMProxy this object stands for.

This can never be null. A pqProxy always represents one and only one Server Manager proxy.

ModifiedState pqProxy::modifiedState ( ) const [inline]

Gets whether or not the source has been modified.

Returns:
True if the source has been modified.

Definition at line 90 of file pqProxy.h.

void pqProxy::setModifiedState ( ModifiedState  modified)

Sets whether or not the source has been modified.

Parameters:
modifiedTrue if the source has been modified.
vtkPVXMLElement* pqProxy::getHints ( ) const

Returns the hints for this proxy, if any.

May returns NULL if no hints are defined.

virtual void pqProxy::setDefaultPropertyValues ( ) [virtual]

Sets default values for the underlying proxy.

This is during the initialization stage of the pqProxy for proxies created by the GUI itself i.e. for proxies loaded through state or created by python client this method won't be called. The default implementation iterates over all properties of the proxy and sets them to default values.

Reimplemented in pqPipelineSource, pqDataRepresentation, pqRenderView, pqAnimationCue, pqAnimationScene, pqPipelineRepresentation, pqRenderViewBase, pqScatterPlotRepresentation, pqComparativeRenderView, pqScalarBarRepresentation, pqComparativeContextView, pqXYBarChartView, pqXYChartView, pqParallelCoordinatesChartView, pqChartRepresentation, and pqTextRepresentation.

QList<vtkSMProxy*> pqProxy::getHelperProxies ( ) const

Returns a list of all helper proxies.

QList<vtkSMProxy*> pqProxy::getHelperProxies ( const QString &  key) const

Returns a list of all the helper proxies added with a given key.

QList<QString> pqProxy::getHelperKeys ( ) const

Returns the keys for helper proxies.

virtual void pqProxy::addHelperProxy ( const QString &  key,
vtkSMProxy  
) [virtual]

Concept of helper proxies: A pqProxy is created for every important vtkSMProxy registered.

Many a times, there may be other proxies associated with that proxy, eg. lookup table proxies, implicit function proxies may be associated with a filter/source proxy. The GUI can create "associated" proxies and add them as helper proxies. Helper proxies get registered under special groups, so that they are undo/redo-able, and state save-restore-able. The pqProxy makes sure that the helper proxies are unregistered when the main proxy is unregistered.

void pqProxy::removeHelperProxy ( const QString &  key,
vtkSMProxy  
)
void pqProxy::clearHelperProxies ( )

Unregisters all helper proxies.

void pqProxy::updateHelperProxies ( ) const

Updates the internal datastructures using the proxies currently registered under the group that would be used for helper proxies.

This makes it possible to locate helper proxies created from Python.

vtkSMSessionProxyManager* pqProxy::proxyManager ( ) const

Returns the proxy manager by calling this->getProxy()->GetProxyManager();.

void pqProxy::nameChanged ( pqServerManagerModelItem ) [signal]

Fired when the name of the proxy is changed.

void pqProxy::modifiedStateChanged ( pqServerManagerModelItem ) [signal]

Fired when the modified status changes for the proxy.

void pqProxy::setSMName ( const QString &  new_name) [protected]

Make this pqProxy take on a new identity.

This is following case: Proxy A registered as (gA, nA), then is again registered as (gA, nA2). pqServerManagerModel does not create a new pqProxy for (gA, nA2). However, if (gA, nA) is now unregistered, the same old instace of pqProxy which represented (gA, nA) will now "take on a new identity" and represent proxy (gA, nA2). This method will trigger the nameChanged() signal.

virtual void pqProxy::initialize ( ) [protected, virtual]
virtual void pqProxy::addInternalHelperProxy ( const QString &  key,
vtkSMProxy  
) const [protected, virtual]

Reimplemented in pqPipelineSource.

virtual void pqProxy::removeInternalHelperProxy ( const QString &  key,
vtkSMProxy  
) const [protected, virtual]

Reimplemented in pqPipelineSource.

void pqProxy::onProxyRegistered ( const QString &  ,
const QString &  ,
vtkSMProxy  
) [protected, slot]
void pqProxy::onProxyUnRegistered ( const QString &  ,
const QString &  ,
vtkSMProxy  
) [protected, slot]

Friends And Related Function Documentation

friend class pqServerManagerModel [friend]

Definition at line 149 of file pqProxy.h.


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