ParaView
Signals | Public Member Functions | Static Public Member Functions | Protected Slots
pqServerManagerModel Class Reference

pqServerManagerModel is the model for the Server Manager. More...

#include <pqServerManagerModel.h>

List of all members.

Signals

void preServerAdded (pqServer *)
 Siganls emitted when a new pqServer object is created.
void serverAdded (pqServer *)
void preServerRemoved (pqServer *)
 Signals emitted when a pqServer instance is being destroyed.
void serverRemoved (pqServer *)
void aboutToRemoveServer (pqServer *server)
 Fired when beginRemoveServer is called.
void finishedRemovingServer ()
 Fired when endRemoveServer is called.
void preItemAdded (pqServerManagerModelItem *)
 Signals emitted when any pqServerManagerModelItem subclass is created.
void itemAdded (pqServerManagerModelItem *)
void preItemRemoved (pqServerManagerModelItem *)
 Signals emitted when any new pqServerManagerModelItem subclass is being destroyed.
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.
void sourceAdded (pqPipelineSource *source)
void preSourceRemoved (pqPipelineSource *)
 Signals emitted when a source/filter is destroyed.
void sourceRemoved (pqPipelineSource *)
void preViewAdded (pqView *view)
 Signals emitted when a view is created.
void viewAdded (pqView *view)
void preViewRemoved (pqView *)
 Signals emitted when a view is destroyed.
void viewRemoved (pqView *)
void preRepresentationAdded (pqRepresentation *rep)
 Signals emitted when a representation is created.
void representationAdded (pqRepresentation *rep)
void preRepresentationRemoved (pqRepresentation *)
 Signals emitted when a representation is destroyed.
void representationRemoved (pqRepresentation *)
void nameChanged (pqServerManagerModelItem *item)
 Fired when the name of an item changes.
void modifiedStateChanged (pqServerManagerModelItem *item)
 Fired when the state of the model item changes.
void connectionAdded (pqPipelineSource *source, pqPipelineSource *consumer, int srcOutputPort)
 Fired when a connection between two pqPipelineSources is created.
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.
void preConnectionRemoved (pqPipelineSource *source, pqPipelineSource *consumer, int srcOutputPort)
void dataUpdated (pqPipelineSource *)
 Fired when a source indicates that data was updated i.e.

Public Member Functions

 pqServerManagerModel (pqServerManagerObserver *observer, QObject *parent=0)
 Constructor: observer :- instance of pqServerManagerObserver observing the server manager.
 ~pqServerManagerModel ()
pqServerfindServer (vtkIdType cid) const
 Given a session Id, returns the pqServer instance for that session, if any.
pqServerfindServer (vtkSession *) const
 Given a vtkSession*, returns the pqServer instance for that session, if any.
pqServerfindServer (vtkSMSession *) const
pqServerfindServer (const pqServerResource &resource) const
 Given a server resource, locates the pqServer instance for it, if any.
void beginRemoveServer (pqServer *server)
 Book end events for removing a server.
void endRemoveServer ()
void setActiveResource (const pqServerResource &resource)
 This method to called by any code that's requesting ServerManager to create a new connection (viz.
template<class T >
findItem (vtkSMProxy *proxy) const
 Given a proxy, locates a pqServerManagerModelItem subclass for the given proxy.
template<class T >
findItem (vtkTypeUInt32 id) const
 Given the gloabal id for a proxy, locates a pqServerManagerModelItem subclass for the proxy.
template<class T >
QList< T > findItems () const
 Returns a list of pqServerManagerModelItem of the given type.
template<class T >
int getNumberOfItems () const
 Returns the number of items of the given type.
template<class T >
getItemAtIndex (int index) const
 Returns the item of the given type and the given index.
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.
template<class T >
findItem (const QString &name) const
 Returns an item with the given name.

Static Public Member Functions

static void findItemsHelper (const pqServerManagerModel *const model, const QMetaObject &mo, QList< void * > *list, pqServer *server=0)
 Internal method.
static pqServerManagerModelItemfindItemHelper (const pqServerManagerModel *const model, const QMetaObject &mo, vtkSMProxy *proxy)
 Internal method.
static pqServerManagerModelItemfindItemHelper (const pqServerManagerModel *const model, const QMetaObject &mo, vtkTypeUInt32 id)
 Internal method.
static pqServerManagerModelItemfindItemHelper (const pqServerManagerModel *const model, const QMetaObject &mo, const QString &name)
 Internal method.

Protected Slots

virtual void onProxyRegistered (const QString &group, const QString &name, vtkSMProxy *proxy)
 Called when a proxy is registered.
virtual void onProxyUnRegistered (const QString &group, const QString &name, vtkSMProxy *proxy)
 Called when a proxy is unregistered.
virtual void onConnectionCreated (vtkIdType id)
 Called when a new server connection is created.
virtual void onConnectionClosed (vtkIdType id)
 Called when a server connection is closed.
virtual void onStateLoaded (vtkPVXMLElement *, vtkSMProxyLocator *)
 Called when state file is loaded.

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 79 of file pqServerManagerModel.h.


Constructor & Destructor Documentation

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

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

pqServerManagerModel::~pqServerManagerModel ( )

Member Function Documentation

pqServer* pqServerManagerModel::findServer ( vtkIdType  cid) const

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.

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.

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

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

Definition at line 117 of file pqServerManagerModel.h.

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

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

Definition at line 125 of file pqServerManagerModel.h.

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

Returns a list of pqServerManagerModelItem of the given type.

Definition at line 132 of file pqServerManagerModel.h.

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

Returns the number of items of the given type.

Definition at line 139 of file pqServerManagerModel.h.

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.

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 156 of file pqServerManagerModel.h.

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 166 of file pqServerManagerModel.h.

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

Internal method.

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

Internal method.

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

Internal method.

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

Internal method.

void pqServerManagerModel::preServerAdded ( pqServer ) [signal]

Siganls emitted when a new pqServer object is created.

void pqServerManagerModel::serverAdded ( pqServer ) [signal]
void pqServerManagerModel::preServerRemoved ( pqServer ) [signal]

Signals emitted when a pqServer instance is being destroyed.

void pqServerManagerModel::serverRemoved ( pqServer ) [signal]
void pqServerManagerModel::aboutToRemoveServer ( pqServer server) [signal]

Fired when beginRemoveServer is called.

void pqServerManagerModel::finishedRemovingServer ( ) [signal]

Fired when endRemoveServer is called.

void pqServerManagerModel::preItemAdded ( pqServerManagerModelItem ) [signal]

Signals emitted when any pqServerManagerModelItem subclass is created.

void pqServerManagerModel::itemAdded ( pqServerManagerModelItem ) [signal]
void pqServerManagerModel::preItemRemoved ( pqServerManagerModelItem ) [signal]

Signals emitted when any new pqServerManagerModelItem subclass is being destroyed.

void pqServerManagerModel::itemRemoved ( pqServerManagerModelItem ) [signal]
void pqServerManagerModel::preProxyAdded ( pqProxy ) [signal]
void pqServerManagerModel::proxyAdded ( pqProxy ) [signal]
void pqServerManagerModel::preProxyRemoved ( pqProxy ) [signal]
void pqServerManagerModel::proxyRemoved ( pqProxy ) [signal]
void pqServerManagerModel::preSourceAdded ( pqPipelineSource source) [signal]

Signals emitted when a source/filter is created.

void pqServerManagerModel::sourceAdded ( pqPipelineSource source) [signal]
void pqServerManagerModel::preSourceRemoved ( pqPipelineSource ) [signal]

Signals emitted when a source/filter is destroyed.

void pqServerManagerModel::sourceRemoved ( pqPipelineSource ) [signal]
void pqServerManagerModel::preViewAdded ( pqView view) [signal]

Signals emitted when a view is created.

void pqServerManagerModel::viewAdded ( pqView view) [signal]
void pqServerManagerModel::preViewRemoved ( pqView ) [signal]

Signals emitted when a view is destroyed.

void pqServerManagerModel::viewRemoved ( pqView ) [signal]
void pqServerManagerModel::preRepresentationAdded ( pqRepresentation rep) [signal]

Signals emitted when a representation is created.

void pqServerManagerModel::representationAdded ( pqRepresentation rep) [signal]
void pqServerManagerModel::preRepresentationRemoved ( pqRepresentation ) [signal]

Signals emitted when a representation is destroyed.

void pqServerManagerModel::representationRemoved ( pqRepresentation ) [signal]
void pqServerManagerModel::nameChanged ( pqServerManagerModelItem item) [signal]

Fired when the name of an item changes.

void pqServerManagerModel::modifiedStateChanged ( pqServerManagerModelItem item) [signal]

Fired when the state of the model item changes.

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

Fired when a connection between two pqPipelineSources is created.

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

Fired when a connection between tow pqPipelineSources is broken.

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

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

the pipeline was updated.

virtual void pqServerManagerModel::onProxyRegistered ( const QString &  group,
const QString &  name,
vtkSMProxy proxy 
) [protected, virtual, slot]

Called when a proxy is registered.

virtual void pqServerManagerModel::onProxyUnRegistered ( const QString &  group,
const QString &  name,
vtkSMProxy proxy 
) [protected, virtual, slot]

Called when a proxy is unregistered.

virtual void pqServerManagerModel::onConnectionCreated ( vtkIdType  id) [protected, virtual, slot]

Called when a new server connection is created.

virtual void pqServerManagerModel::onConnectionClosed ( vtkIdType  id) [protected, virtual, slot]

Called when a server connection is closed.

virtual void pqServerManagerModel::onStateLoaded ( vtkPVXMLElement ,
vtkSMProxyLocator  
) [protected, virtual, slot]

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: