|
Krita Source Code Documentation
|
#include <KisAsyncColorSamplerHelper.h>
Inheritance diagram for KisAsyncColorSamplerHelper:Classes | |
| struct | Private |
Signals | |
| void | sigColorSelected (const KoColor &color) |
| void | sigFinalColorSelected (const KoColor &color) |
| void | sigRawColorSelected (const KoColor &color) |
| void | sigRequestCursor (const QCursor &cursor) |
| void | sigRequestCursorReset () |
| void | sigRequestUpdateOutline () |
Public Member Functions | |
| void | activate (bool sampleCurrentLayer, bool pickFgColor) |
| QRectF | colorPreviewDocRect (const QPointF &docPoint) |
| void | continueAction (const QPointF &docPoint) |
| void | deactivate () |
| void | endAction () |
| bool | isActive () const |
| KisAsyncColorSamplerHelper (KisCanvas2 *canvas) | |
| void | paint (QPainter &gc, const KoViewConverter &converter) |
| void | setUpdateGlobalColor (bool value) |
| void | startAction (const QPointF &docPoint, int radius, int blend) |
| void | updateCursor (bool sampleCurrentLayer, bool pickFgColor) |
| bool | updateGlobalColor () const |
| ~KisAsyncColorSamplerHelper () override | |
Private Slots | |
| void | activateDelayedPreview () |
| void | slotAddSamplingJob (const QPointF &docPoint) |
| void | slotColorSamplingFinished (const KoColor &rawColor) |
Private Attributes | |
| QScopedPointer< Private > | m_d |
Definition at line 23 of file KisAsyncColorSamplerHelper.h.
| KisAsyncColorSamplerHelper::KisAsyncColorSamplerHelper | ( | KisCanvas2 * | canvas | ) |
Definition at line 86 of file KisAsyncColorSamplerHelper.cpp.
References activateDelayedPreview(), connect(), KisSignalCompressor::FIRST_ACTIVE, m_d, slotAddSamplingJob(), and void().
|
override |
Definition at line 100 of file KisAsyncColorSamplerHelper.cpp.
References KIS_SAFE_ASSERT_RECOVER_NOOP, and m_d.
| void KisAsyncColorSamplerHelper::activate | ( | bool | sampleCurrentLayer, |
| bool | pickFgColor ) |
Definition at line 110 of file KisAsyncColorSamplerHelper.cpp.
References KoCanvasResource::BackgroundColor, KoCanvasResource::ForegroundColor, KIS_SAFE_ASSERT_RECOVER_RETURN, and m_d.
|
privateslot |
Definition at line 126 of file KisAsyncColorSamplerHelper.cpp.
References KoCanvasResource::ForegroundColor, m_d, sigRequestUpdateOutline(), KoColor::toQColor(), and updateCursor().
| QRectF KisAsyncColorSamplerHelper::colorPreviewDocRect | ( | const QPointF & | docPoint | ) |
| void KisAsyncColorSamplerHelper::continueAction | ( | const QPointF & | docPoint | ) |
Definition at line 216 of file KisAsyncColorSamplerHelper.cpp.
References KIS_SAFE_ASSERT_RECOVER_RETURN, and m_d.
| void KisAsyncColorSamplerHelper::deactivate | ( | ) |
Definition at line 182 of file KisAsyncColorSamplerHelper.cpp.
References endAction(), KIS_SAFE_ASSERT_RECOVER, m_d, sigRequestCursorReset(), and sigRequestUpdateOutline().
| void KisAsyncColorSamplerHelper::endAction | ( | ) |
Definition at line 222 of file KisAsyncColorSamplerHelper.cpp.
References KIS_SAFE_ASSERT_RECOVER_RETURN, and m_d.
| bool KisAsyncColorSamplerHelper::isActive | ( | ) | const |
Definition at line 105 of file KisAsyncColorSamplerHelper.cpp.
References m_d.
| void KisAsyncColorSamplerHelper::paint | ( | QPainter & | gc, |
| const KoViewConverter & | converter ) |
Definition at line 243 of file KisAsyncColorSamplerHelper.cpp.
References KoViewConverter::documentToView(), and m_d.
| void KisAsyncColorSamplerHelper::setUpdateGlobalColor | ( | bool | value | ) |
Definition at line 172 of file KisAsyncColorSamplerHelper.cpp.
Notifies about the "palette" color picked from the layer, that is, with the alpha channel set to OPACITY_OPAQUE.
Notifies about the "palette" color picked from the layer, that is, with the alpha channel set to OPACITY_OPAQUE.
This notification is emitted only once at the very end of the color picking stroke.
Notifies about the raw color picked from the layer, including its alpha channel.
|
signal |
|
signal |
|
signal |
|
privateslot |
The actual sampling is delayed by a compressor, so we can get this event when the stroke is already closed
Definition at line 256 of file KisAsyncColorSamplerHelper.cpp.
References Private::canvas, KisImage::colorSpace(), KisImage::documentToImagePixelFloored(), KisCanvas2::image(), koIcon, m_d, KisImage::projection(), and slotColorSamplingFinished().
Definition at line 296 of file KisAsyncColorSamplerHelper.cpp.
References m_d, OPACITY_OPAQUE_U8, KoColor::setOpacity(), sigColorSelected(), sigRawColorSelected(), and sigRequestUpdateOutline().
| void KisAsyncColorSamplerHelper::startAction | ( | const QPointF & | docPoint, |
| int | radius, | ||
| int | blend ) |
Definition at line 204 of file KisAsyncColorSamplerHelper.cpp.
References connect(), m_d, KisColorSamplerStrokeStrategy::sigColorUpdated(), sigFinalColorSelected(), KisColorSamplerStrokeStrategy::sigFinalColorSelected(), and slotColorSamplingFinished().
| void KisAsyncColorSamplerHelper::updateCursor | ( | bool | sampleCurrentLayer, |
| bool | pickFgColor ) |
Definition at line 146 of file KisAsyncColorSamplerHelper.cpp.
References KoCanvasResource::BackgroundColor, KoCanvasResource::ForegroundColor, KisCursor::samplerImageBackgroundCursor(), KisCursor::samplerImageForegroundCursor(), KisCursor::samplerLayerBackgroundCursor(), KisCursor::samplerLayerForegroundCursor(), and sigRequestCursor().
| bool KisAsyncColorSamplerHelper::updateGlobalColor | ( | ) | const |
Definition at line 177 of file KisAsyncColorSamplerHelper.cpp.
References m_d.
|
private |
Definition at line 79 of file KisAsyncColorSamplerHelper.h.