[Widgets] register transparency property of Gui::ColorButton
- at the moment it is not possible to set the property "allowTransparency" in Qt Designer
This commit is contained in:
@@ -1762,7 +1762,10 @@ void PrefDoubleSpinBox::setParamGrpPath ( const QByteArray& name )
|
||||
// -------------------------------------------------------------
|
||||
|
||||
ColorButton::ColorButton(QWidget* parent)
|
||||
: QPushButton( parent ), _allowChange(true), _drawFrame(true)
|
||||
: QPushButton(parent),
|
||||
_allowChange(true),
|
||||
_drawFrame(true),
|
||||
_allowTransparency(false)
|
||||
{
|
||||
_col = palette().color(QPalette::Active,QPalette::Midlight);
|
||||
connect( this, SIGNAL( clicked() ), SLOT( onChooseColor() ));
|
||||
@@ -1793,6 +1796,16 @@ bool ColorButton::allowChangeColor() const
|
||||
return _allowChange;
|
||||
}
|
||||
|
||||
void ColorButton::setAllowTransparency(bool ok)
|
||||
{
|
||||
_allowTransparency = ok;
|
||||
}
|
||||
|
||||
bool ColorButton::allowTransparency() const
|
||||
{
|
||||
return _allowTransparency;
|
||||
}
|
||||
|
||||
void ColorButton::setDrawFrame(bool ok)
|
||||
{
|
||||
_drawFrame = ok;
|
||||
|
||||
Reference in New Issue
Block a user