42 this->setEnabled(dataInterface->getEnabled());
44 mData = dataInterface;
45 connect(mData.get(), SIGNAL(changed()),
this, SLOT(
setModified()));
47 mLabel =
new QLabel(
this);
48 mLabel->setText(dataInterface->getDisplayName());
51 connect(mColorButton, SIGNAL(colorChanged(QColor)),
this, SLOT(valueChanged(QColor)));
56 gridLayout->addWidget(mColorButton, row, 1);
60 QHBoxLayout* topLayout =
new QHBoxLayout;
61 topLayout->setMargin(0);
62 this->setLayout(topLayout);
64 topLayout->addWidget(mLabel);
65 topLayout->addWidget(mColorButton, 1);
71 void ColorSelectWidget::valueChanged(QColor val)
73 if (val == mData->getValue())
78 void ColorSelectWidget::prePaintEvent()
80 mColorButton->blockSignals(
true);
82 this->setEnabled(mData->getEnabled());
84 mColorButton->
setColor(mData->getValue());
85 mColorButton->setToolTip(mData->getHelp());
86 mLabel->setToolTip(mData->getHelp());
88 mColorButton->blockSignals(
false);
boost::shared_ptr< class ColorPropertyBase > ColorPropertyBasePtr