32 #ifndef pqServerManagerModel_h 33 #define pqServerManagerModel_h 35 #include "pqCoreModule.h" 48 class vtkPVXMLElement;
51 class vtkSMProxyLocator;
80 typedef QObject Superclass;
91 pqServer* findServer(vtkIdType cid)
const;
95 pqServer* findServer(vtkSession*)
const;
96 pqServer* findServer(vtkSMSession*)
const;
102 void beginRemoveServer(
pqServer *server);
103 void endRemoveServer();
117 return ::pqFindItem<T>(
this, proxy);
125 return ::pqFindItem<T>(
this, id);
132 return ::pqFindItems<T>(
this);
139 return ::pqGetNumberOfItems<T>(
this);
148 return ::pqGetItemAtIndex<T>(
this, index);
156 return ::pqFindItems<T>(
this, server);
166 return ::pqFindItem<T>(
this, name);
171 const QMetaObject &mo, QList<void *> *list,
pqServer* server=0);
175 const QMetaObject& mo, vtkSMProxy* proxy);
179 const QMetaObject& mo, vtkTypeUInt32
id);
183 const QMetaObject& mo,
const QString& name);
201 void aboutToRemoveServer(
pqServer* server);
204 void finishedRemovingServer();
218 void preProxyRemoved(
pqProxy*);
230 void preViewAdded(
pqView* view);
231 void viewAdded(
pqView* view);
234 void preViewRemoved(
pqView*);
235 void viewRemoved(
pqView*);
270 virtual void onProxyRegistered(
const QString& group,
const QString& name,
274 virtual void onProxyUnRegistered(
const QString& group,
const QString& name,
278 virtual void onConnectionCreated(vtkIdType
id);
281 virtual void onConnectionClosed(vtkIdType
id);
285 virtual void onStateLoaded(vtkPVXMLElement*, vtkSMProxyLocator*);
291 void updateSettingsFromQSettings(
pqServer* server);
295 pqInternal* Internal;
305 reinterpret_cast<QList<void *>*
>(&list), 0);
316 reinterpret_cast<QList<void *>*
>(&list), server);
324 return qobject_cast<T>(
333 return qobject_cast<T>(
342 return qobject_cast<T>(
350 return pqFindItems<T>(model).size();
357 QList<T> items = pqFindItems<T>(model);
358 if (index < items.size())
int pqGetNumberOfItems(const pqServerManagerModel *const model)
QList< T > pqFindItems(const pqServerManagerModel *const model)
This is PQ representation for a single representation.
pqServerManagerModelItem is a element maintained by pqServerManagerModel.
T pqGetItemAtIndex(const pqServerManagerModel *const model, int index)
This is a PQ abstraction of a generic view module.
T findItem(const QString &name) const
Returns an item with the given name.
static pqServerManagerModelItem * findItemHelper(const pqServerManagerModel *const model, const QMetaObject &mo, vtkSMProxy *proxy)
Internal method.
T findItem(vtkTypeUInt32 id) const
Given the gloabal id for a proxy, locates a pqServerManagerModelItem subclass for the proxy...
This is a vtkSMProxyManager observer.
QList< T > findItems() const
Returns a list of pqServerManagerModelItem of the given type.
T pqFindItem(const pqServerManagerModel *const model, const QString &name)
T findItem(vtkSMProxy *proxy) const
Given a proxy, locates a pqServerManagerModelItem subclass for the given proxy.
This class represents any registered Server Manager proxy.
pqServerManagerModel is the model for the Server Manager.
int getNumberOfItems() const
Returns the number of items of the given type.
PQ representation for a vtkSMProxy that can be involved in a pipeline.
T getItemAtIndex(int index) const
Returns the item of the given type and the given index.
QList< T > findItems(pqServer *server) const
Same as findItems<T>() except that this returns only those items that are on the indicated server...
pqServerResource encapsulates a resource in ParaView.
static void findItemsHelper(const pqServerManagerModel *const model, const QMetaObject &mo, QList< void *> *list, pqServer *server=0)
Internal method.
pqServer (should be renamed to pqSession) is a pqServerManagerModelItem subclass that represents a vt...