Gui::ColorButton Class Reference

Implementation of a color button. More...

#include <Widgets.h>

Public Slots

void onChooseColor ()
 Opens a QColorDialog to set a new color. More...


void changed ()
 Emits this signal when color has changed. More...

Public Member Functions

bool allowChangeColor () const
bool allowTransparency () const
bool autoChangeColor () const
QColor color () const
 Returns the current color of the button. More...
 ColorButton (QWidget *parent=nullptr)
 Constructs a colored button called name with parent parent. More...
bool drawFrame () const
bool isModal () const
void setAllowChangeColor (bool)
void setAllowTransparency (bool)
void setAutoChangeColor (bool)
void setColor (const QColor &)
 Sets the color c to the button. More...
void setDrawFrame (bool)
void setModal (bool)
 ~ColorButton ()
 Destroys the button. More...

Protected Member Functions

void paintEvent (QPaintEvent *)
 Draws the button label. More...


bool allowChangeColor
bool allowTransparency
QColor color
bool drawFrame

Detailed Description

Implementation of a color button.

Werner Mayer

Constructor & Destructor Documentation

◆ ColorButton()

ColorButton::ColorButton ( QWidget parent = nullptr)

Constructs a colored button called name with parent parent.

References Gui::ColorButtonP::col, draftgeoutils.intersections::connect(), and onChooseColor().

◆ ~ColorButton()

ColorButton::~ColorButton ( )

Destroys the button.

Member Function Documentation

◆ allowChangeColor()

bool ColorButton::allowChangeColor ( ) const

◆ allowTransparency()

bool Gui::ColorButton::allowTransparency ( ) const

◆ autoChangeColor()

bool ColorButton::autoChangeColor ( ) const

◆ changed

void Gui::ColorButton::changed ( )

Emits this signal when color has changed.

Referenced by onChooseColor().

◆ color()

◆ drawFrame()

bool ColorButton::drawFrame ( ) const

◆ isModal()

bool ColorButton::isModal ( ) const

◆ onChooseColor

◆ paintEvent()

void ColorButton::paintEvent ( QPaintEvent *  e)

◆ setAllowChangeColor()

void ColorButton::setAllowChangeColor ( bool  ok)

◆ setAllowTransparency()

void Gui::ColorButton::setAllowTransparency ( bool  allow)

◆ setAutoChangeColor()

void ColorButton::setAutoChangeColor ( bool  on)

◆ setColor()

◆ setDrawFrame()

void ColorButton::setDrawFrame ( bool  ok)

◆ setModal()

void ColorButton::setModal ( bool  b)

Property Documentation

◆ allowChangeColor

bool Gui::ColorButton::allowChangeColor

◆ allowTransparency

bool Gui::ColorButton::allowTransparency

◆ color

◆ drawFrame

bool Gui::ColorButton::drawFrame

The documentation for this class was generated from the following files: