|
Krita Source Code Documentation
|
#include <kis_color_selector_ring.h>
Inheritance diagram for KisColorSelectorRing:Public Member Functions | |
| int | innerRadius () const |
| KisColorSelectorRing (KisColorSelector *parent) | |
| void | setColor (const KoColor &color) override |
| set the color, blibs etc | |
| void | setInnerRingRadiusFraction (qreal newFraction) |
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 | |
| bool | containsPointInComponentCoords (int x, int y) const override |
| 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 | |
| virtual bool | allowsColorSelectionAtPoint (const QPoint &) const |
| const KoColorSpace * | colorSpace () 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 | |
| void | colorCache () |
| int | outerRadius () const |
| void | paintCache (qreal devicePixelRatioF) |
Private Attributes | |
| qreal | B {0.0} |
| qreal | G {0.0} |
| qreal | Gamma {1.0} |
| QList< QRgb > | m_cachedColors |
| const KoColorSpace * | m_cachedColorSpace {0} |
| int | m_cachedSize {0} |
| qreal | m_innerRingRadiusFraction {0.85} |
| qreal | m_lastHue {0.0} |
| QImage | m_pixelCache |
| qreal | R {0.0} |
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 14 of file kis_color_selector_ring.h.
|
explicit |
Definition at line 19 of file kis_color_selector_ring.cpp.
|
private |
Definition at line 201 of file kis_color_selector_ring.cpp.
References B, KisColorSelectorBase::converter(), KisDisplayColorConverter::fromHsvF(), KisDisplayColorConverter::fromHsyF(), G, KisColorSelectorConfiguration::Hluma, m_cachedColors, m_cachedColorSpace, KisColorSelectorComponent::m_parameter, KisColorSelectorComponent::m_parent, R, and KisDisplayColorConverter::toQColor().
|
overrideprotectedvirtual |
a subclass can implement this method, the default returns true if the coordinates are in the component rect values for the subclasses are provided in component coordinates, eg (0,0) is top left of component
Reimplemented from KisColorSelectorComponent.
Definition at line 34 of file kis_color_selector_ring.cpp.
References KisColorSelectorComponent::height(), innerRadius(), and KisColorSelectorComponent::width().
| int KisColorSelectorRing::innerRadius | ( | ) | const |
Definition at line 24 of file kis_color_selector_ring.cpp.
References KisColorSelectorComponent::height(), m_innerRingRadiusFraction, and KisColorSelectorComponent::width().
|
private |
|
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 51 of file kis_color_selector_ring.cpp.
References colorCache(), KisColorSelectorComponent::colorSpace(), KisColorSelector::displayBlip(), KisColorSelectorComponent::height(), innerRadius(), KisColorSelectorComponent::isDirty(), m_cachedColorSpace, m_cachedSize, m_lastHue, KisColorSelectorComponent::m_parent, M_PI, m_pixelCache, outerRadius(), paintCache(), and KisColorSelectorComponent::width().
|
private |
Definition at line 140 of file kis_color_selector_ring.cpp.
References innerRadius(), m_cachedColors, m_cachedSize, M_PI, m_pixelCache, and outerRadius().
|
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 96 of file kis_color_selector_ring.cpp.
References B, KisColorSelectorBase::converter(), KisDisplayColorConverter::fromHsvF(), KisDisplayColorConverter::fromHsyF(), G, KisColorSelectorComponent::height(), KisColorSelectorConfiguration::Hluma, m_lastHue, KisColorSelectorComponent::m_parameter, KisColorSelectorComponent::m_parent, M_PI, KisColorSelectorComponent::paramChanged(), R, KisColorSelectorComponent::update(), and KisColorSelectorComponent::width().
set the color, blibs etc
Reimplemented from KisColorSelectorComponent.
Definition at line 112 of file kis_color_selector_ring.cpp.
References B, KisColorSelectorBase::converter(), G, KisDisplayColorConverter::getHsvF(), KisDisplayColorConverter::getHsyF(), KisColorSelectorConfiguration::Hluma, m_lastHue, KisColorSelectorComponent::m_parameter, KisColorSelectorComponent::m_parent, KisColorSelectorComponent::paramChanged(), qFuzzyCompare(), R, KisColorSelectorComponent::setColor(), KisColorSelectorComponent::update(), and v.
| void KisColorSelectorRing::setInnerRingRadiusFraction | ( | qreal | newFraction | ) |
Definition at line 29 of file kis_color_selector_ring.cpp.
References m_innerRingRadiusFraction.
|
private |
Definition at line 42 of file kis_color_selector_ring.h.
|
private |
Definition at line 41 of file kis_color_selector_ring.h.
|
private |
Definition at line 43 of file kis_color_selector_ring.h.
Definition at line 37 of file kis_color_selector_ring.h.
|
private |
Definition at line 34 of file kis_color_selector_ring.h.
|
private |
Definition at line 35 of file kis_color_selector_ring.h.
|
private |
Definition at line 38 of file kis_color_selector_ring.h.
|
private |
Definition at line 36 of file kis_color_selector_ring.h.
|
private |
Definition at line 33 of file kis_color_selector_ring.h.
|
private |
Definition at line 40 of file kis_color_selector_ring.h.