4 #ifndef pqPropertyLinks_h 5 #define pqPropertyLinks_h 41 typedef QObject Superclass;
64 bool addPropertyLink(QObject* qobject,
const char* qproperty,
const char* qsignal,
70 bool addTraceablePropertyLink(QObject* qobject,
const char* qproperty,
const char* qsignal,
76 template <
class ConnectionType>
77 bool addPropertyLink(QObject* qobject,
const char* qproperty,
const char* qsignal,
79 ConnectionType* notused =
nullptr);
86 template <
class ConnectionType>
87 bool addTraceablePropertyLink(QObject* qobject,
const char* qproperty,
const char* qsignal,
89 ConnectionType* notused =
nullptr);
94 bool removePropertyLink(QObject* qobject,
const char* qproperty,
const char* qsignal,
103 int getNumberOfPropertyLinks()
const;
135 void setUseUncheckedProperties(
bool val);
143 void qtWidgetChanged();
144 void smPropertyChanged();
151 void onQtPropertyModified();
152 void onSMPropertyModified();
157 template <
class ConnectionType>
158 ConnectionType* addPropertyLinkInternal(QObject* qobject,
const char* qproperty,
164 pqInternals* Internals;
165 bool UseUncheckedProperties;
166 bool AutoUpdateVTKObjects;
170 template <
class ConnectionType>
171 ConnectionType* pqPropertyLinks::addPropertyLinkInternal(QObject* qobject,
const char* qproperty,
174 if (!qobject || !qproperty || !qsignal || !smproxy || !smproperty)
176 qCritical() <<
"Invalid parameters to pqPropertyLinks::addPropertyLinkInternal";
177 qDebug() <<
"(" << qobject <<
", " << qproperty <<
", " << qsignal <<
") <==> (" 178 << (smproxy ? smproxy->
GetXMLName() :
"(none)") <<
"," 179 << (smproperty ? smproperty->
GetXMLLabel() :
"(none)") << smindex <<
")";
183 ConnectionType* connection =
new ConnectionType(qobject, qproperty, qsignal, smproxy, smproperty,
184 smindex, this->useUncheckedProperties(),
this);
185 this->addNewConnection(connection);
191 template <
class ConnectionType>
195 auto connection = this->addPropertyLinkInternal<ConnectionType>(
196 qobject, qproperty, qsignal, smproxy, smproperty, smindex);
197 return connection !=
nullptr;
201 template <
class ConnectionType>
205 auto connection = this->addPropertyLinkInternal<ConnectionType>(
206 qobject, qproperty, qsignal, smproxy, smproperty, smindex);
209 connection->setTraceChanges(
true);
bool useUncheckedProperties() const
superclass for all SM properties
bool addTraceablePropertyLink(QObject *qobject, const char *qproperty, const char *qsignal, vtkSMProxy *smproxy, vtkSMProperty *smproperty, int smindex=-1)
Like addPropertyLink, but also sets up properties to be Python traceable.
virtual char * GetXMLLabel()
The label assigned by the xml parser.
pqPropertyLinks is used to connect vtkSMProperty and subclasses to properties on QObject instances...
bool autoUpdateVTKObjects() const
proxy for a VTK object(s) on a server
void setAutoUpdateVTKObjects(bool val)
set whether UpdateVTKObjects is called automatically when needed
void removeAllPropertyLinks()
Remove all links.
pqPropertyLinksConnection is used by pqPropertyLinks to keep a QObject and vtkSMProperty linked toget...
bool addPropertyLink(QObject *qobject, const char *qproperty, const char *qsignal, vtkSMProxy *smproxy, vtkSMProperty *smproperty, int smindex=-1)
Setup a link between a Qt property and vtkSMProperty on a vtkSMProxy instance.
virtual char * GetXMLName()
Assigned by the XML parser.