Public Types | Signals | Public Member Functions | Static Public Member Functions | Protected Slots | Protected Member Functions | Friends | List of all members
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]

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. More...
 
void modifiedStateChanged (pqServerManagerModelItem *)
 Fired when the modified status changes for the proxy. More...
 

Public Member Functions

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

Static Public Member Functions

static pqProxyfindProxyWithHelper (vtkSMProxy *aproxy, QString &key)
 Returns a pqProxy instance, of any, whose helper proxy is the aproxy. More...
 
static std::string rstToHtml (const char *rstStr)
 convert proxy documentation from RST to HTML (so that it can be used in Qt) More...
 
static QString rstToHtml (const QString &rstStr)
 convert proxy documentation from RST to HTML (so that it can be used in Qt) More...
 

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. More...
 
virtual void initialize ()
 
virtual void addInternalHelperProxy (const QString &key, vtkSMProxy *) const
 
virtual void removeInternalHelperProxy (const QString &key, vtkSMProxy *) const
 
- Protected Member Functions inherited from pqServerManagerModelItem
vtkEventQtSlotConnectgetConnector ()
 All subclasses generally need some vtkEventQtSlotConnect instance to connect to VTK events. More...
 

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 28 of file pqProxy.h.

Member Enumeration Documentation

◆ ModifiedState

The modification state of this proxy.

Enumerator
UNINITIALIZED 
MODIFIED 
UNMODIFIED 

Definition at line 35 of file pqProxy.h.

Constructor & Destructor Documentation

◆ pqProxy()

pqProxy::pqProxy ( const QString &  group,
const QString &  name,
vtkSMProxy proxy,
pqServer server,
QObject *  parent = nullptr 
)

◆ ~pqProxy()

pqProxy::~pqProxy ( )
override

Member Function Documentation

◆ getServer()

pqServer* pqProxy::getServer ( ) const

Get the server on which this proxy exists.

◆ rename()

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.

◆ getSMName()

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.

◆ getSMGroup()

const QString& pqProxy::getSMGroup ( )

◆ getProxy()

vtkSMProxy* pqProxy::getProxy ( ) const

Get the vtkSMProxy this object stands for.

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

◆ modifiedState()

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 80 of file pqProxy.h.

◆ setModifiedState()

void pqProxy::setModifiedState ( ModifiedState  modified)

Sets whether or not the source has been modified.

Parameters
modifiedTrue if the source has been modified.

◆ getHints()

vtkPVXMLElement* pqProxy::getHints ( ) const

Returns the hints for this proxy, if any.

May returns nullptr if no hints are defined.

◆ getHelperProxies() [1/2]

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

Returns a list of all helper proxies.

◆ getHelperProxies() [2/2]

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

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

◆ getHelperKeys()

QList<QString> pqProxy::getHelperKeys ( ) const

Returns the keys for helper proxies.

◆ rstToHtml() [1/2]

static std::string pqProxy::rstToHtml ( const char *  rstStr)
static

convert proxy documentation from RST to HTML (so that it can be used in Qt)

◆ rstToHtml() [2/2]

static QString pqProxy::rstToHtml ( const QString &  rstStr)
static

convert proxy documentation from RST to HTML (so that it can be used in Qt)

◆ addHelperProxy()

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.

◆ removeHelperProxy()

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

◆ updateHelperProxies()

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.

◆ proxyManager()

vtkSMSessionProxyManager* pqProxy::proxyManager ( ) const

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

◆ findProxyWithHelper()

static pqProxy* pqProxy::findProxyWithHelper ( vtkSMProxy aproxy,
QString &  key 
)
static

Returns a pqProxy instance, of any, whose helper proxy is the aproxy.

This is not the fastest implementation, so beware of that. If found, the key is set to the helper key.

◆ userModifiedSMName()

bool pqProxy::userModifiedSMName ( )
inline

Return whether or not the user has modified the GUI name of the source.

This is needed when reading in a dataset with Catalyst channel information so that we can make sure that we don't overwrite any QUI name the user has already modified. The situation where this could happen is if the user loads a file, changes the GUI name, and then hits the Apply button. In this situation we don't want to change the GUI name to the Catalyst channel name but every other situation we do.

Definition at line 159 of file pqProxy.h.

◆ nameChanged

void pqProxy::nameChanged ( pqServerManagerModelItem )
signal

Fired when the name of the proxy is changed.

◆ modifiedStateChanged

void pqProxy::modifiedStateChanged ( pqServerManagerModelItem )
signal

Fired when the modified status changes for the proxy.

◆ setSMName()

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 instance 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.

◆ initialize()

virtual void pqProxy::initialize ( )
protectedvirtual

◆ addInternalHelperProxy()

virtual void pqProxy::addInternalHelperProxy ( const QString &  key,
vtkSMProxy  
) const
protectedvirtual

◆ removeInternalHelperProxy()

virtual void pqProxy::removeInternalHelperProxy ( const QString &  key,
vtkSMProxy  
) const
protectedvirtual

◆ onProxyRegistered

void pqProxy::onProxyRegistered ( const QString &  ,
const QString &  ,
vtkSMProxy  
)
protectedslot

◆ onProxyUnRegistered

void pqProxy::onProxyUnRegistered ( const QString &  ,
const QString &  ,
vtkSMProxy  
)
protectedslot

Friends And Related Function Documentation

◆ pqServerManagerModel

friend class pqServerManagerModel
friend

Definition at line 173 of file pqProxy.h.


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