Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_uniform_paintop_property.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2016 Dmitry Kazakov <dimula73@gmail.com>
3 * SPDX-FileCopyrightText: 2021 L. E. Segovia <amy@amyspark.me>
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 */
7
8#ifndef __KIS_UNIFORM_PAINT_OP_PROPERTY_H
9#define __KIS_UNIFORM_PAINT_OP_PROPERTY_H
10
11#include <QScopedPointer>
12#include <QObject>
13
14#include "kis_image_export.h"
15#include "kis_types.h"
16
17class KRITAIMAGE_EXPORT KisUniformPaintOpProperty : public QObject
18{
19 Q_OBJECT
20public:
21 enum Type {
22 Int = 0,
25 Combo
26 };
27
31 enum SubType {
32 SubType_None = 0,
33 SubType_Angle
34 };
35
36public:
37 KisUniformPaintOpProperty(Type type, SubType subType, const KoID &id, KisPaintOpSettingsRestrictedSP settings, QObject *parent);
38 KisUniformPaintOpProperty(Type type, const KoID &id, KisPaintOpSettingsRestrictedSP settings, QObject *parent);
39 KisUniformPaintOpProperty(const KoID &id, KisPaintOpSettingsRestrictedSP settings, QObject *parent);
41
42 QString id() const;
43 QString name() const;
44 Type type() const;
45 SubType subType() const;
46
47 QVariant value() const;
48
49 QWidget *createPropertyWidget();
50
51 KisPaintOpSettingsSP settings() const;
52
53 virtual bool isVisible() const;
54
55public Q_SLOTS:
56 void setValue(const QVariant &value);
57 void requestReadValue();
58
59Q_SIGNALS:
60 void valueChanged(const QVariant &value);
61
62protected:
63 virtual void readValueImpl();
64 virtual void writeValueImpl();
65
66private:
67 struct Private;
68 const QScopedPointer<Private> m_d;
69};
70
71template<class T> class QSharedPointer;
72template<class T> class QWeakPointer;
73template<class T> class QList;
74
77
79extern template class KisCallbackBasedPaintopProperty<
83
84#endif /* __KIS_UNIFORM_PAINT_OP_PROPERTY_H */
float value(const T *src, size_t ch)
void valueChanged(const QVariant &value)
SubType
Hint to guess what this property is used for.
const QScopedPointer< Private > m_d
Definition KoID.h:30