7#ifndef _KIS_PRESET_LIVE_PREVIEW_
8#define _KIS_PRESET_LIVE_PREVIEW_
10#include <QGraphicsView>
11#include <QPainterPath>
23class QGraphicsPixmapItem;
25class QGraphicsTextItem;
KisPaintOpPresetSP m_currentPreset
KisDistanceInformation m_currentDistance
int m_previewPresetId
presetId (resource id) associated with the in-flight preview generation.
QGraphicsScene * m_brushPreviewScene
the scene that can add items like text and the brush stroke image
const float m_minStrokeScale
multiplier that is used for lengthening the brush stroke points
const qreal m_minScale
range of scale values. 1.0 == 100%
void sigPreviewImageReady(int presetId, QImage previewImage)
Emitted when a preview image is generated.
const KoColorSpace * m_colorSpace
internally sets the color space for brush preview
~KisPresetLivePreviewView()
void changeEvent(QEvent *) override
KisPresetLivePreviewView(QWidget *parent)
void setupAndPaintStroke()
creates and performs the actual stroke that goes on top of the background this is internally and shou...
KoCanvasResourceProvider * m_resourceManager
internally sets the Resource Provider for brush preview (allowing gradients in preview)
void setCurrentPreset(KisPaintOpPresetSP preset)
set the current preset from resource manager for the live preview to use. Good to call this every str...
const float m_maxBrushVal
QGraphicsTextItem * m_noPreviewText
holds the 'no preview available' text object
KisImageSP m_image
internally sets the image area for brush preview
void setCachePreviewMode(bool enabled)
void paintBackground(bool cacheMode)
works as both clearing the previous stroke, providing striped backgrounds for smudging brushes,...
QGraphicsPixmapItem * m_sceneImageItem
holds the preview brush stroke data
QImage m_lastPreviewImage
Last preview image.
QPainterPath m_curvedLine
void requestUpdateStroke()
KisLayerSP m_layer
internally sets the layer area for brush preview
static constexpr int DefaultUpdateDelayMs
KisSignalCompressor m_updateCompressor
void setup(KoCanvasResourceProvider *resourceManager)
one time setup for initialization of many variables. This live preview might be in a UI file,...
KisPaintInformation m_curvePointPI1
KoCanvasResourceProvider * resourceManager() const
bool m_previewGenerationInProgress
QPointF m_canvasCenterPoint
KoColor m_paintColor
the color which is used for rendering the stroke
void requestUpdateStrokeImmediate()
void slotPreviewGenerationCompleted()
void paintStripedBackground()
Paint alternating gray stripes on the paint device.
KisPaintInformation m_curvePointPI2
const float m_minBrushVal
the range of brush sizes that will control zooming in/out
const float m_maxStrokeScale