32 #ifndef pqPropertyLinks_h 33 #define pqPropertyLinks_h 38 #include "pqCoreModule.h" 67 typedef QObject Superclass;
88 QObject* qobject,
const char* qproperty,
const char* qsignal,
89 vtkSMProxy* smproxy, vtkSMProperty* smproperty,
int smindex=-1)
91 return this->addPropertyLink<pqPropertyLinksConnection>(
92 qobject, qproperty, qsignal, smproxy, smproperty, smindex);
95 template <
class ConnectionType>
97 QObject* qobject,
const char* qproperty,
const char* qsignal,
98 vtkSMProxy* smproxy, vtkSMProperty* smproperty,
int smindex=-1,
99 ConnectionType* notused=NULL);
102 bool removePropertyLink(
103 QObject* qobject,
const char* qproperty,
const char* qsignal,
104 vtkSMProxy* smproxy, vtkSMProperty* smproperty,
int smindex=-1);
107 {
return this->AutoUpdateVTKObjects; }
109 {
return this->UseUncheckedProperties; }
128 void setUseUncheckedProperties(
bool val);
132 { this->AutoUpdateVTKObjects = val; }
135 void qtWidgetChanged();
136 void smPropertyChanged();
142 void onQtPropertyModified();
143 void onSMPropertyModified();
152 pqInternals* Internals;
153 bool UseUncheckedProperties;
154 bool AutoUpdateVTKObjects;
158 template <
class ConnectionType>
160 QObject* qobject,
const char* qproperty,
const char* qsignal,
161 vtkSMProxy* smproxy, vtkSMProperty* smproperty,
int smindex,
164 if (!qobject || !qproperty || !qsignal || !smproxy || !smproperty)
166 qCritical() <<
"Invalid parameters to pqPropertyLinks::addPropertyLink";
167 qDebug() <<
"(" << qobject <<
", " << qproperty <<
", " << qsignal
169 << (smproxy? smproxy->GetXMLName() :
"(none)")
170 <<
"," << (smproperty? smproperty->GetXMLLabel() :
"(none)")
175 qobject, qproperty, qsignal, smproxy, smproperty, smindex,
176 this->useUncheckedProperties(),
this);
177 return this->addNewConnection(connection);
bool useUncheckedProperties() const
pqPropertyLinks is used to connect vtkSMProperty and subclasses to properties on QObject instances...
bool autoUpdateVTKObjects() const
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.