103 if (!
d->
view)
return 0;
112 if (!
d->
view)
return 0;
119 if (!
d->
view || !document || !document->document())
return;
120 d->
view =
d->
view->replaceBy(document->document());
126 if (!
d->
view)
return false;
127 return d->
view->isVisible();
132 if (!
d->
view)
return;
140 if (!
d->
view)
return 0;
152 if (!
d->
view)
return;
153 if (!resource)
return;
159 QVariant
value = QVariant::fromValue(pattern);
162 QVariant
value = QVariant::fromValue(gradient);
165 d->
view->viewManager()->paintOpBox()->resourceSelected(preset);
172 if (!
d->
view)
return 0;
178 if (!
d->
view)
return;
179 d->
view->resourceProvider()->setFGColor(color->
color());
184 if (!
d->
view)
return 0;
190 if (!
d->
view)
return;
191 d->
view->resourceProvider()->setBGColor(color->
color());
196 if (!
d->
view)
return 0;
198 if (!preset)
return 0;
209 if (!
d->
view)
return 0;
220 if (!
d->
view)
return 0;
231 if (!
d->
view)
return "";
232 return d->
view->resourceProvider()->currentCompositeOp();
237 if (!
d->
view)
return;
238 d->
view->resourceProvider()->setCurrentCompositeOp(blendingMode);
243 if (!
d->
view)
return 0.0;
250 if (!
d->
view)
return;
257 if (!
d->
view)
return 0.0;
264 if (!
d->
view)
return;
271 if (!
d->
view)
return 0.0;
272 return d->
view->resourceProvider()->opacity();
277 if (!
d->
view)
return;
278 d->
view->resourceProvider()->setOpacity(opacity);
283 if (!
d->
view)
return 0.0;
284 return d->
view->resourceProvider()->size();
289 if (!
d->
view)
return;
295 if (!
d->
view)
return 0.0;
296 return d->
view->resourceProvider()->fade();
301 if (!
d->
view)
return;
307 if (!
d->
view)
return 0.0;
308 return d->
view->resourceProvider()->brushRotation();
313 if (!
d->
view)
return;
319 if (!
d->
view)
return 0.0;
320 return d->
view->resourceProvider()->flow();
325 if (!
d->
view)
return;
326 d->
view->resourceProvider()->setFlow(flow);
331 if (!
d->
view)
return 0.0;
332 return d->
view->resourceProvider()->patternSize();
337 if (!
d->
view)
return;
338 d->
view->resourceProvider()->setPatternSize(size);
346 return d->
view->resourceProvider()->eraserMode();
354 d->
view->resourceProvider()->setEraserMode(
value);
362 return d->
view->resourceProvider()->globalAlphaLock();
370 d->
view->resourceProvider()->setGlobalAlphaLock(
value);
378 return d->
view->resourceProvider()->disablePressure();
386 d->
view->resourceProvider()->setDisablePressure(
value);
402 if (!
d->
view)
return;
407 d->
view->showFloatingMessage(message, icon, timeout,
p);
412 if (!
d->
view->document())
return QTransform();
413 return d->
view->canvasBase()->coordinatesConverter()->documentToFlakeTransform().inverted();
418 if (!
d->
view->document())
return QTransform();
419 return d->
view->canvasBase()->coordinatesConverter()->flakeToWidgetTransform();
424 if (!
d->
view->document())
return QTransform();
429 return imageToFlakeTransform.inverted();
float value(const T *src, size_t ch)
QTransform imageToDocumentTransform() const
QTransform documentToFlakeTransform() const
void subWindowActivated()
void setActiveView(KisView *view)
Set the active view, this will update the undo/redo actions.
virtual KoToolProxy * toolProxy() const =0
The ManagedColor class is a class to handle colors that are color managed. A managed color is a color...
KoResourceSP resource() const
void setBrushRotation(qreal brushRotation)
set the current rotation for brush tip
void backgroundColorChanged()
float HDRExposure() const
bool eraserMode() const
return current eraser mode status (active/inactive)
void setHDRGamma(float gamma)
set the current HDR Gamma value
View(KisView *view, QObject *parent=0)
bool globalAlphaLock() const
return current global alpha lock mode (active/inactive)
qreal patternSize() const
return the current pattern size for brush
void setBackGroundColor(ManagedColor *color)
void setBrushSize(qreal brushSize)
set the current size for brush
void setCurrentBrushPreset(Resource *resource)
set the current selected preset
void setDisablePressure(bool value)
set current disabled pressure status
void setGlobalAlphaLock(bool value)
set current global alpha lock mode active/inactive
qreal paintingFlow() const
return the current flow for brush
void setDocument(Document *document)
void setCurrentPattern(Resource *resource)
set the current selected pattern
ManagedColor * foregroundColor() const
void foregroundColorChanged()
Resource * currentPattern() const
return the current selected pattern
void setCurrentBlendingMode(const QString &blendingMode)
set the current blending mode for brush
ManagedColor * backgroundColor() const
backgroundColor allows access to the currently active background color. This is nominally per canvas/...
QTransform flakeToCanvasTransform() const
flakeToCanvasTransform The transformation of the canvas relative to the view without rotation and mir...
QString currentBlendingMode() const
return the current blending mode for brush
void currentToolChanged(const QString &toolId)
void showFloatingMessage(const QString &message, const QIcon &icon, int timeout, int priority)
showFloatingMessage displays a floating message box on the top-left corner of the canvas
void setPaintingOpacity(qreal opacity)
set the current opacity for brush
QTransform flakeToImageTransform() const
flakeToImageTransform The transformation of the image relative to the view without rotation and mirro...
qreal paintingOpacity() const
return the current opacity for brush
void activateResource(Resource *resource)
activateResource activates the given resource.
void setHDRExposure(float exposure)
set the current HDR Exposure value
qreal brushRotation() const
return the current rotation for brush tip
void setPatternSize(qreal size)
set the current pattern size value for brush
QList< Node * > selectedNodes() const
qreal brushFade() const
return the current fade for brush
Resource * currentBrushPreset() const
return the current selected preset
void setPaintingFlow(qreal flow)
set the current flow value for brush
bool operator==(const View &other) const
QTransform flakeToDocumentTransform() const
flakeToDocumentTransform The transformation of the document relative to the view without rotation and...
void setEraserMode(bool value)
set current eraser active/inactive
Resource * currentGradient() const
return the current selected gradient
bool operator!=(const View &other) const
void setBrushFade(qreal brushFade)
set the current fade for brush
void setForeGroundColor(ManagedColor *color)
void currentBrushPresetChanged()
void setCurrentGradient(Resource *resource)
set the current selected gradient
Document * document() const
qreal brushSize() const
return the current size for brush
bool disablePressure() const
return current disabled pressure status
QList< Node * > createNodeList(KisNodeList kisnodes, KisImageWSP image)
const QString PaintOpPresets
virtual qreal currentGamma() const =0
virtual void setCurrentGamma(qreal value)=0
virtual void setCurrentExposure(qreal value)=0
virtual qreal currentExposure() const =0
QPointer< KoToolProxy > toolProxy
QPointer< KisCanvasResourceProvider > resourceProvider
void reconnect(View *self)