29 #include <dtkCoreSupport/dtkAbstractData.h>
30 #include <dtkCoreSupport/dtkGlobal>
37 class axlInspectorPrivate
52 Q_INIT_RESOURCE(axlGui);
53 Q_INIT_RESOURCE(axelShader);
58 d->inspector_object_manager->setController(d->controller);
61 d->inspector_tool_manager->setController(d->controller);
69 connect(d->inspector_tool_manager, SIGNAL(
update()),
this, SIGNAL(
update()));
71 connect(d->inspector_tool_manager, SIGNAL(
dataChanged(dtkAbstractData *)),
this, SIGNAL(
dataChanged(dtkAbstractData *)));
75 connect(d->inspector_tool_manager, SIGNAL(dataSetToRemove(QList<dtkAbstractData*>)), d->inspector_object_manager, SLOT(onDataRemoved(QList<dtkAbstractData*>)));
76 connect(d->inspector_tool_manager, SIGNAL(dataSetToRemove(QList<dtkAbstractData*>)),
this, SIGNAL(
dataSetRemoved(QList<dtkAbstractData*>)));
77 connect(d->inspector_tool_manager, SIGNAL(dataSetToRemove(QList<dtkAbstractData*>)), d->controller, SLOT(onDataRemoved(QList<dtkAbstractData*>)));
78 connect(d->inspector_tool_manager, SIGNAL(fieldsCreatedOnData(QList<axlAbstractData*>, QString)), d->inspector_object_manager, SLOT(onFieldsCreatedOnData(QList<axlAbstractData *>, QString)));
81 connect(d->inspector_object_manager, SIGNAL(
stateChanged(dtkAbstractData*,
int)),
this, SIGNAL(
stateChanged(dtkAbstractData*,
int)));
89 connect(d->inspector_object_manager, SIGNAL(
dataSetRemoved(QList<dtkAbstractData*>)),
this, SIGNAL(
dataSetRemoved(QList<dtkAbstractData*>)));
90 connect(d->inspector_object_manager, SIGNAL(
dataSetRemoved(QList<dtkAbstractData *>)), d->controller, SLOT(onDataRemoved(QList<dtkAbstractData*>)));
94 connect(d->inspector_object_manager, SIGNAL(
update()),
this, SIGNAL(
update()));
95 connect(d->inspector_object_manager, SIGNAL(
showCurrentPoint(
double,
double, dtkAbstractData *)),
this, SIGNAL(
showCurrentPoint(
double,
double, dtkAbstractData *)));
96 connect(d->inspector_object_manager, SIGNAL(
hideCurrentPoint(
double,
double, dtkAbstractData *)),
this, SIGNAL(
hideCurrentPoint(
double,
double, dtkAbstractData *)));
97 connect(d->inspector_object_manager, SIGNAL(
moveCurrentPoint(
double,
double, dtkAbstractData *)),
this, SIGNAL(
moveCurrentPoint(
double,
double, dtkAbstractData *)));
102 connect(d->side_pane, SIGNAL(showInspector(
bool)),
this, SLOT(
onShowInspector(
bool)));
107 connect(d->side_pane, SIGNAL(showSettings(
bool)),
this, SLOT(
onShowSettings(
bool)));
111 d->stack->setFixedWidth(0);
112 d->stack->addWidget(
"object", d->inspector_object_manager);
113 d->stack->addWidget(
"tool", d->inspector_tool_manager);
114 d->stack->addWidget(
"view", d->inspector_view);
117 d->settings->setFixedWidth(0);
119 QHBoxLayout *layout =
new QHBoxLayout(
this);
120 layout->setContentsMargins(0, 0, 0, 0);
121 layout->setSpacing(0);
122 layout->addWidget(d->side_pane);
123 layout->addWidget(d->stack);
124 layout->addWidget(d->settings);
126 this->setStyleSheet(dtkReadFile(
":axlGui/axlInspector.qss"));
127 this->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
139 return d->stack->size() + d->side_pane->size();
145 d->inspector_object_manager->insert(data);
147 d->inspector_object_manager->resizeColumnToContents();
152 d->inspector_object_manager->insert(data);
153 d->inspector_object_manager->resizeColumnToContents();
157 d->inspector_object_manager->removeData(data);
162 return d->inspector_object_manager->dataSet();
167 d->inspector_object_manager->setView(view);
168 d->inspector_tool_manager->setView(view);
169 d->inspector_view->setView(view);
174 d->inspector_view->updateView();
178 d->inspector_object_manager->onFieldOpened(dataSet, fieldName);
185 d->inspector_object_manager->onStateChanged(data, mode);
190 QPropertyAnimation *animation =
new QPropertyAnimation(d->stack,
"width");
191 animation->setDuration(600);
192 animation->setStartValue(0);
193 animation->setEndValue(300);
196 animation->setDirection(QAbstractAnimation::Forward);
199 animation->setDirection(QAbstractAnimation::Backward);
201 animation->start(QAbstractAnimation::DeleteWhenStopped);
206 QPropertyAnimation *animation =
new QPropertyAnimation(d->settings,
"width");
207 animation->setDuration(600);
208 animation->setStartValue(0);
209 animation->setEndValue(300);
212 animation->setDirection(QAbstractAnimation::Forward);
215 animation->setDirection(QAbstractAnimation::Backward);
217 animation->start(QAbstractAnimation::DeleteWhenStopped);
221 d->inspector_object_manager->clearScene();
virtual ~axlInspector(void)
void insertData(axlAbstractData *data)
void dataChangedByControlPoints(dtkAbstractData *data)
void switchFullScreen(void)
void onShowInspector(bool)
void interpolationChanded(dtkAbstractData *data, int interpolation)
void onStateChanged(dtkAbstractData *data, int mode)
axlInspector(QWidget *parent=0)
void moveCurrentPoint(double u, double v, dtkAbstractData *data)
void stateChanged(dtkAbstractData *data, int mode)
void hideCurrentPoint(double u, double v, dtkAbstractData *data)
void dataSetRemoved(QList< dtkAbstractData * > dataSetRemoved)
void dataChanged(dtkAbstractData *data)
void insertDataSet(QList< axlAbstractData * > dataSet)
void modifiedProperty(dtkAbstractData *, int)
QList< dtkAbstractData * > dataSet(void)
void sendFieldSignal(QList< axlAbstractData * > dataSet, QString fieldName)
QSize sizeHint(void) const
void setView(axlAbstractView *view)
void dataInserted(axlAbstractData *data)
void dataChangedByGeometry(dtkAbstractData *data)
void actorVisibilityChanged(dtkAbstractData *data, bool actorVisibility)
void showCurrentPoint(double u, double v, dtkAbstractData *data)
void removeData(dtkAbstractData *data)
void joystickCamera(void)
void onShowSettings(bool)
void trackballCamera(void)
Class axlAbstractData defines an API for all type of axel data.