41 #include <dtkCoreSupport/dtkAbstractProcess.h>
42 #include <dtkCoreSupport/dtkGlobal.h>
46 class axlInspectorToolPrivate
58 this->setAttribute(Qt::WA_MacShowFocusRect,
false);
59 this->setFrameShape(QFrame::NoFrame);
60 this->setWidgetResizable(
true);
61 this->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);
72 QObject * obj = QObject::sender();
75 tool->setVisible(
false);
77 disconnect(tool, SIGNAL(dataSetFieldsChanged(QList<axlAbstractData*>, QString)), d->view, SLOT(onUpdateActorField(QList<axlAbstractData *>, QString)));
78 disconnect(tool, SIGNAL(dataSetFieldsChanged(QList<axlAbstractData*>, QString)),
this, SIGNAL(
fieldsCreatedOnData(QList<axlAbstractData *>, QString)));
84 disconnect(tool, SIGNAL(
update()),
this, SIGNAL(
update()));
97 if (tool && !dynamic_cast<axlInspectorToolCreator *>(tool)) {
107 connect(tool, SIGNAL(dataSetFieldsChanged(QList<axlAbstractData*>, QString)), d->view, SLOT(onUpdateActorField(QList<axlAbstractData *>, QString)));
108 connect(tool, SIGNAL(dataSetFieldsChanged(QList<axlAbstractData*>, QString)),
this, SIGNAL(
fieldsCreatedOnData(QList<axlAbstractData *>, QString)));
116 connect(tool, SIGNAL(
update()),
this, SIGNAL(
update()));
120 if(!(interface_name ==
"FieldGenerator")) {
121 tool->setAttribute(Qt::WA_DeleteOnClose);
125 if(interface_name ==
"FieldGenerator") {
126 connect(tool, SIGNAL(dataSetFieldsChanged(QList<axlAbstractData*>, QString)), d->view, SLOT(onUpdateActorField(QList<axlAbstractData *>, QString)));
127 connect(tool, SIGNAL(dataSetFieldsChanged(QList<axlAbstractData*>, QString)),
this, SIGNAL(
fieldsCreatedOnData(QList<axlAbstractData *>, QString)));
131 this->setWidget(tool);
134 }
else if(interface_name ==
"axlAbstractCreator") {
136 if(implementation ==
"axlLineCreator") {
143 qDebug()<<
"No controller founded for InspectorTool";
146 this->setWidget(tool);
147 tool->setAttribute(Qt::WA_DeleteOnClose);
150 else if(implementation ==
"axlConeCreator") {
157 qDebug()<<
"No controller founded for InspectorTool";
162 this->setWidget(tool);
163 tool->setAttribute(Qt::WA_DeleteOnClose);
166 else if(implementation ==
"axlCylinderCreator") {
173 qDebug()<<
"No controller founded for InspectorTool";
178 this->setWidget(tool);
179 tool->setAttribute(Qt::WA_DeleteOnClose);
182 else if(implementation ==
"axlTorusCreator") {
189 qDebug()<<
"No controller founded for InspectorTool";
194 this->setWidget(tool);
195 tool->setAttribute(Qt::WA_DeleteOnClose);
199 else if(implementation ==
"axlCircleArcCreator") {
206 qDebug()<<
"No controller founded for InspectorTool";
209 this->setWidget(tool);
210 tool->setAttribute(Qt::WA_DeleteOnClose);
213 else if(implementation ==
"axlEllipsoidCreator") {
220 qDebug()<<
"No controller founded for InspectorTool";
223 this->setWidget(tool);
224 tool->setAttribute(Qt::WA_DeleteOnClose);
228 else if(implementation ==
"axlPlaneCreator") {
235 qDebug()<<
"No controller founded for InspectorTool";
238 this->setWidget(tool);
239 tool->setAttribute(Qt::WA_DeleteOnClose);
243 if(implementation ==
"axlPointCreator") {
250 qDebug()<<
"No controller founded for InspectorTool";
253 this->setWidget(tool);
254 tool->setAttribute(Qt::WA_DeleteOnClose);
270 if(implementation ==
"axlSphereCreator") {
277 qDebug()<<
"No controller founded for InspectorTool";
282 this->setWidget(tool);
283 tool->setAttribute(Qt::WA_DeleteOnClose);
286 if(implementation ==
"axlDataDynamicCreator") {
293 qDebug()<<
"No controller founded for InspectorTool";
296 this->setWidget(tool);
297 tool->setAttribute(Qt::WA_DeleteOnClose);
303 else if(interface_name ==
"FieldGenerator") {
310 qDebug()<<
"No controller founded for InspectorTool";
312 connect(tool, SIGNAL(dataSetFieldsChanged(QList<axlAbstractData*>, QString)), d->view, SLOT(onUpdateActorField(QList<axlAbstractData *>, QString)));
313 connect(tool, SIGNAL(dataSetFieldsChanged(QList<axlAbstractData*>, QString)),
this, SIGNAL(
fieldsCreatedOnData(QList<axlAbstractData *>, QString)));
315 this->setWidget(tool);
329 connect(tool, SIGNAL(dataSetFieldsChanged(QList<axlAbstractData*>, QString)), d->view, SLOT(onUpdateActorField(QList<axlAbstractData *>, QString)));
330 connect(tool, SIGNAL(dataSetFieldsChanged(QList<axlAbstractData*>, QString)),
this, SIGNAL(
fieldsCreatedOnData(QList<axlAbstractData *>, QString)));
333 this->setWidget(tool);
337 if (this->widget() && this->widget()->layout()) {
338 this->widget()->layout()->setAlignment(Qt::AlignTop);
344 d->controller = controller;
Class axlAbstractData defines an API for all type of axel data.