|
Krita Source Code Documentation
|
#include <kis_color_selector_wheel.h>
Inheritance diagram for KisColorSelectorWheel:Public Member Functions | |
| KisColorSelectorWheel (KisColorSelector *parent) | |
| void | setColor (const KoColor &color) override |
| set the color, blibs etc | |
Public Member Functions inherited from KisColorSelectorComponent | |
| KoColor | currentColor () |
| return the color, that was selected by calling mouseEvent | |
| int | height () const |
| KisColorSelectorComponent (KisColorSelector *parent) | |
| virtual void | mouseEvent (int x, int y) |
| saves the mouse position, so that a blip can be created. | |
| void | paintEvent (QPainter *) |
| void | setConfiguration (Parameter param, Type type) |
| setConfiguration can be ignored (for instance ring and triangle, as they can have only one config) | |
| void | setDirty () |
| force subsequent redraw of the component | |
| void | setGamutMask (KoGamutMaskSP gamutMask) |
| void | setGeometry (int x, int y, int width, int height) |
| void | toggleGamutMask (bool state) |
| void | unsetGamutMask () |
| void | updateGamutMaskPreview () |
| bool | wantsGrab (int x, int y) |
| returns true, if this component wants to grab the mouse (normally true, if containsPoint returns true) | |
| int | width () const |
Protected Member Functions | |
| void | paint (QPainter *) override |
| KoColor | selectColor (int x, int y) override |
| this method must be overloaded to return the color at position x/y and draw a marker on that position | |
Protected Member Functions inherited from KisColorSelectorComponent | |
| const KoColorSpace * | colorSpace () const |
| virtual bool | containsPointInComponentCoords (int x, int y) const |
| bool | isDirty () const |
| returns true, if ether the color space, the size or the parameters have changed since the last paint event | |
| void | setLastMousePosition (int x, int y) |
Private Member Functions | |
| bool | allowsColorSelectionAtPoint (const QPoint &pt) const override |
| KoColor | colorAt (float x, float y, bool forceValid=false) |
Private Attributes | |
| qreal | B {0.0} |
| qreal | G {0.0} |
| qreal | Gamma {0.0} |
| QPointF | m_lastClickPos |
| QImage | m_pixelCache |
| QPoint | m_pixelCacheOffset |
| qreal | m_renderAreaOffsetX {0.0} |
| qreal | m_renderAreaOffsetY {0.0} |
| QSize | m_renderAreaSize |
| QTransform | m_toRenderArea |
| qreal | R {0.0} |
Friends | |
| class | Acs::PixelCacheRenderer |
Additional Inherited Members | |
Public Types inherited from KisColorSelectorComponent | |
| typedef KisColorSelectorConfiguration::Parameters | Parameter |
| typedef KisColorSelectorConfiguration::Type | Type |
Public Slots inherited from KisColorSelectorComponent | |
| void | setParam (qreal hue, qreal hsvSaturation, qreal value, qreal hslSaturation, qreal lightness, qreal hsiSaturation, qreal intensity, qreal hsySaturation, qreal luma) |
Signals inherited from KisColorSelectorComponent | |
| void | paramChanged (qreal hue, qreal hsvSaturation, qreal value, qreal hslSaturation, qreal lightness, qreal hsiSaturation, qreal intensity, qreal hsySaturation, qreal luma) |
| -1, if unaffected | |
| void | update () |
| request for repaint, for instance, if the hue changes. | |
Protected Attributes inherited from KisColorSelectorComponent | |
| KoGamutMaskSP | m_currentGamutMask |
| bool | m_gamutMaskOn {false} |
| qreal | m_hsiSaturation {0.0} |
| qreal | m_hslSaturation {0.0} |
| qreal | m_hsvSaturation {0.0} |
| qreal | m_hsySaturation {0.0} |
| qreal | m_hue {0.0} |
| qreal | m_intensity {0.0} |
| qreal | m_lastX {0.0} |
| qreal | m_lastY {0.0} |
| qreal | m_lightness {0.0} |
| qreal | m_luma {0.0} |
| bool | m_maskPreviewActive {false} |
| Parameter | m_parameter |
| KisColorSelector * | m_parent {0} |
| Type | m_type |
| qreal | m_value {0.0} |
| int | m_x {0} |
| int | m_y {0} |
Definition at line 23 of file kis_color_selector_wheel.h.
|
explicit |
Definition at line 21 of file kis_color_selector_wheel.cpp.
|
overrideprivatevirtual |
a subclass can implement this method to note that the point, although it is in containsPointInComponentCoords area, still cannot be selected as a color (e.g. it is masked out). Default implementation always returns true.
Reimplemented from KisColorSelectorComponent.
Definition at line 307 of file kis_color_selector_wheel.cpp.
References KisColorSelectorComponent::m_currentGamutMask, KisColorSelectorComponent::m_gamutMaskOn, KisColorSelectorComponent::m_maskPreviewActive, m_renderAreaSize, and m_toRenderArea.
|
private |
Definition at line 249 of file kis_color_selector_wheel.cpp.
References B, KisColorSelectorBase::colorSpace(), KisColorSelectorBase::converter(), KoColor::createTransparent(), KisDisplayColorConverter::fromHsiF(), KisDisplayColorConverter::fromHslF(), KisDisplayColorConverter::fromHsvF(), KisDisplayColorConverter::fromHsyF(), G, KisColorSelectorComponent::height(), KisColorSelectorConfiguration::hsiSH, KisColorSelectorConfiguration::hslSH, KisColorSelectorConfiguration::hsvSH, KisColorSelectorConfiguration::hsySH, KisColorSelectorConfiguration::IH, KisColorSelectorConfiguration::LH, KisColorSelectorComponent::m_hsiSaturation, KisColorSelectorComponent::m_hslSaturation, KisColorSelectorComponent::m_hsvSaturation, KisColorSelectorComponent::m_hsySaturation, KisColorSelectorComponent::m_intensity, KisColorSelectorComponent::m_lightness, KisColorSelectorComponent::m_luma, KisColorSelectorComponent::m_parameter, KisColorSelectorComponent::m_parent, M_PI, KisColorSelectorComponent::m_value, R, KisColorSelectorConfiguration::VH, KisColorSelectorComponent::width(), and KisColorSelectorConfiguration::YH.
|
overrideprotectedvirtual |
paint component using given painter the component should respect width() and height() (eg. scale to width and height), but doesn't have to care about x/y coordinates (top left corner)
Implements KisColorSelectorComponent.
Definition at line 173 of file kis_color_selector_wheel.cpp.
References KisColorSelectorBase::converter(), KisColorSelector::displayBlip(), KisColorSelectorComponent::height(), KisColorSelectorComponent::isDirty(), KisColorSelectorComponent::m_currentGamutMask, KisColorSelectorComponent::m_gamutMaskOn, m_lastClickPos, KisColorSelectorComponent::m_maskPreviewActive, KisColorSelectorComponent::m_parent, m_pixelCache, m_pixelCacheOffset, m_renderAreaOffsetX, m_renderAreaOffsetY, m_renderAreaSize, m_toRenderArea, Acs::PixelCacheRenderer::render(), and KisColorSelectorComponent::width().
|
overrideprotectedvirtual |
this method must be overloaded to return the color at position x/y and draw a marker on that position
Implements KisColorSelectorComponent.
Definition at line 31 of file kis_color_selector_wheel.cpp.
References colorAt(), KisColorSelectorComponent::height(), KisColorSelectorConfiguration::hsiSH, KisColorSelectorConfiguration::hslSH, KisColorSelectorConfiguration::hsvSH, KisColorSelectorConfiguration::hsySH, KisColorSelectorConfiguration::IH, KisColorSelectorConfiguration::LH, m_lastClickPos, KisColorSelectorComponent::m_parameter, M_PI, KisColorSelectorComponent::paramChanged(), KisColorSelectorComponent::update(), KisColorSelectorConfiguration::VH, KisColorSelectorComponent::width(), and KisColorSelectorConfiguration::YH.
set the color, blibs etc
Reimplemented from KisColorSelectorComponent.
Definition at line 88 of file kis_color_selector_wheel.cpp.
References B, KisColorSelectorBase::converter(), KisColorSelector::displayBlip(), G, KisDisplayColorConverter::getHsiF(), KisDisplayColorConverter::getHslF(), KisDisplayColorConverter::getHsvF(), KisDisplayColorConverter::getHsyF(), KisColorSelectorComponent::height(), KisColorSelectorConfiguration::hsiSH, KisColorSelectorConfiguration::hslSH, KisColorSelectorConfiguration::hsvSH, KisColorSelectorConfiguration::hsySH, KisColorSelectorConfiguration::IH, KisColorSelectorConfiguration::LH, m_lastClickPos, KisColorSelectorComponent::m_parameter, KisColorSelectorComponent::m_parent, M_PI, KisColorSelectorComponent::paramChanged(), R, KisColorSelectorComponent::setColor(), KisColorSelectorComponent::setLastMousePosition(), KisColorSelectorConfiguration::VH, KisColorSelectorComponent::width(), and KisColorSelectorConfiguration::YH.
|
friend |
Definition at line 35 of file kis_color_selector_wheel.h.
|
private |
Definition at line 45 of file kis_color_selector_wheel.h.
|
private |
Definition at line 44 of file kis_color_selector_wheel.h.
|
private |
Definition at line 46 of file kis_color_selector_wheel.h.
|
private |
Definition at line 40 of file kis_color_selector_wheel.h.
|
private |
Definition at line 41 of file kis_color_selector_wheel.h.
|
private |
Definition at line 42 of file kis_color_selector_wheel.h.
|
private |
Definition at line 49 of file kis_color_selector_wheel.h.
|
private |
Definition at line 50 of file kis_color_selector_wheel.h.
|
private |
Definition at line 48 of file kis_color_selector_wheel.h.
|
private |
Definition at line 51 of file kis_color_selector_wheel.h.
|
private |
Definition at line 43 of file kis_color_selector_wheel.h.