Gui::PrefColorButton Class Reference
The PrefColorButton class. More...
#include <PrefWidgets.h>
Public Member Functions | |
PrefColorButton (QWidget *parent=0) | |
virtual ~PrefColorButton () | |
![]() | |
bool allowChangeColor () const | |
bool autoChangeColor () const | |
QColor color () const | |
ColorButton (QWidget *parent=0) | |
Constructs a colored button called name with parent parent. More... | |
bool drawFrame () const | |
bool isModal () const | |
void setAllowChangeColor (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... | |
![]() | |
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... | |
![]() | |
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... | |
![]() | |
void paintEvent (QPaintEvent *) | |
Draws the button label. More... | |
![]() | |
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 ~PrefWidget () | |
Destroys the widget and detaches it from its parameter group. More... | |
Properties | |
QByteArray prefEntry | |
QByteArray prefPath | |
![]() | |
bool allowChangeColor | |
QColor color | |
Returns the current color of the button. More... | |
bool drawFrame | |
Additional Inherited Members | |
![]() | |
void onChooseColor () | |
Opens a QColorDialog to set a new color. More... | |
![]() | |
void changed () | |
Emits this signal when color has changed. More... | |
![]() | |
static ParameterGrp::handle getDefaultParameter (void) | |
get the parameters More... | |
Detailed Description
The PrefColorButton class.
Constructor & Destructor Documentation
◆ PrefColorButton()
PrefColorButton::PrefColorButton | ( | QWidget * | parent = 0 | ) |
◆ ~PrefColorButton()
|
virtual |
Member Function Documentation
◆ restorePreferences()
|
protectedvirtual |
Restores the preferences Must be reimplemented in any subclasses.
Implements Gui::PrefWidget.
References Gui::ColorButton::color, Gui::PrefWidget::entryName(), Gui::PrefWidget::failedToRestore(), ParameterGrp::GetUnsigned(), Gui::WindowParameter::getWindowParameter(), DraftVecUtils::isNull(), and Gui::ColorButton::setColor().
◆ savePreferences()
|
protectedvirtual |
Save the preferences Must be reimplemented in any subclasses.
Implements Gui::PrefWidget.
References Gui::ColorButton::color, Gui::PrefWidget::entryName(), Gui::PrefWidget::failedToSave(), Gui::WindowParameter::getWindowParameter(), DraftVecUtils::isNull(), and ParameterGrp::SetUnsigned().
Property Documentation
◆ prefEntry
|
readwrite |
◆ prefPath
|
readwrite |
The documentation for this class was generated from the following files:
- src/Gui/PrefWidgets.h
- src/Gui/PrefWidgets.cpp