Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_default_bounds.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2010 Boudewijn Rempt <boud@valdyas.org>
3 * SPDX-FileCopyrightText: 2010 Dmitry Kazakov <dimula73@gmail.com>
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 */
7#ifndef KIS_DEFAULT_BOUNDS_H
8#define KIS_DEFAULT_BOUNDS_H
9
10#include <QRect>
11#include "kis_types.h"
13
22
23class KRITAIMAGE_EXPORT KisDefaultBounds : public KisDefaultBoundsBase
24{
25public:
28 ~KisDefaultBounds() override;
29
30 QRect bounds() const override;
31 bool wrapAroundMode() const override;
32 WrapAroundAxis wrapAroundModeAxis() const override;
33 int currentLevelOfDetail() const override;
34 int currentTime() const override;
35 bool externalFrameActive() const override;
36 void * sourceCookie() const override;
37
38protected:
39 friend class KisPaintDeviceTest;
40 static const QRect infiniteRect;
41
42private:
43 Q_DISABLE_COPY(KisDefaultBounds)
44
45 struct Private;
46 Private * const m_d;
47};
48
60{
61public:
64
65 QRect bounds() const override;
66 QRect imageBorderRect() const override;
67 bool wrapAroundMode() const override;
68 WrapAroundAxis wrapAroundModeAxis() const override;
69 int currentLevelOfDetail() const override;
70 int currentTime() const override;
71 bool externalFrameActive() const override;
72 void * sourceCookie() const override;
73
74protected:
79
80private:
81 Q_DISABLE_COPY(KisSelectionDefaultBoundsBase)
82};
83
91{
92public:
95
96protected:
97 virtual KisPaintDeviceSP parentPaintDevice() const override;
98
99private:
100 Q_DISABLE_COPY(KisSelectionDefaultBounds)
101 KisPaintDeviceWSP m_paintDevice;
102};
103
112{
113public:
115 ~KisMaskDefaultBounds() override;
116
117protected:
118 virtual KisPaintDeviceSP parentPaintDevice() const override;
119
120private:
121 Q_DISABLE_COPY(KisMaskDefaultBounds)
122 KisNodeWSP m_parentNode;
123};
124
130class KRITAIMAGE_EXPORT KisSelectionEmptyBounds : public KisDefaultBounds
131{
132public:
135 ~KisSelectionEmptyBounds() override;
136 QRect bounds() const override;
137};
138
144class KRITAIMAGE_EXPORT KisWrapAroundBoundsWrapper : public KisDefaultBoundsBase
145{
146public:
149
150 QRect bounds() const override;
151 bool wrapAroundMode() const override;
152 WrapAroundAxis wrapAroundModeAxis() const override;
153 int currentLevelOfDetail() const override;
154 int currentTime() const override;
155 bool externalFrameActive() const override;
156 void * sourceCookie() const override;
157
158protected:
159 friend class KisPaintDeviceTest;
160
161private:
162 Q_DISABLE_COPY(KisWrapAroundBoundsWrapper)
163
164 struct Private;
165 const QScopedPointer<Private> m_d;
166};
167
168#endif // KIS_DEFAULT_BOUNDS_H
WrapAroundAxis
virtual bool externalFrameActive() const =0
virtual WrapAroundAxis wrapAroundModeAxis() const =0
virtual int currentLevelOfDetail() const =0
virtual bool wrapAroundMode() const =0
virtual void * sourceCookie() const =0
virtual QRect imageBorderRect() const
virtual int currentTime() const =0
virtual QRect bounds() const =0
virtual KisPaintDeviceSP parentPaintDevice() const =0
#define bounds(x, a, b)
KisSharedPtr< KisSelectionDefaultBounds > KisSelectionDefaultBoundsSP
KisSharedPtr< KisDefaultBounds > KisDefaultBoundsSP
KisSharedPtr< KisWrapAroundBoundsWrapper > KisWrapAroundBoundsWrapperSP
KisSharedPtr< KisSelectionEmptyBounds > KisSelectionEmptyBoundsSP
static const QRect infiniteRect
The KisWrapAroundBoundsWrapper class wrapper around a KisDefaultBoundsBaseSP to enable wraparound....
QRect bounds() const override
const QScopedPointer< Private > m_d