Gui::PrefColorButton Class Reference

The PrefColorButton class. More...

#include <PrefWidgets.h>

Public Member Functions

 PrefColorButton (QWidget *parent=nullptr)
 
virtual ~PrefColorButton ()
 
- Public Member Functions inherited from Gui::ColorButton
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...
 
- Public Member Functions inherited from Gui::PrefWidget
QByteArray entryName () const
 Returns the widget's preference name. More...
 
virtual void OnChange (Base::Subject< const char * > &rCaller, const char *sReason)
 This method is called if one or more values in the parameter settings are changed where getParamGrp() points to. More...
 
void onRestore ()
 Restores the preferences of the widget. More...
 
void onSave ()
 Saves the current preferences of the widget. More...
 
QByteArray paramGrpPath () const
 Returns the widget's preferences path. More...
 
void setEntryName (const QByteArray &name)
 Sets the preference name to name. More...
 
void setParamGrpPath (const QByteArray &path)
 Sets the preference path to path. More...
 
void setPrefEntry (const QByteArray &name)
 Does the same as setEntryName(). More...
 
void setPrefPath (const QByteArray &name)
 Does the same as setParamGrpPath(). More...
 
- Public Member Functions inherited from Gui::WindowParameter
ParameterGrp::handle getWindowParameter (void)
 return the parameter group of this window More...
 
void OnChange (Base::Subject< const char * > &rCaller, const char *sReason)
 
bool setGroupName (const char *name)
 Sets the group of the window to name. More...
 
 WindowParameter (const char *name)
 
virtual ~WindowParameter ()
 

Protected Member Functions

void restorePreferences ()
 Restores the preferences Must be reimplemented in any subclasses. More...
 
void savePreferences ()
 Save the preferences Must be reimplemented in any subclasses. More...
 
- Protected Member Functions inherited from Gui::ColorButton
void paintEvent (QPaintEvent *)
 Draws the button label. More...
 
- Protected Member Functions inherited from Gui::PrefWidget
void failedToRestore (const QString &) const
 Print warning that restoring failed. More...
 
void failedToSave (const QString &) const
 Print warning that saving failed. More...
 
 PrefWidget ()
 Constructs a preference widget. More...
 
virtual void restorePreferences ()=0
 Restores the preferences Must be reimplemented in any subclasses. More...
 
virtual void savePreferences ()=0
 Save the preferences Must be reimplemented in any subclasses. More...
 
virtual ~PrefWidget ()
 Destroys the widget and detaches it from its parameter group. More...
 

Properties

QByteArray prefEntry
 
QByteArray prefPath
 
- Properties inherited from Gui::ColorButton
bool allowChangeColor
 
bool allowTransparency
 
QColor color
 
bool drawFrame
 

Additional Inherited Members

- Public Slots inherited from Gui::ColorButton
void onChooseColor ()
 Opens a QColorDialog to set a new color. More...
 
- Signals inherited from Gui::ColorButton
void changed ()
 Emits this signal when color has changed. More...
 
- Static Public Member Functions inherited from Gui::WindowParameter
static ParameterGrp::handle getDefaultParameter (void)
 get the parameters More...
 

Detailed Description

The PrefColorButton class.

Author
Werner Mayer

Constructor & Destructor Documentation

◆ PrefColorButton()

PrefColorButton::PrefColorButton ( QWidget parent = nullptr)

◆ ~PrefColorButton()

PrefColorButton::~PrefColorButton ( )
virtual

Member Function Documentation

◆ restorePreferences()

void PrefColorButton::restorePreferences ( )
protectedvirtual

◆ savePreferences()

void PrefColorButton::savePreferences ( )
protectedvirtual

Property Documentation

◆ prefEntry

QByteArray Gui::PrefColorButton::prefEntry
readwrite

◆ prefPath

QByteArray Gui::PrefColorButton::prefPath
readwrite

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