21 this->setEnabled(dataInterface->getEnabled());
23 mData = dataInterface;
24 connect(mData.get(), SIGNAL(changed()),
this, SLOT(
setModified()));
26 mLabel =
new QLabel(
this);
27 mLabel->setText(dataInterface->getDisplayName());
33 connect(mColorButton, SIGNAL(colorChanged(QColor)),
this, SLOT(valueChanged(QColor)), Qt::QueuedConnection);
38 gridLayout->addWidget(mColorButton, row, 1);
42 QHBoxLayout* topLayout =
new QHBoxLayout;
43 topLayout->setMargin(0);
44 this->setLayout(topLayout);
46 topLayout->addWidget(mLabel);
47 topLayout->addWidget(mColorButton, 1);
53 void ColorSelectWidget::valueChanged(QColor val)
55 if (val == mData->getValue())
60 void ColorSelectWidget::prePaintEvent()
62 mColorButton->blockSignals(
true);
64 this->setEnabled(mData->getEnabled());
66 mColorButton->
setColor(mData->getValue());
67 mColorButton->setToolTip(mData->getHelp());
68 mLabel->setToolTip(mData->getHelp());
70 mColorButton->blockSignals(
false);