33 #ifndef _pqLinksModel_h 34 #define _pqLinksModel_h 37 #include "pqCoreModule.h" 38 #include <QAbstractItemModel> 48 class vtkSMProxyListDomain;
49 class vtkSMProxyLocator;
50 class vtkPVXMLElement;
58 typedef QAbstractTableModel Superclass;
80 int rowCount(
const QModelIndex &parent=QModelIndex())
const;
82 int columnCount(
const QModelIndex &parent=QModelIndex())
const;
84 QVariant data(
const QModelIndex &index,
int role=Qt::DisplayRole)
const;
86 QVariant headerData(
int section, Qt::Orientation orient,
87 int role=Qt::DisplayRole)
const;
91 ItemType getLinkType(
const QModelIndex& idx)
const;
93 vtkSMLink* getLink(
const QModelIndex& idx)
const;
95 QModelIndex findLink(vtkSMLink* link)
const;
99 int FindLinksFromProxy(vtkSMProxy* inputProxy,
int direction,
100 vtkCollection* links)
const;
103 vtkSMProxy* getProxy1(
const QModelIndex& idx)
const;
105 vtkSMProxy* getProxy2(
const QModelIndex& idx)
const;
108 QString getProperty1(
const QModelIndex& idx)
const;
110 QString getProperty2(
const QModelIndex& idx)
const;
113 QString getLinkName(
const QModelIndex& idx)
const;
115 vtkSMLink* getLink(
const QString& name)
const;
118 void addProxyLink(
const QString& name,
119 vtkSMProxy* proxy1, vtkSMProxy* proxy2);
122 void addCameraLink(
const QString& name,
125 bool interactiveViewLink =
false);
128 bool hasInteractiveViewLink(
const QString& name);
134 void addPropertyLink(
const QString& name,
135 vtkSMProxy* proxy1,
const QString& prop1,
136 vtkSMProxy* proxy2,
const QString& prop2);
139 void addSelectionLink(
const QString& name,
140 vtkSMProxy* proxy1, vtkSMProxy* proxy2);
143 void removeLink(
const QModelIndex& idx);
145 void removeLink(
const QString& name);
150 static pqProxy* representativeProxy(vtkSMProxy* proxy);
154 static vtkSMProxyListDomain* proxyListDomain(vtkSMProxy* proxy);
158 void linkAdded(
int linkType);
161 void linkRemoved(
const QString& name);
169 void onStateLoaded(vtkPVXMLElement* root, vtkSMProxyLocator* locator);
173 void onStateSaved(vtkPVXMLElement* root);
176 void createInteractiveViewLink(
const QString& name, vtkSMProxy* displayView, vtkSMProxy* linkedView,
177 double xPos = 0.375,
double yPos = 0.375,
double xSize = 0.25,
double ySize = 0.25);
180 void emitLinkRemoved(
const QString& name);
183 ItemType getLinkType(vtkSMLink* link)
const;
184 vtkSMProxy* getProxyFromIndex(
const QModelIndex& idx,
int dir)
const;
185 QString getPropertyFromIndex(
const QModelIndex& idx,
int dir)
const;
188 pqInternal* Internal;
199 QString name()
const;
200 vtkSMLink* link()
const;
212 pqInternal* Internal;
214 void linkUndoStacks();
A Qt based model to represent the vtkSMLinks in the server manager.
pqServerManagerModelItem is a element maintained by pqServerManagerModel.
ItemType
type of link (camera, proxy or property)
This class represents any registered Server Manager proxy.
pqInteractiveViewLink is uaed by pqLinksModel to create interactive view links, wich are ViewLink all...
pqServer (should be renamed to pqSession) is a pqServerManagerModelItem subclass that represents a vt...