32 #ifndef pqPropertyLinks_h 33 #define pqPropertyLinks_h 69 typedef QObject Superclass;
92 bool addPropertyLink(QObject* qobject,
const char* qproperty,
const char* qsignal,
98 bool addTraceablePropertyLink(QObject* qobject,
const char* qproperty,
const char* qsignal,
104 template <
class ConnectionType>
105 bool addPropertyLink(QObject* qobject,
const char* qproperty,
const char* qsignal,
107 ConnectionType* notused =
nullptr);
114 template <
class ConnectionType>
115 bool addTraceablePropertyLink(QObject* qobject,
const char* qproperty,
const char* qsignal,
117 ConnectionType* notused =
nullptr);
122 bool removePropertyLink(QObject* qobject,
const char* qproperty,
const char* qsignal,
153 void setUseUncheckedProperties(
bool val);
161 void qtWidgetChanged();
162 void smPropertyChanged();
169 void onQtPropertyModified();
170 void onSMPropertyModified();
175 template <
class ConnectionType>
176 ConnectionType* addPropertyLinkInternal(QObject* qobject,
const char* qproperty,
182 pqInternals* Internals;
183 bool UseUncheckedProperties;
184 bool AutoUpdateVTKObjects;
188 template <
class ConnectionType>
189 ConnectionType* pqPropertyLinks::addPropertyLinkInternal(QObject* qobject,
const char* qproperty,
192 if (!qobject || !qproperty || !qsignal || !smproxy || !smproperty)
194 qCritical() <<
"Invalid parameters to pqPropertyLinks::addPropertyLinkInternal";
195 qDebug() <<
"(" << qobject <<
", " << qproperty <<
", " << qsignal <<
") <==> (" 196 << (smproxy ? smproxy->
GetXMLName() :
"(none)") <<
"," 197 << (smproperty ? smproperty->
GetXMLLabel() :
"(none)") << smindex <<
")";
201 ConnectionType* connection =
new ConnectionType(qobject, qproperty, qsignal, smproxy, smproperty,
202 smindex, this->useUncheckedProperties(),
this);
203 this->addNewConnection(connection);
209 template <
class ConnectionType>
213 auto connection = this->addPropertyLinkInternal<ConnectionType>(
214 qobject, qproperty, qsignal, smproxy, smproperty, smindex);
215 return connection !=
nullptr;
219 template <
class ConnectionType>
223 auto connection = this->addPropertyLinkInternal<ConnectionType>(
224 qobject, qproperty, qsignal, smproxy, smproperty, smindex);
227 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.