Krita Source Code Documentation
Loading...
Searching...
No Matches
View.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2016 Boudewijn Rempt <boud@valdyas.org>
3 *
4 * SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6#ifndef LIBKIS_VIEW_H
7#define LIBKIS_VIEW_H
8
9#include <QObject>
10
11#include "kritalibkis_export.h"
12#include "libkis.h"
13
14class ManagedColor;
15class Resource;
16class Scratchpad;
17class Node;
18class KisView;
19
24class KRITALIBKIS_EXPORT View : public QObject
25{
26 Q_OBJECT
27 Q_DISABLE_COPY(View)
28
29public:
30 explicit View(KisView *view, QObject *parent = 0);
31 ~View() override;
32
33 bool operator==(const View &other) const;
34 bool operator!=(const View &other) const;
35
36public Q_SLOTS:
37
41 Window* window() const;
42
46 Document* document() const;
47
51 void setDocument(Document *document);
52
56 bool visible() const;
57
61 void setVisible();
62
67 Canvas* canvas() const;
68
73 void activateResource(Resource *resource);
74
75
76
93 ManagedColor *foregroundColor() const;
94 void setForeGroundColor(ManagedColor *color);
95
102 ManagedColor *backgroundColor() const;
103 void setBackGroundColor(ManagedColor *color);
104
110 Resource *currentBrushPreset() const;
111
117 void setCurrentBrushPreset(Resource *resource);
118
124 Resource *currentPattern() const;
125
131 void setCurrentPattern(Resource *resource);
132
138 Resource *currentGradient() const;
139
145 void setCurrentGradient(Resource *resource);
146
152 QString currentBlendingMode() const;
153
159 void setCurrentBlendingMode(const QString &blendingMode);
160
164 float HDRExposure() const;
165
171 void setHDRExposure(float exposure);
172
176 float HDRGamma() const;
177
183 void setHDRGamma(float gamma);
184
190 qreal paintingOpacity() const;
191
197 void setPaintingOpacity(qreal opacity);
198
204 qreal brushSize() const;
205
211 void setBrushSize(qreal brushSize);
212
218 qreal brushRotation() const;
219
225 void setBrushRotation(qreal brushRotation);
226
232 qreal paintingFlow() const;
233
239 void setPaintingFlow(qreal flow);
240
246 qreal patternSize() const;
247
253 void setPatternSize(qreal size);
254
260 bool eraserMode() const;
261
267 void setEraserMode(bool value);
268
274 bool globalAlphaLock() const;
275
281 void setGlobalAlphaLock(bool value);
282
288 bool disablePressure() const;
289
295 void setDisablePressure(bool value);
296
305 void showFloatingMessage(const QString &message, const QIcon& icon, int timeout, int priority);
306
322 QList<Node *> selectedNodes() const;
323
329 QTransform flakeToDocumentTransform() const;
330
336 QTransform flakeToCanvasTransform() const;
337
343 QTransform flakeToImageTransform() const;
344
345private:
346
347 friend class Window;
348 friend class Scratchpad;
349
350
351 KisView *view();
352
353 struct Private;
354 Private *const d;
355
356};
357
358#endif // LIBKIS_VIEW_H
float value(const T *src, size_t ch)
bool operator==(const KisRegion &lhs, const KisRegion &rhs)
bool operator!=(const KoID &v1, const KoID &v2)
Definition KoID.h:103
The ManagedColor class is a class to handle colors that are color managed. A managed color is a color...
Definition Node.h:24
The Scratchpad class A scratchpad is a type of blank canvas area that can be painted on with the norm...
Definition Scratchpad.h:32
Definition View.h:25
Private *const d
Definition View.h:354