|
Krita Source Code Documentation
|
#include <KoColorPopupAction.h>
Inheritance diagram for KoColorPopupAction:Classes | |
| class | KoColorPopupActionPrivate |
Public Slots | |
| QColor | currentColor () const |
| Returns the current color. | |
| KoColor | currentKoColor () const |
| Returns the current color as a KoColor. | |
| void | setCurrentColor (const KoColor &color) |
| Sets a new color to be displayed. | |
| void | setCurrentColor (const QColor &color) |
| Sets a new color to be displayed. | |
| void | updateIcon () |
| update the icon - only needed if you resize the iconsize in the widget that shows the action | |
Signals | |
| void | colorChanged (const KoColor &color) |
Public Member Functions | |
| KoColorPopupAction (QObject *parent=0) | |
| ~KoColorPopupAction () override | |
Private Slots | |
| void | colorWasEdited (const QColor &color) |
| void | colorWasSelected (const KoColor &color, bool final) |
| void | emitColorChanged () |
| void | opacityWasChanged (int opacity) |
Private Attributes | |
| KoColorPopupActionPrivate *const | d |
KoColorPopupAction makes use of KoColorSetWidget to show a widget for choosing a color (colormanaged via pigment).
Definition at line 22 of file KoColorPopupAction.h.
|
explicit |
Constructs a KoColorPopupAction with the specified parent.
| parent | The parent for this action. |
Definition at line 62 of file KoColorPopupAction.cpp.
References colorChanged(), KoColorPopupAction::KoColorPopupActionPrivate::colorChooser, KoColorPopupAction::KoColorPopupActionPrivate::colorSetWidget, colorWasEdited(), colorWasSelected(), connect(), d, emitColorChanged(), KoResourceServer< T >::firstResource(), KoResourceServerProvider::instance(), KoColorPopupAction::KoColorPopupActionPrivate::menu, KoColorPopupAction::KoColorPopupActionPrivate::opacitySlider, opacityWasChanged(), KoResourceServerProvider::paletteServer, KoResourceServer< T >::resource(), KoResourceServer< T >::resourceCount(), and KoColorSetWidget::setColorSet().
|
override |
Emitted every time the color changes (by calling setColor() or by user interaction.
| color | the new color |
|
privateslot |
Definition at line 210 of file KoColorPopupAction.cpp.
References KoColorPopupAction::KoColorPopupActionPrivate::currentColor, d, emitColorChanged(), KoColorSpaceRegistry::instance(), OPACITY_OPAQUE_U8, OPACITY_TRANSPARENT_U8, KoColorPopupAction::KoColorPopupActionPrivate::opacitySlider, KoColorSlider::setColors(), KoColor::setOpacity(), and updateIcon().
Definition at line 200 of file KoColorPopupAction.cpp.
References KoColorPopupAction::KoColorPopupActionPrivate::currentColor, d, emitColorChanged(), and updateIcon().
|
slot |
Returns the current color.
Definition at line 147 of file KoColorPopupAction.cpp.
References KoColorPopupAction::KoColorPopupActionPrivate::currentColor, d, and KoColor::toQColor().
|
slot |
Returns the current color as a KoColor.
Definition at line 152 of file KoColorPopupAction.cpp.
References KoColorPopupAction::KoColorPopupActionPrivate::currentColor, and d.
|
privateslot |
Definition at line 195 of file KoColorPopupAction.cpp.
References colorChanged(), KoColorPopupAction::KoColorPopupActionPrivate::currentColor, and d.
|
privateslot |
Definition at line 228 of file KoColorPopupAction.cpp.
References KoColorPopupAction::KoColorPopupActionPrivate::currentColor, d, emitColorChanged(), and KoColor::setOpacity().
Sets a new color to be displayed.
Definition at line 115 of file KoColorPopupAction.cpp.
References KoColorPopupAction::KoColorPopupActionPrivate::colorChooser, KoColorPopupAction::KoColorPopupActionPrivate::currentColor, d, OPACITY_OPAQUE_U8, OPACITY_TRANSPARENT_U8, KoColorPopupAction::KoColorPopupActionPrivate::opacitySlider, KoColor::opacityU8(), KoColorSlider::setColors(), KoColor::setOpacity(), KoTriangleColorSelector::slotSetColor(), and updateIcon().
|
slot |
Sets a new color to be displayed.
Definition at line 136 of file KoColorPopupAction.cpp.
References KoColorSpaceRegistry::instance(), setCurrentColor(), and warnWidgets.
|
slot |
update the icon - only needed if you resize the iconsize in the widget that shows the action
Definition at line 157 of file KoColorPopupAction.cpp.
References KoColorPopupAction::KoColorPopupActionPrivate::applyMode, KoColorPopupAction::KoColorPopupActionPrivate::checkerPainter, KoColorPopupAction::KoColorPopupActionPrivate::currentColor, d, iconSize(), p, KoCheckerBoardPainter::paint(), and KoColor::toQColor().
|
private |
Definition at line 71 of file KoColorPopupAction.h.