37 #include <QFontMetrics>
48 QWidget(parent), mData(data)
50 this->setToolTip(data->getHelp());
57 QHBoxLayout* aLayout =
new QHBoxLayout(retval);
58 aLayout->setMargin(0);
59 aLayout->addWidget(
new QLabel(data->getDisplayName(), retval), 0);
60 retval->addSmallControlsForIndex(
"x",
"X", 0, aLayout);
61 retval->addSmallControlsForIndex(
"y",
"Y", 1, aLayout);
62 retval->addSmallControlsForIndex(
"z",
"Z", 2, aLayout);
71 QVBoxLayout* aLayout =
new QVBoxLayout(retval);
72 aLayout->setMargin(0);
73 retval->addSliderControlsForIndex(
"x",
"X", 0, aLayout);
74 retval->addSliderControlsForIndex(
"y",
"Y", 1, aLayout);
75 retval->addSliderControlsForIndex(
"z",
"Z", 2, aLayout);
82 mWidgets[dim]->setVisible(visible);
88 void Vector3DWidget::addSliderControlsForIndex(QString name, QString help,
int index, QBoxLayout* layout)
92 layout->addWidget(mWidgets[index]);
94 mDoubleAdapter[index] = component;
100 void Vector3DWidget::addSmallControlsForIndex(QString name, QString help,
int index, QBoxLayout* layout)
104 ScalarInteractionWidget* widget =
new ScalarInteractionWidget(
this, component);
105 widget->enableSpinBox();
107 mWidgets[index] = widget;
108 layout->addWidget(mWidgets[index], 1);
110 mDoubleAdapter[index] = component;
boost::shared_ptr< Vector3DPropertyBase > Vector3DPropertyBasePtr
boost::shared_ptr< Vector3DComponentProperty > Vector3DComponentPropertyPtr