|
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 | colorPicked (const QColor &color) |
| void | updateColorSampling () |
Private Member Functions | |
| void | continueUpdateColorSampling (const QPoint &globalPos) |
| KoColor | grabScreenColor (const QPoint &p) |
| void | releaseColorSampling () |
| bool | tryToUsePlatformIntegration () |
| 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 60 of file KisScreenColorSampler.cpp.
References m_d, sampleScreenColor(), updateColorSampling(), and updateIcons().
|
override |
Definition at line 87 of file KisScreenColorSampler.cpp.
|
slot |
Definition at line 160 of file KisScreenColorSampler.cpp.
References currentColor(), m_d, releaseColorSampling(), setCurrentColor(), and sigNewColorSampled().
|
overrideprotected |
Definition at line 278 of file KisScreenColorSampler.cpp.
|
privateslot |
Definition at line 358 of file KisScreenColorSampler.cpp.
References currentColor(), KoColor::fromQColor(), KoColorSpaceRegistry::instance(), PRIMARIES_ITU_R_BT_709_5, KoColorSpaceRegistry::profileFor(), setCurrentColor(), KoColor::setProfile(), sigNewColorSampled(), and TRC_ITU_R_BT_470_6_SYSTEM_M.
|
private |
Definition at line 299 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 96 of file KisScreenColorSampler.cpp.
References m_d.
|
private |
Definition at line 167 of file KisScreenColorSampler.cpp.
References KisImage::bounds(), KisView::canvasBase(), KisCanvas2::canvasWidget, KisImage::colorSpace(), KoColor::convertedTo(), KisCanvas2::coordinatesConverter, KisView::document, KoColor::fromQColor(), KisView::image(), KisPart::instance(), m_d, KoColor::opacityU8(), p, KisPaintDevice::pixel(), KisImage::projection(), KisWrappedRect::ptToWrappedPt(), KisCanvas2::referenceImagesDecoration(), KisCanvasDecoration::visible(), KisCoordinatesConverter::widgetToDocument(), KisCoordinatesConverter::widgetToImage(), KisImage::wrapAroundModeAxis(), and KisImage::wrapAroundModePermitted().
| bool KisScreenColorSampler::handleColorSamplingKeyPress | ( | QKeyEvent * | e | ) |
Definition at line 244 of file KisScreenColorSampler.cpp.
References cancel(), currentColor(), grabScreenColor(), releaseColorSampling(), setCurrentColor(), and sigNewColorSampled().
| bool KisScreenColorSampler::handleColorSamplingMouseButtonRelease | ( | QMouseEvent * | e | ) |
Definition at line 236 of file KisScreenColorSampler.cpp.
References currentColor(), grabScreenColor(), releaseColorSampling(), setCurrentColor(), and sigNewColorSampled().
| bool KisScreenColorSampler::handleColorSamplingMouseMove | ( | QMouseEvent * | e | ) |
Definition at line 227 of file KisScreenColorSampler.cpp.
References continueUpdateColorSampling().
| bool KisScreenColorSampler::performRealColorSamplingOfCanvas | ( | ) | const |
Definition at line 101 of file KisScreenColorSampler.cpp.
References m_d.
|
private |
Definition at line 257 of file KisScreenColorSampler.cpp.
References KisGrabKeyboardFocusRecoveryWorkaround::instance(), m_d, and KisGrabKeyboardFocusRecoveryWorkaround::recoverFocus().
|
slot |
Definition at line 111 of file KisScreenColorSampler.cpp.
References currentColor(), grabScreenColor(), m_d, setCurrentColor(), sigNewColorSampled(), tryToUsePlatformIntegration(), and updateColorLabelText().
Definition at line 155 of file KisScreenColorSampler.cpp.
References m_d.
|
slot |
Definition at line 106 of file KisScreenColorSampler.cpp.
References m_d.
|
private |
Definition at line 340 of file KisScreenColorSampler.cpp.
References colorPicked().
|
private |
Definition at line 216 of file KisScreenColorSampler.cpp.
References grabScreenColor(), m_d, and KoColor::toQString().
|
privateslot |
Definition at line 283 of file KisScreenColorSampler.cpp.
References continueUpdateColorSampling(), and m_d.
|
overridevirtual |
reloads icon(s) when theme is updated
Implements KisScreenColorSamplerBase.
Definition at line 91 of file KisScreenColorSampler.cpp.
|
private |
Definition at line 59 of file KisScreenColorSampler.h.