This class represents any registered Server Manager proxy. More...
#include <pqProxy.h>
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 | |
pqServer * | getServer () 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 () |
vtkSMProxy * | getProxy () 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... | |
vtkPVXMLElement * | getHints () 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... | |
vtkSMSessionProxyManager * | proxyManager () 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 pqProxy * | findProxyWithHelper (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 | |
vtkEventQtSlotConnect * | getConnector () |
All subclasses generally need some vtkEventQtSlotConnect instance to connect to VTK events. More... | |
Friends | |
class | pqServerManagerModel |
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.
pqProxy::pqProxy | ( | const QString & | group, |
const QString & | name, | ||
vtkSMProxy * | proxy, | ||
pqServer * | server, | ||
QObject * | parent = nullptr |
||
) |
|
override |
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 nullptr. A pqProxy always represents one and only one Server Manager proxy.
|
inline |
void pqProxy::setModifiedState | ( | ModifiedState | modified | ) |
Sets whether or not the source has been modified.
modified | True if the source has been modified. |
vtkPVXMLElement* pqProxy::getHints | ( | ) | const |
Returns the hints for this proxy, if any.
May returns nullptr if no hints are defined.
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.
|
static |
convert proxy documentation from RST to HTML (so that it can be used in Qt)
|
static |
convert proxy documentation from RST to HTML (so that it can be used in Qt)
|
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::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();.
|
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.
|
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.
|
signal |
Fired when the name of the proxy is changed.
|
signal |
Fired when the modified status changes for the proxy.
|
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.
|
protectedvirtual |
Reimplemented in pqRenderView, pqView, pqDataRepresentation, pqPipelineFilter, pqRenderViewBase, and pqExtractor.
|
protectedvirtual |
|
protectedvirtual |
|
protectedslot |
|
protectedslot |
|
friend |