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());
54 connect(mColorButton, SIGNAL(colorChanged(QColor)),
this, SLOT(valueChanged(QColor)), Qt::QueuedConnection);
59 gridLayout->addWidget(mColorButton, row, 1);
63 QHBoxLayout* topLayout =
new QHBoxLayout;
64 topLayout->setMargin(0);
65 this->setLayout(topLayout);
67 topLayout->addWidget(mLabel);
68 topLayout->addWidget(mColorButton, 1);
74 void ColorSelectWidget::valueChanged(QColor val)
76 if (val == mData->getValue())
81 void ColorSelectWidget::prePaintEvent()
83 mColorButton->blockSignals(
true);
85 this->setEnabled(mData->getEnabled());
87 mColorButton->
setColor(mData->getValue());
88 mColorButton->setToolTip(mData->getHelp());
89 mLabel->setToolTip(mData->getHelp());
91 mColorButton->blockSignals(
false);
boost::shared_ptr< class ColorPropertyBase > ColorPropertyBasePtr