26 #include <dtkGuiSupport/dtkColorButton.h>
27 #include <dtkGuiSupport/dtkSplitter.h>
31 class axlInspectorObjectDataDynamicPrivate
44 QVBoxLayout *layoutTop;
49 d(new axlInspectorObjectDataDynamicPrivate)
51 d->dynamicData = NULL;
53 d->layoutTop =
new QVBoxLayout;
54 d->layoutTop->addWidget(
new QLabel(
"axlInspectorObjectDataDynamic",
this));
55 d->layoutTop->addStretch(1);
57 QWidget *top =
new QWidget(
this);
58 top->setMaximumWidth(295);
59 top->setLayout(d->layoutTop);
75 return QSize(300, 300);
81 d->dynamicData = dynamicData;
84 QLabel *newLabelOutput=
new QLabel(
this);
85 newLabelOutput->setText(
"Outputs :");
86 d->layoutTop->addWidget(newLabelOutput);
88 QLabel *newLabel=
new QLabel(
this);
89 newLabel->setText(d->dynamicData->outputs(i)->name());
90 d->layoutTop->addWidget(newLabel);
94 QLabel *newLabel=
new QLabel(
this);
95 newLabel->setText(
"Inputs :");
96 d->layoutTop->addWidget(newLabel);
97 for(
int i = 0; i < d->dynamicData->inputs().size();i++){
98 if(
axlDouble *valueInput = dynamic_cast<axlDouble *>(d->dynamicData->inputs().at(i))){
99 QDoubleSpinBox *newBox =
new QDoubleSpinBox(
this);
100 newBox->setValue(valueInput->value());
101 newBox->setSingleStep(0.10);
102 connect(newBox, SIGNAL(valueChanged(
double)), valueInput, SLOT(setValue(
double)));
103 connect(newBox, SIGNAL(valueChanged(
double)),
this, SIGNAL(
update()));
104 d->layoutTop->addWidget(newBox);
105 }
else if(
axlInteger *valueInput = dynamic_cast<axlInteger *>(d->dynamicData->inputs().at(i))) {
106 QSpinBox *newBox =
new QSpinBox(
this);
107 newBox->setValue(valueInput->value());
108 connect(newBox, SIGNAL(valueChanged(
int)), valueInput, SLOT(setValue(
int)));
109 connect(newBox, SIGNAL(valueChanged(
int)),
this, SIGNAL(
update()));
110 d->layoutTop->addWidget(newBox);
112 QLabel *newLabel=
new QLabel(
this);
113 newLabel->setText(d->dynamicData->inputs().at(i)->name());
114 d->layoutTop->addWidget(newLabel);
virtual int numberOfChannels(void)
Return the number of output(s);.
Class axlDouble defines a double.
axlInspectorObjectDataDynamic(QWidget *parent=0)
~axlInspectorObjectDataDynamic(void)
QSize sizeHint(void) const
Class axlDataDynamic defines a dynamic object.
Class axlInteger defines an integer.
void setData(axlDataDynamic *dynamicData)