62 if (!
d->
view)
return 0;
71 if (!
d->
view)
return 0;
78 if (!
d->
view || !document || !document->document())
return;
79 d->
view =
d->
view->replaceBy(document->document());
84 if (!
d->
view)
return false;
85 return d->
view->isVisible();
98 if (!
d->
view)
return 0;
110 if (!
d->
view)
return;
111 if (!resource)
return;
117 QVariant
value = QVariant::fromValue(pattern);
120 QVariant
value = QVariant::fromValue(gradient);
123 d->
view->viewManager()->paintOpBox()->resourceSelected(preset);
130 if (!
d->
view)
return 0;
136 if (!
d->
view)
return;
137 d->
view->resourceProvider()->setFGColor(color->
color());
142 if (!
d->
view)
return 0;
148 if (!
d->
view)
return;
149 d->
view->resourceProvider()->setBGColor(color->
color());
154 if (!
d->
view)
return 0;
165 if (!
d->
view)
return 0;
176 if (!
d->
view)
return 0;
187 if (!
d->
view)
return "";
188 return d->
view->resourceProvider()->currentCompositeOp();
193 if (!
d->
view)
return;
194 d->
view->resourceProvider()->setCurrentCompositeOp(blendingMode);
199 if (!
d->
view)
return 0.0;
206 if (!
d->
view)
return;
213 if (!
d->
view)
return 0.0;
220 if (!
d->
view)
return;
227 if (!
d->
view)
return 0.0;
228 return d->
view->resourceProvider()->opacity();
233 if (!
d->
view)
return;
234 d->
view->resourceProvider()->setOpacity(opacity);
239 if (!
d->
view)
return 0.0;
240 return d->
view->resourceProvider()->size();
245 if (!
d->
view)
return;
251 if (!
d->
view)
return 0.0;
252 return d->
view->resourceProvider()->brushRotation();
257 if (!
d->
view)
return;
263 if (!
d->
view)
return 0.0;
264 return d->
view->resourceProvider()->flow();
269 if (!
d->
view)
return;
270 d->
view->resourceProvider()->setFlow(flow);
275 if (!
d->
view)
return 0.0;
276 return d->
view->resourceProvider()->patternSize();
281 if (!
d->
view)
return;
282 d->
view->resourceProvider()->setPatternSize(size);
290 return d->
view->resourceProvider()->eraserMode();
298 d->
view->resourceProvider()->setEraserMode(
value);
306 return d->
view->resourceProvider()->globalAlphaLock();
314 d->
view->resourceProvider()->setGlobalAlphaLock(
value);
322 return d->
view->resourceProvider()->disablePressure();
330 d->
view->resourceProvider()->setDisablePressure(
value);
346 if (!
d->
view)
return;
351 d->
view->showFloatingMessage(message, icon, timeout,
p);
356 if (!
d->
view->document())
return QTransform();
357 return d->
view->canvasBase()->coordinatesConverter()->documentToFlakeTransform().inverted();
362 if (!
d->
view->document())
return QTransform();
363 return d->
view->canvasBase()->coordinatesConverter()->flakeToWidgetTransform();
368 if (!
d->
view->document())
return QTransform();
373 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.
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
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
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 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
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 setForeGroundColor(ManagedColor *color)
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