Signals | Public Member Functions | Static Public Member Functions | Protected Slots | List of all members
pqServerManagerModel Class Reference

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
 
pqServerfindServer (vtkIdType cid) const
 Given a session Id, returns the pqServer instance for that session, if any. More...
 
pqServerfindServer (vtkSession *) const
 Given a vtkSession*, returns the pqServer instance for that session, if any. More...
 
pqServerfindServer (vtkSMSession *) const
 
pqServerfindServer (const pqServerResource &resource) const
 Given a server resource, locates the pqServer instance for it, if any. More...
 
pqServerfindServer (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 >
findItem (vtkSMProxy *proxy) const
 Given a proxy, locates a pqServerManagerModelItem subclass for the given proxy. More...
 
template<class 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 >
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 >
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 pqServerManagerModelItemfindItemHelper (const pqServerManagerModel *model, const QMetaObject &mo, vtkSMProxy *proxy)
 Internal method. More...
 
static pqServerManagerModelItemfindItemHelper (const pqServerManagerModel *model, const QMetaObject &mo, vtkTypeUInt32 id)
 Internal method. More...
 
static pqServerManagerModelItemfindItemHelper (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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ pqServerManagerModel()

pqServerManagerModel::pqServerManagerModel ( pqServerManagerObserver observer,
QObject *  parent = nullptr 
)

Constructor: observer :- instance of pqServerManagerObserver observing the server manager.

◆ ~pqServerManagerModel()

pqServerManagerModel::~pqServerManagerModel ( )
override

Member Function Documentation

◆ findServer() [1/5]

pqServer* pqServerManagerModel::findServer ( vtkIdType  cid) const

Given a session Id, returns the pqServer instance for that session, if any.

◆ findServer() [2/5]

pqServer* pqServerManagerModel::findServer ( vtkSession ) const

Given a vtkSession*, returns the pqServer instance for that session, if any.

◆ findServer() [3/5]

pqServer* pqServerManagerModel::findServer ( vtkSMSession ) const

◆ findServer() [4/5]

pqServer* pqServerManagerModel::findServer ( const pqServerResource resource) const

Given a server resource, locates the pqServer instance for it, if any.

◆ findServer() [5/5]

pqServer* pqServerManagerModel::findServer ( const QString &  name) const

Given a server name, locates the pqServer instance with this name, if any.

◆ beginRemoveServer()

void pqServerManagerModel::beginRemoveServer ( pqServer server)

Book end events for removing a server.

◆ endRemoveServer()

void pqServerManagerModel::endRemoveServer ( )

◆ setActiveResource()

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.

◆ findItem() [1/3]

template<class T >
T pqServerManagerModel::findItem ( vtkSMProxy proxy) const
inline

Given a proxy, locates a pqServerManagerModelItem subclass for the given proxy.

Definition at line 109 of file pqServerManagerModel.h.

◆ findItem() [2/3]

template<class T >
T pqServerManagerModel::findItem ( vtkTypeUInt32  id) const
inline

Given the global id for a proxy, locates a pqServerManagerModelItem subclass for the proxy.

Definition at line 119 of file pqServerManagerModel.h.

◆ findItems() [1/2]

template<class T >
QList<T> pqServerManagerModel::findItems ( ) const
inline

Returns a list of pqServerManagerModelItem of the given type.

Definition at line 128 of file pqServerManagerModel.h.

◆ getNumberOfItems()

template<class T >
int pqServerManagerModel::getNumberOfItems ( ) const
inline

Returns the number of items of the given type.

Definition at line 137 of file pqServerManagerModel.h.

◆ getItemAtIndex()

template<class T >
T pqServerManagerModel::getItemAtIndex ( int  index) const
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.

◆ findItems() [2/2]

template<class T >
QList<T> pqServerManagerModel::findItems ( pqServer server) const
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.

◆ findItem() [3/3]

template<class T >
T pqServerManagerModel::findItem ( const QString &  name) const
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.

◆ findItemsHelper()

static void pqServerManagerModel::findItemsHelper ( const pqServerManagerModel model,
const QMetaObject &  mo,
QList< void *> *  list,
pqServer server = nullptr 
)
static

Internal method.

◆ findItemHelper() [1/3]

static pqServerManagerModelItem* pqServerManagerModel::findItemHelper ( const pqServerManagerModel model,
const QMetaObject &  mo,
vtkSMProxy proxy 
)
static

Internal method.

◆ findItemHelper() [2/3]

static pqServerManagerModelItem* pqServerManagerModel::findItemHelper ( const pqServerManagerModel model,
const QMetaObject &  mo,
vtkTypeUInt32  id 
)
static

Internal method.

◆ findItemHelper() [3/3]

static pqServerManagerModelItem* pqServerManagerModel::findItemHelper ( const pqServerManagerModel model,
const QMetaObject &  mo,
const QString &  name 
)
static

Internal method.

◆ preServerAdded

void pqServerManagerModel::preServerAdded ( pqServer )
signal

Signals emitted when a new pqServer object is created.

◆ serverAdded

void pqServerManagerModel::serverAdded ( pqServer )
signal

◆ serverReady

void pqServerManagerModel::serverReady ( pqServer )
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.

◆ preServerRemoved

void pqServerManagerModel::preServerRemoved ( pqServer )
signal

Signals emitted when a pqServer instance is being destroyed.

◆ serverRemoved

void pqServerManagerModel::serverRemoved ( pqServer )
signal

◆ aboutToRemoveServer

void pqServerManagerModel::aboutToRemoveServer ( pqServer server)
signal

Fired when beginRemoveServer is called.

◆ finishedRemovingServer

void pqServerManagerModel::finishedRemovingServer ( )
signal

Fired when endRemoveServer is called.

◆ preItemAdded

void pqServerManagerModel::preItemAdded ( pqServerManagerModelItem )
signal

Signals emitted when any pqServerManagerModelItem subclass is created.

◆ itemAdded

void pqServerManagerModel::itemAdded ( pqServerManagerModelItem )
signal

◆ preItemRemoved

void pqServerManagerModel::preItemRemoved ( pqServerManagerModelItem )
signal

Signals emitted when any new pqServerManagerModelItem subclass is being destroyed.

◆ itemRemoved

void pqServerManagerModel::itemRemoved ( pqServerManagerModelItem )
signal

◆ preProxyAdded

void pqServerManagerModel::preProxyAdded ( pqProxy )
signal

◆ proxyAdded

void pqServerManagerModel::proxyAdded ( pqProxy )
signal

◆ preProxyRemoved

void pqServerManagerModel::preProxyRemoved ( pqProxy )
signal

◆ proxyRemoved

void pqServerManagerModel::proxyRemoved ( pqProxy )
signal

◆ preSourceAdded

void pqServerManagerModel::preSourceAdded ( pqPipelineSource source)
signal

Signals emitted when a source/filter is created.

◆ sourceAdded

void pqServerManagerModel::sourceAdded ( pqPipelineSource source)
signal

◆ preSourceRemoved

void pqServerManagerModel::preSourceRemoved ( pqPipelineSource )
signal

Signals emitted when a source/filter is destroyed.

◆ sourceRemoved

void pqServerManagerModel::sourceRemoved ( pqPipelineSource )
signal

◆ preViewAdded

void pqServerManagerModel::preViewAdded ( pqView view)
signal

Signals emitted when a view is created.

◆ viewAdded

void pqServerManagerModel::viewAdded ( pqView view)
signal

◆ preViewRemoved

void pqServerManagerModel::preViewRemoved ( pqView )
signal

Signals emitted when a view is destroyed.

◆ viewRemoved

void pqServerManagerModel::viewRemoved ( pqView )
signal

◆ preRepresentationAdded

void pqServerManagerModel::preRepresentationAdded ( pqRepresentation rep)
signal

Signals emitted when a representation is created.

◆ representationAdded

void pqServerManagerModel::representationAdded ( pqRepresentation rep)
signal

◆ preRepresentationRemoved

void pqServerManagerModel::preRepresentationRemoved ( pqRepresentation )
signal

Signals emitted when a representation is destroyed.

◆ representationRemoved

void pqServerManagerModel::representationRemoved ( pqRepresentation )
signal

◆ preExtractorAdded

void pqServerManagerModel::preExtractorAdded ( pqExtractor )
signal

Signals figured for pqExtractor.

◆ extractorAdded

void pqServerManagerModel::extractorAdded ( pqExtractor )
signal

Signals figured for pqExtractor.

◆ preExtractorRemoved

void pqServerManagerModel::preExtractorRemoved ( pqExtractor )
signal

Signals figured for pqExtractor.

◆ extractorRemoved

void pqServerManagerModel::extractorRemoved ( pqExtractor )
signal

Signals figured for pqExtractor.

◆ nameChanged

void pqServerManagerModel::nameChanged ( pqServerManagerModelItem item)
signal

Fired when the name of an item changes.

◆ modifiedStateChanged

void pqServerManagerModel::modifiedStateChanged ( pqServerManagerModelItem item)
signal

Fired when the state of the model item changes.

◆ connectionAdded [1/2]

void pqServerManagerModel::connectionAdded ( pqPipelineSource source,
pqPipelineSource consumer,
int  srcOutputPort 
)
signal

Fired when a connection between two pqPipelineSources is created.

◆ preConnectionAdded

void pqServerManagerModel::preConnectionAdded ( pqPipelineSource source,
pqPipelineSource consumer,
int  srcOutputPort 
)
signal

◆ connectionRemoved [1/2]

void pqServerManagerModel::connectionRemoved ( pqPipelineSource source,
pqPipelineSource consumer,
int  srcOutputPort 
)
signal

Fired when a connection between tow pqPipelineSources is broken.

◆ preConnectionRemoved

void pqServerManagerModel::preConnectionRemoved ( pqPipelineSource source,
pqPipelineSource consumer,
int  srcOutputPort 
)
signal

◆ connectionAdded [2/2]

void pqServerManagerModel::connectionAdded ( pqServerManagerModelItem source,
pqExtractor consumer 
)
signal

Signals fired to notify changes to extractor connections.

◆ connectionRemoved [2/2]

void pqServerManagerModel::connectionRemoved ( pqServerManagerModelItem source,
pqExtractor consumer 
)
signal

Signals fired to notify changes to extractor connections.

◆ dataUpdated

void pqServerManagerModel::dataUpdated ( pqPipelineSource )
signal

Fired when a source indicates that data was updated i.e.

the pipeline was updated.

◆ onProxyRegistered

virtual void pqServerManagerModel::onProxyRegistered ( const QString &  group,
const QString &  name,
vtkSMProxy proxy 
)
protectedvirtualslot

Called when a proxy is registered.

◆ onProxyUnRegistered

virtual void pqServerManagerModel::onProxyUnRegistered ( const QString &  group,
const QString &  name,
vtkSMProxy proxy 
)
protectedvirtualslot

Called when a proxy is unregistered.

◆ onConnectionCreated

virtual void pqServerManagerModel::onConnectionCreated ( vtkIdType  id)
protectedvirtualslot

Called when a new server connection is created.

◆ onConnectionClosed

virtual void pqServerManagerModel::onConnectionClosed ( vtkIdType  id)
protectedvirtualslot

Called when a server connection is closed.

◆ onStateLoaded

virtual void pqServerManagerModel::onStateLoaded ( vtkPVXMLElement ,
vtkSMProxyLocator  
)
protectedvirtualslot

Called when state file is loaded.

We need to discover "helper proxies" and set up the associations accordingly.


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