|
Krita Source Code Documentation
|
The KisScreenColorSampler class Based on the original QColorDialog's screen color picker, this class provides a button that can be used to activate a color sampler that can sample from anywhere on the screen. More...
#include <KisScreenColorSampler.h>
Inheritance diagram for KisScreenColorSampler:Classes | |
| struct | Private |
Public Slots | |
| void | cancel () |
| void | sampleScreenColor () |
| void | setCurrentColor (KoColor c) |
| void | setPerformRealColorSamplingOfCanvas (bool enable) |
Signals | |
| void | sigNewColorHovered (KoColor c) |
| void | sigNewColorSampled (KoColor c) |
Signals inherited from KisScreenColorSamplerBase | |
| void | sigNewColorSampled (KoColor) |
Public Member Functions | |
| KoColor | currentColor () |
| bool | handleColorSamplingKeyPress (QKeyEvent *e) |
| bool | handleColorSamplingMouseButtonRelease (QMouseEvent *e) |
| bool | handleColorSamplingMouseMove (QMouseEvent *e) |
| KisScreenColorSampler (bool showInfoLabel=false, QWidget *parent=0) | |
| bool | performRealColorSamplingOfCanvas () const |
| void | updateIcons () override |
| reloads icon(s) when theme is updated | |
| ~KisScreenColorSampler () override | |
Public Member Functions inherited from KisScreenColorSamplerBase | |
| KisScreenColorSamplerBase (QWidget *parent=0) | |
| virtual | ~KisScreenColorSamplerBase () |
Static Public Member Functions | |
| static KisScreenColorSampler * | createScreenColorSampler (QWidget *parent=0) |
Protected Member Functions | |
| void | changeEvent (QEvent *event) override |
Private Slots | |
| void | updateColorSampling () |
Private Member Functions | |
| void | continueUpdateColorSampling (const QPoint &globalPos) |
| KoColor | grabScreenColor (const QPoint &p) |
| void | releaseColorSampling () |
| void | updateColorLabelText (const QPoint &globalPos) |
Private Attributes | |
| const QScopedPointer< Private > | m_d |
The KisScreenColorSampler class Based on the original QColorDialog's screen color picker, this class provides a button that can be used to activate a color sampler that can sample from anywhere on the screen.
Definition at line 23 of file KisScreenColorSampler.h.
|
explicit |
Definition at line 59 of file KisScreenColorSampler.cpp.
References connect(), m_d, sampleScreenColor(), updateColorSampling(), and updateIcons().
|
override |
Definition at line 86 of file KisScreenColorSampler.cpp.
|
slot |
Definition at line 153 of file KisScreenColorSampler.cpp.
References currentColor(), m_d, releaseColorSampling(), setCurrentColor(), and sigNewColorSampled().
|
overrideprotected |
Definition at line 269 of file KisScreenColorSampler.cpp.
|
private |
Definition at line 290 of file KisScreenColorSampler.cpp.
References currentColor(), grabScreenColor(), setCurrentColor(), sigNewColorHovered(), and updateColorLabelText().
|
inlinestatic |
Definition at line 41 of file KisScreenColorSampler.h.
| KoColor KisScreenColorSampler::currentColor | ( | ) |
Definition at line 95 of file KisScreenColorSampler.cpp.
References m_d.
|
private |
Definition at line 160 of file KisScreenColorSampler.cpp.
References KisImage::bounds(), KisView::canvasBase(), KisCanvas2::canvasWidget, KisImage::colorSpace(), KisCanvas2::coordinatesConverter, KisView::document, KoColor::fromQColor(), KisView::image(), KisPart::instance(), m_d, p, KisPaintDevice::pixel(), KisImage::projection(), KisWrappedRect::ptToWrappedPt(), KisCanvas2::referenceImagesDecoration(), KisCanvasDecoration::visible(), KisCoordinatesConverter::widgetToImage(), KisImage::wrapAroundModeAxis(), and KisImage::wrapAroundModePermitted().
| bool KisScreenColorSampler::handleColorSamplingKeyPress | ( | QKeyEvent * | e | ) |
Definition at line 235 of file KisScreenColorSampler.cpp.
References cancel(), currentColor(), grabScreenColor(), releaseColorSampling(), setCurrentColor(), and sigNewColorSampled().
| bool KisScreenColorSampler::handleColorSamplingMouseButtonRelease | ( | QMouseEvent * | e | ) |
Definition at line 227 of file KisScreenColorSampler.cpp.
References currentColor(), grabScreenColor(), releaseColorSampling(), setCurrentColor(), and sigNewColorSampled().
| bool KisScreenColorSampler::handleColorSamplingMouseMove | ( | QMouseEvent * | e | ) |
Definition at line 218 of file KisScreenColorSampler.cpp.
References continueUpdateColorSampling().
| bool KisScreenColorSampler::performRealColorSamplingOfCanvas | ( | ) | const |
Definition at line 100 of file KisScreenColorSampler.cpp.
References m_d.
|
private |
Definition at line 248 of file KisScreenColorSampler.cpp.
References KisGrabKeyboardFocusRecoveryWorkaround::instance(), m_d, and KisGrabKeyboardFocusRecoveryWorkaround::recoverFocus().
|
slot |
Definition at line 110 of file KisScreenColorSampler.cpp.
References currentColor(), grabScreenColor(), m_d, setCurrentColor(), sigNewColorSampled(), and updateColorLabelText().
Definition at line 148 of file KisScreenColorSampler.cpp.
References m_d.
|
slot |
Definition at line 105 of file KisScreenColorSampler.cpp.
References m_d.
|
private |
Definition at line 207 of file KisScreenColorSampler.cpp.
References grabScreenColor(), m_d, and KoColor::toQString().
|
privateslot |
Definition at line 274 of file KisScreenColorSampler.cpp.
References continueUpdateColorSampling(), and m_d.
|
overridevirtual |
reloads icon(s) when theme is updated
Implements KisScreenColorSamplerBase.
Definition at line 90 of file KisScreenColorSampler.cpp.
|
private |
Definition at line 59 of file KisScreenColorSampler.h.