Krita Source Code Documentation
Loading...
Searching...
No Matches
GuidesConfig.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2024 Grum999 <grum999@grum.fr>
3 *
4 * SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6#ifndef LIBKIS_GUIDESCONFIG_H
7#define LIBKIS_GUIDESCONFIG_H
8
9#include <QObject>
10#include "kis_guides_config.h"
11
12#include "kritalibkis_export.h"
13#include "libkis.h"
14
19class KRITALIBKIS_EXPORT GuidesConfig : public QObject
20{
21 Q_OBJECT
22
23public:
24 GuidesConfig(KisGuidesConfig *guidesConfig);
25
29 explicit GuidesConfig(QObject *parent = 0);
30 ~GuidesConfig() override;
31
32 bool operator==(const GuidesConfig &other) const;
33 bool operator!=(const GuidesConfig &other) const;
34
35public Q_SLOTS:
36
41 QColor color() const;
42
47 void setColor(const QColor &color) const;
48
57 QString lineType() const;
58
67 void setLineType(const QString &lineType);
68
73 bool hasGuides() const;
74
79 bool hasSamePositionAs(const GuidesConfig &guideConfig) const;
80
85 QList<qreal> horizontalGuides() const;
86
91 void setHorizontalGuides(const QList<qreal> &lines);
92
97 QList<qreal> verticalGuides() const;
98
103 void setVerticalGuides(const QList<qreal> &lines);
104
110 bool fromXml(const QString &xmlContent) const;
111
116 QString toXml() const;
117
121 void removeAllGuides();
122
127 bool visible() const;
128
133 void setVisible(const bool value);
134
139 bool locked() const;
140
145 void setLocked(const bool value);
146
151 bool snap() const;
152
157 void setSnap(const bool value);
158
159private:
160 friend class Document;
161
162 KisGuidesConfig guidesConfig() const;
163
164private:
165 struct Private;
167
168};
169
170#endif // LIBKIS_GUIDESCONFIG_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
Private * d