pqServerManagerModel is the model for the Server Manager. More...
#include <pqServerManagerModel.h>
Inherits QObject.
Signals | |
void | preServerAdded (pqServer *) |
Signals emitted when a new pqServer object is created. More... | |
void | serverAdded (pqServer *) |
void | serverReady (pqServer *) |
Signals emitted when a new pqServer object is properly initialized. More... | |
void | preServerRemoved (pqServer *) |
Signals emitted when a pqServer instance is being destroyed. More... | |
void | serverRemoved (pqServer *) |
void | aboutToRemoveServer (pqServer *server) |
Fired when beginRemoveServer is called. More... | |
void | finishedRemovingServer () |
Fired when endRemoveServer is called. More... | |
void | preItemAdded (pqServerManagerModelItem *) |
Signals emitted when any pqServerManagerModelItem subclass is created. More... | |
void | itemAdded (pqServerManagerModelItem *) |
void | preItemRemoved (pqServerManagerModelItem *) |
Signals emitted when any new pqServerManagerModelItem subclass is being destroyed. More... | |
void | itemRemoved (pqServerManagerModelItem *) |
void | preProxyAdded (pqProxy *) |
void | proxyAdded (pqProxy *) |
void | preProxyRemoved (pqProxy *) |
void | proxyRemoved (pqProxy *) |
void | preSourceAdded (pqPipelineSource *source) |
Signals emitted when a source/filter is created. More... | |
void | sourceAdded (pqPipelineSource *source) |
void | preSourceRemoved (pqPipelineSource *) |
Signals emitted when a source/filter is destroyed. More... | |
void | sourceRemoved (pqPipelineSource *) |
void | preViewAdded (pqView *view) |
Signals emitted when a view is created. More... | |
void | viewAdded (pqView *view) |
void | preViewRemoved (pqView *) |
Signals emitted when a view is destroyed. More... | |
void | viewRemoved (pqView *) |
void | preRepresentationAdded (pqRepresentation *rep) |
Signals emitted when a representation is created. More... | |
void | representationAdded (pqRepresentation *rep) |
void | preRepresentationRemoved (pqRepresentation *) |
Signals emitted when a representation is destroyed. More... | |
void | representationRemoved (pqRepresentation *) |
void | nameChanged (pqServerManagerModelItem *item) |
Fired when the name of an item changes. More... | |
void | modifiedStateChanged (pqServerManagerModelItem *item) |
Fired when the state of the model item changes. More... | |
void | connectionAdded (pqPipelineSource *source, pqPipelineSource *consumer, int srcOutputPort) |
Fired when a connection between two pqPipelineSources is created. More... | |
void | preConnectionAdded (pqPipelineSource *source, pqPipelineSource *consumer, int srcOutputPort) |
void | connectionRemoved (pqPipelineSource *source, pqPipelineSource *consumer, int srcOutputPort) |
Fired when a connection between tow pqPipelineSources is broken. More... | |
void | preConnectionRemoved (pqPipelineSource *source, pqPipelineSource *consumer, int srcOutputPort) |
void | dataUpdated (pqPipelineSource *) |
Fired when a source indicates that data was updated i.e. More... | |
void | preExtractorAdded (pqExtractor *) |
Signals figured for pqExtractor. More... | |
void | extractorAdded (pqExtractor *) |
Signals figured for pqExtractor. More... | |
void | preExtractorRemoved (pqExtractor *) |
Signals figured for pqExtractor. More... | |
void | extractorRemoved (pqExtractor *) |
Signals figured for pqExtractor. More... | |
void | connectionAdded (pqServerManagerModelItem *source, pqExtractor *consumer) |
Signals fired to notify changes to extractor connections. More... | |
void | connectionRemoved (pqServerManagerModelItem *source, pqExtractor *consumer) |
Signals fired to notify changes to extractor connections. More... | |
Public Member Functions | |
pqServerManagerModel (pqServerManagerObserver *observer, QObject *parent=nullptr) | |
Constructor: observer :- instance of pqServerManagerObserver observing the server manager. More... | |
~pqServerManagerModel () override | |
pqServer * | findServer (vtkIdType cid) const |
Given a session Id, returns the pqServer instance for that session, if any. More... | |
pqServer * | findServer (vtkSession *) const |
Given a vtkSession*, returns the pqServer instance for that session, if any. More... | |
pqServer * | findServer (vtkSMSession *) const |
pqServer * | findServer (const pqServerResource &resource) const |
Given a server resource, locates the pqServer instance for it, if any. More... | |
pqServer * | findServer (const QString &name) const |
Given a server name, locates the pqServer instance with this name, if any. More... | |
void | beginRemoveServer (pqServer *server) |
Book end events for removing a server. More... | |
void | endRemoveServer () |
void | setActiveResource (const pqServerResource &resource) |
This method to called by any code that's requesting ServerManager to create a new connection (viz. More... | |
template<class T > | |
T | findItem (vtkSMProxy *proxy) const |
Given a proxy, locates a pqServerManagerModelItem subclass for the given proxy. More... | |
template<class T > | |
T | findItem (vtkTypeUInt32 id) const |
Given the global id for a proxy, locates a pqServerManagerModelItem subclass for the proxy. More... | |
template<class T > | |
QList< T > | findItems () const |
Returns a list of pqServerManagerModelItem of the given type. More... | |
template<class T > | |
int | getNumberOfItems () const |
Returns the number of items of the given type. More... | |
template<class T > | |
T | getItemAtIndex (int index) const |
Returns the item of the given type and the given index. More... | |
template<class T > | |
QList< T > | findItems (pqServer *server) const |
Same as findItems<T>() except that this returns only those items that are on the indicated server. More... | |
template<class T > | |
T | findItem (const QString &name) const |
Returns an item with the given name. More... | |
Static Public Member Functions | |
static void | findItemsHelper (const pqServerManagerModel *model, const QMetaObject &mo, QList< void *> *list, pqServer *server=nullptr) |
Internal method. More... | |
static pqServerManagerModelItem * | findItemHelper (const pqServerManagerModel *model, const QMetaObject &mo, vtkSMProxy *proxy) |
Internal method. More... | |
static pqServerManagerModelItem * | findItemHelper (const pqServerManagerModel *model, const QMetaObject &mo, vtkTypeUInt32 id) |
Internal method. More... | |
static pqServerManagerModelItem * | findItemHelper (const pqServerManagerModel *model, const QMetaObject &mo, const QString &name) |
Internal method. More... | |
Protected Slots | |
virtual void | onProxyRegistered (const QString &group, const QString &name, vtkSMProxy *proxy) |
Called when a proxy is registered. More... | |
virtual void | onProxyUnRegistered (const QString &group, const QString &name, vtkSMProxy *proxy) |
Called when a proxy is unregistered. More... | |
virtual void | onConnectionCreated (vtkIdType id) |
Called when a new server connection is created. More... | |
virtual void | onConnectionClosed (vtkIdType id) |
Called when a server connection is closed. More... | |
virtual void | onStateLoaded (vtkPVXMLElement *, vtkSMProxyLocator *) |
Called when state file is loaded. More... | |
pqServerManagerModel is the model for the Server Manager.
All the pipelines in the Server Manager need a GUI representation to obtain additional information about their connections etc. This class collects that. This is merely representation of all the information available in the Server Manager in a more GUI friendly way. Simplicity is the key here.
Definition at line 52 of file pqServerManagerModel.h.
pqServerManagerModel::pqServerManagerModel | ( | pqServerManagerObserver * | observer, |
QObject * | parent = nullptr |
||
) |
Constructor: observer
:- instance of pqServerManagerObserver observing the server manager.
|
override |
Given a session Id, returns the pqServer instance for that session, if any.
pqServer* pqServerManagerModel::findServer | ( | vtkSession * | ) | const |
Given a vtkSession*, returns the pqServer instance for that session, if any.
pqServer* pqServerManagerModel::findServer | ( | vtkSMSession * | ) | const |
pqServer* pqServerManagerModel::findServer | ( | const pqServerResource & | resource | ) | const |
Given a server resource, locates the pqServer instance for it, if any.
Given a server name, locates the pqServer instance with this name, if any.
void pqServerManagerModel::beginRemoveServer | ( | pqServer * | server | ) |
Book end events for removing a server.
void pqServerManagerModel::endRemoveServer | ( | ) |
void pqServerManagerModel::setActiveResource | ( | const pqServerResource & | resource | ) |
This method to called by any code that's requesting ServerManager to create a new connection (viz.
pqObjectBuilder) to set the resource to be used for the newly create pqServer instance. The active resource is automatically cleared one a new pqServer instance is created. Refer to pqObjectBuilder::createServer for details.
|
inline |
Given a proxy, locates a pqServerManagerModelItem subclass for the given proxy.
Definition at line 109 of file pqServerManagerModel.h.
|
inline |
Given the global id for a proxy, locates a pqServerManagerModelItem subclass for the proxy.
Definition at line 119 of file pqServerManagerModel.h.
|
inline |
Returns a list of pqServerManagerModelItem of the given type.
Definition at line 128 of file pqServerManagerModel.h.
|
inline |
Returns the number of items of the given type.
Definition at line 137 of file pqServerManagerModel.h.
|
inline |
Returns the item of the given type and the given index.
The index is determined by collecting all the items of the given type in a list (findItems()).
Definition at line 148 of file pqServerManagerModel.h.
|
inline |
Same as findItems<T>() except that this returns only those items that are on the indicated server.
If server == 0, then all items are returned.
Definition at line 158 of file pqServerManagerModel.h.
|
inline |
Returns an item with the given name.
The type can be pqProxy subclass, since these are the ones that can have a name. Note that since names need not be unique, using this method is not recommended. This is provided for backwards compatibility alone.
Definition at line 170 of file pqServerManagerModel.h.
|
static |
Internal method.
|
static |
Internal method.
|
static |
Internal method.
|
static |
Internal method.
|
signal |
Signals emitted when a new pqServer object is created.
|
signal |
|
signal |
Signals emitted when a new pqServer object is properly initialized.
This happen just before serverAdded() but should not be used by user. serverAdded() should be the signal to bind against unless you need to be notified before the serverAdded() like the plugin loader do.
|
signal |
Signals emitted when a pqServer instance is being destroyed.
|
signal |
|
signal |
Fired when beginRemoveServer is called.
|
signal |
Fired when endRemoveServer is called.
|
signal |
Signals emitted when any pqServerManagerModelItem subclass is created.
|
signal |
|
signal |
Signals emitted when any new pqServerManagerModelItem subclass is being destroyed.
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
Signals emitted when a source/filter is created.
|
signal |
|
signal |
Signals emitted when a source/filter is destroyed.
|
signal |
|
signal |
Signals emitted when a view is created.
|
signal |
|
signal |
Signals emitted when a view is destroyed.
|
signal |
|
signal |
Signals emitted when a representation is created.
|
signal |
|
signal |
Signals emitted when a representation is destroyed.
|
signal |
|
signal |
Signals figured for pqExtractor.
|
signal |
Signals figured for pqExtractor.
|
signal |
Signals figured for pqExtractor.
|
signal |
Signals figured for pqExtractor.
|
signal |
Fired when the name of an item changes.
|
signal |
Fired when the state of the model item changes.
|
signal |
Fired when a connection between two pqPipelineSources is created.
|
signal |
|
signal |
Fired when a connection between tow pqPipelineSources is broken.
|
signal |
|
signal |
Signals fired to notify changes to extractor connections.
|
signal |
Signals fired to notify changes to extractor connections.
|
signal |
Fired when a source indicates that data was updated i.e.
the pipeline was updated.
|
protectedvirtualslot |
Called when a proxy is registered.
|
protectedvirtualslot |
Called when a proxy is unregistered.
|
protectedvirtualslot |
Called when a new server connection is created.
|
protectedvirtualslot |
Called when a server connection is closed.
|
protectedvirtualslot |
Called when state file is loaded.
We need to discover "helper proxies" and set up the associations accordingly.