A dialog devoted to allowing the user to select a custom color.
More...
|
| | QCustomColorDialog (bool is_small, bool show_line_edit_pickers, QWidget *parent=nullptr) |
| | Constructs a QCustomColorDialog with size and line edit picker options.
|
| | QCustomColorDialog (const RGBColor &initial, QWidget *parent=nullptr) |
| | Constructs a QCustomColorDialog with an initial color and the given parent widget.
|
| | QCustomColorDialog (QWidget *parent=nullptr) |
| | Constructs a QCustomColorDialog with the given parent widget.
|
|
| ~QCustomColorDialog () |
| | Destroys the color dialog.
|
| void | colorSelected (const RGBColor &color) |
| | Emitted when a color is selected (confirmed) by the user.
|
| RGBColor | currentColor () const |
| | Returns the color currently being edited in the dialog.
|
| void | currentColorEdited (const RGBColor &color) |
| | Emitted when the current color is changed by the user during editing.
|
|
void | finishedSignal () |
| | Emitted when the dialog is finished (accepted or rejected).
|
| void | open (QObject *receiver, const char *member) |
| | Opens the dialog and connects its finished signal to the specified receiver and member slot.
|
| RGBColor | selectedColor () const |
| | Returns the color that was last selected (confirmed) by the user.
|
| void | setCurrentColor (const RGBColor &color) |
| | Sets the currently displayed color in the dialog.
|
| void | setHorizontal (bool horizontal) |
| | Sets the layout orientation of the dialog.
|
| void | setMargin (int x, int y, int xx, int yy) |
| | Sets the content margins of the dialog layout.
|
| void | setShowAlpha (bool show_alpha) |
| | Sets whether the alpha channel slider and input are visible.
|
| void | setVisible (bool visible) override |
| | Overrides QWidget::setVisible to handle showing and hiding the dialog.
|
| bool | showAlpha () const |
| | Returns whether the alpha channel controls are currently visible.
|
|
| void | changeEvent (QEvent *event) override |
| | Handles change events such as language or palette changes.
|
A dialog devoted to allowing the user to select a custom color.
Definition at line 16 of file QCustomColorDialog.h.
◆ QCustomColorDialog() [1/3]
| QCustomColorDialog::QCustomColorDialog |
( |
QWidget * | parent = nullptr | ) |
|
|
explicit |
Constructs a QCustomColorDialog with the given parent widget.
- Parameters
-
| [in] | parent | The parent widget. |
◆ QCustomColorDialog() [2/3]
| QCustomColorDialog::QCustomColorDialog |
( |
const RGBColor & | initial, |
|
|
QWidget * | parent = nullptr ) |
|
explicit |
Constructs a QCustomColorDialog with an initial color and the given parent widget.
- Parameters
-
| [in] | initial | The initial color to display. |
| [in] | parent | The parent widget. |
◆ QCustomColorDialog() [3/3]
| QCustomColorDialog::QCustomColorDialog |
( |
bool | is_small, |
|
|
bool | show_line_edit_pickers, |
|
|
QWidget * | parent = nullptr ) |
|
explicit |
Constructs a QCustomColorDialog with size and line edit picker options.
- Parameters
-
| [in] | is_small | Whether to use a compact layout. |
| [in] | show_line_edit_pickers | Whether to show line edit pickers for manual color entry. |
| [in] | parent | The parent widget. |
◆ changeEvent()
| void QCustomColorDialog::changeEvent |
( |
QEvent * | event | ) |
|
|
overrideprotected |
Handles change events such as language or palette changes.
- Parameters
-
| [in] | event | The change event. |
◆ Colors()
Generates a buffer of evenly distributed colors.
- Parameters
-
| [in] | count | The number of colors to generate. |
- Returns
- A Buffer of RGBColor values.
◆ colorSelected()
| void QCustomColorDialog::colorSelected |
( |
const RGBColor & | color | ) |
|
Emitted when a color is selected (confirmed) by the user.
- Parameters
-
| [in] | color | The selected color. |
◆ currentColor()
| RGBColor QCustomColorDialog::currentColor |
( |
| ) |
const |
Returns the color currently being edited in the dialog.
- Returns
- The current color.
◆ currentColorEdited()
| void QCustomColorDialog::currentColorEdited |
( |
const RGBColor & | color | ) |
|
Emitted when the current color is changed by the user during editing.
- Parameters
-
| [in] | color | The new current color. |
◆ customColor()
| RGBColor QCustomColorDialog::customColor |
( |
int | index | ) |
|
|
static |
Returns the custom color at the given index.
- Parameters
-
| [in] | index | The index of the custom color. |
- Returns
- The custom color at the specified index.
◆ CustomColors()
Returns a buffer containing all custom colors.
- Returns
- A Buffer of all custom RGBColor values.
◆ customCount()
| int QCustomColorDialog::customCount |
( |
| ) |
|
|
static |
Returns the number of custom colors supported by the dialog.
- Returns
- The custom color count.
◆ open()
| void QCustomColorDialog::open |
( |
QObject * | receiver, |
|
|
const char * | member ) |
Opens the dialog and connects its finished signal to the specified receiver and member slot.
- Parameters
-
| [in] | receiver | The object to receive the finished signal. |
| [in] | member | The slot to invoke when the dialog finishes. |
◆ selectedColor()
| RGBColor QCustomColorDialog::selectedColor |
( |
| ) |
const |
Returns the color that was last selected (confirmed) by the user.
- Returns
- The selected color.
◆ setCurrentColor()
| void QCustomColorDialog::setCurrentColor |
( |
const RGBColor & | color | ) |
|
Sets the currently displayed color in the dialog.
- Parameters
-
| [in] | color | The color to set as the current selection. |
◆ setCustomColor()
| void QCustomColorDialog::setCustomColor |
( |
int | index, |
|
|
RGBColor | color ) |
|
static |
Sets the custom color at the given index.
- Parameters
-
| [in] | index | The index of the custom color slot. |
| [in] | color | The color to store at the specified index. |
◆ setHorizontal()
| void QCustomColorDialog::setHorizontal |
( |
bool | horizontal | ) |
|
Sets the layout orientation of the dialog.
- Parameters
-
| [in] | horizontal | Whether to use a horizontal layout. |
◆ setMargin()
| void QCustomColorDialog::setMargin |
( |
int | x, |
|
|
int | y, |
|
|
int | xx, |
|
|
int | yy ) |
Sets the content margins of the dialog layout.
- Parameters
-
| [in] | x | Left margin. |
| [in] | y | Top margin. |
| [in] | xx | Right margin. |
| [in] | yy | Bottom margin. |
◆ setShowAlpha()
| void QCustomColorDialog::setShowAlpha |
( |
bool | show_alpha | ) |
|
Sets whether the alpha channel slider and input are visible.
- Parameters
-
| [in] | show_alpha | Whether to show the alpha channel controls. |
◆ setStandardColor()
| void QCustomColorDialog::setStandardColor |
( |
int | index, |
|
|
RGBColor | color ) |
|
static |
Sets the standard color at the given index.
- Parameters
-
| [in] | index | The index of the standard color slot. |
| [in] | color | The color to store at the specified index. |
◆ setVisible()
| void QCustomColorDialog::setVisible |
( |
bool | visible | ) |
|
|
override |
Overrides QWidget::setVisible to handle showing and hiding the dialog.
- Parameters
-
| [in] | visible | Whether the dialog should be visible. |
◆ showAlpha()
| bool QCustomColorDialog::showAlpha |
( |
| ) |
const |
Returns whether the alpha channel controls are currently visible.
- Returns
- True if alpha controls are shown, false otherwise.
◆ standardColor()
| RGBColor QCustomColorDialog::standardColor |
( |
int | index | ) |
|
|
static |
Returns the standard color at the given index.
- Parameters
-
| [in] | index | The index of the standard color. |
- Returns
- The standard color at the specified index.
The documentation for this class was generated from the following file: