Krita Source Code Documentation
Loading...
Searching...
No Matches
KoAbstractCanvasResourceInterface.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2024 Dmitry Kazakov <dimula73@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#ifndef KOABSTRACTCANVASRESOURCEINTERFACE_H
8#define KOABSTRACTCANVASRESOURCEINTERFACE_H
9
10#include <QObject>
11#include <QSharedPointer>
12#include "kritaflake_export.h"
13
14class QVariant;
15
21class KRITAFLAKE_EXPORT KoAbstractCanvasResourceInterface : public QObject
22{
23 Q_OBJECT
24public:
25 KoAbstractCanvasResourceInterface(int key, const QString debugTag = QString());
26
30 virtual QVariant value() const = 0;
31
35 virtual void setValue(const QVariant value) = 0;
36
40 int key() const;
41
42Q_SIGNALS:
47 void sigResourceChangedExternal(int key, const QVariant &value);
48
49private:
50 int m_key = -1;
51 QString m_debugTag;
52};
53
55
56#endif // KOABSTRACTCANVASRESOURCEINTERFACE_H
float value(const T *src, size_t ch)
QSharedPointer< KoAbstractCanvasResourceInterface > KoAbstractCanvasResourceInterfaceSP
void sigResourceChangedExternal(int key, const QVariant &value)
virtual void setValue(const QVariant value)=0
set the value of the current resource
virtual QVariant value() const =0