|
Krita Source Code Documentation
|
#include <kis_color_label_selector_widget.h>
Inheritance diagram for KisColorLabelSelectorWidget:Classes | |
| struct | Private |
Public Types | |
| enum | SelectionIndicationType { FillIn , Outline } |
Public Slots | |
| void | setButtonChecked (int index, bool state) |
| (Un)Check the button at the given position | |
| void | setCurrentIndex (int index) |
| Set the currently selected button. It has no effect if the buttons are mutually exclusive. | |
| void | setSelection (const QList< int > &indices) |
| Set the list of checked button indices. | |
Signals | |
| void | buttonToggled (int index, bool state) |
| void | currentIndexChanged (int index) |
| void | selectionChanged () |
Public Member Functions | |
| int | buttonSize () const |
| Get the size of the buttons. | |
| bool | buttonWrapEnabled () const |
| Get if the buttons should wrap in multiple lines if there is no enough space horizontally. | |
| int | currentIndex () const |
| Get the index of the currently checked button. Returns -1 if there is no checked button and -2 if the buttons are not mutually exclusive. | |
| bool | exclusive () const |
| Get if the button selection is mutually exclusive. | |
| bool | isButtonChecked (int index) const |
| Get if the button at the given position is currently checked. | |
| KisColorLabelSelectorWidget (QWidget *parent=nullptr) | |
| bool | mouseDragEnabled () const |
| Get if the user can drag to check/uncheck multiple buttons. | |
| QList< int > | selection () const |
| Get the list of checked button indices. | |
| SelectionIndicationType | selectionIndicationType () const |
| Get how the button is rendered. | |
| void | setButtonSize (int size) |
| Set the size of the buttons. | |
| void | setButtonWrapEnabled (bool enabled) |
| Set if the buttons should wrap in multiple lines if there is no enough space horizontally. | |
| void | setExclusive (bool exclusive) |
| Set if the button selection is mutually exclusive. This allows switching between single or multiple selection. | |
| void | setMouseDragEnabled (bool enabled) |
| Set if the user can drag to check/uncheck multiple buttons. | |
| void | setSelectionIndicationType (SelectionIndicationType type) |
| Set how the button should be rendered. | |
| ~KisColorLabelSelectorWidget () override | |
Private Attributes | |
| QScopedPointer< Private > | m_d |
Definition at line 16 of file kis_color_label_selector_widget.h.
Definition at line 21 of file kis_color_label_selector_widget.h.
| KisColorLabelSelectorWidget::KisColorLabelSelectorWidget | ( | QWidget * | parent = nullptr | ) |
Definition at line 35 of file kis_color_label_selector_widget.cpp.
References KisNodeViewColorScheme::allColorLabels(), button(), connect(), m_d, KisColorLabelButton::Outline, and KisColorLabelButton::setSelectionVisType().
|
override |
Definition at line 82 of file kis_color_label_selector_widget.cpp.
| int KisColorLabelSelectorWidget::buttonSize | ( | ) | const |
Get the size of the buttons.
Definition at line 232 of file kis_color_label_selector_widget.cpp.
References m_d.
|
signal |
| bool KisColorLabelSelectorWidget::buttonWrapEnabled | ( | ) | const |
Get if the buttons should wrap in multiple lines if there is no enough space horizontally.
Definition at line 158 of file kis_color_label_selector_widget.cpp.
| int KisColorLabelSelectorWidget::currentIndex | ( | ) | const |
Get the index of the currently checked button. Returns -1 if there is no checked button and -2 if the buttons are not mutually exclusive.
Definition at line 95 of file kis_color_label_selector_widget.cpp.
References m_d.
|
signal |
| bool KisColorLabelSelectorWidget::exclusive | ( | ) | const |
Get if the button selection is mutually exclusive.
Definition at line 148 of file kis_color_label_selector_widget.cpp.
References m_d.
| bool KisColorLabelSelectorWidget::isButtonChecked | ( | int | index | ) | const |
Get if the button at the given position is currently checked.
Definition at line 85 of file kis_color_label_selector_widget.cpp.
References m_d.
| bool KisColorLabelSelectorWidget::mouseDragEnabled | ( | ) | const |
Get if the user can drag to check/uncheck multiple buttons.
Definition at line 186 of file kis_color_label_selector_widget.cpp.
References m_d.
| QList< int > KisColorLabelSelectorWidget::selection | ( | ) | const |
Get the list of checked button indices.
Definition at line 125 of file kis_color_label_selector_widget.cpp.
|
signal |
| KisColorLabelSelectorWidget::SelectionIndicationType KisColorLabelSelectorWidget::selectionIndicationType | ( | ) | const |
Get how the button is rendered.
Definition at line 213 of file kis_color_label_selector_widget.cpp.
References m_d.
|
slot |
(Un)Check the button at the given position
Definition at line 90 of file kis_color_label_selector_widget.cpp.
References m_d.
| void KisColorLabelSelectorWidget::setButtonSize | ( | int | size | ) |
Set the size of the buttons.
Definition at line 237 of file kis_color_label_selector_widget.cpp.
| void KisColorLabelSelectorWidget::setButtonWrapEnabled | ( | bool | enabled | ) |
Set if the buttons should wrap in multiple lines if there is no enough space horizontally.
Definition at line 163 of file kis_color_label_selector_widget.cpp.
|
slot |
Set the currently selected button. It has no effect if the buttons are mutually exclusive.
Definition at line 103 of file kis_color_label_selector_widget.cpp.
References currentIndexChanged(), and m_d.
| void KisColorLabelSelectorWidget::setExclusive | ( | bool | exclusive | ) |
Set if the button selection is mutually exclusive. This allows switching between single or multiple selection.
Definition at line 153 of file kis_color_label_selector_widget.cpp.
References exclusive(), and m_d.
| void KisColorLabelSelectorWidget::setMouseDragEnabled | ( | bool | enabled | ) |
Set if the user can drag to check/uncheck multiple buttons.
Definition at line 191 of file kis_color_label_selector_widget.cpp.
Set the list of checked button indices.
Definition at line 136 of file kis_color_label_selector_widget.cpp.
References button(), m_d, and selectionChanged().
| void KisColorLabelSelectorWidget::setSelectionIndicationType | ( | SelectionIndicationType | type | ) |
Set how the button should be rendered.
Definition at line 223 of file kis_color_label_selector_widget.cpp.
|
private |
Definition at line 122 of file kis_color_label_selector_widget.h.