Krita Source Code Documentation
Loading...
Searching...
No Matches
KisAnimatedOpacityProperty.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2021 Eoin O 'Neill <eoinoneill1991@gmail.com>
3 * SPDX-FileCopyrightText: 2021 Emmet O 'Neill <emmetoneill.pdx@gmail.com>
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 */
7
8#ifndef KIS_PROPERTY_WRAPPER_H
9#define KIS_PROPERTY_WRAPPER_H
10
11#include <QObject>
12#include <QVariant>
13
15#include "kis_time_span.h"
16#include "kis_image.h"
17#include "KoProperties.h"
18
19#include "kritaimage_export.h"
20
21class KRITAIMAGE_EXPORT KisAnimatedOpacityProperty : public QObject {
22 Q_OBJECT
23public:
24 KisAnimatedOpacityProperty(KisDefaultBoundsBaseSP bounds, KoProperties* const props, quint8 defaultValue, QObject *parent = nullptr);
25
26 quint8 get();
27 void set(const quint8 value);
28
29 bool hasChannel() { return !m_channel.isNull(); }
30 KisScalarKeyframeChannel* channel() const { return m_channel.data(); }
31
32 void makeAnimated(KisNode* parentNode);
33 void transferKeyframeData(const KisAnimatedOpacityProperty &rhs);
34
35 void updateDefaultBounds(KisDefaultBoundsBaseSP bounds);
36
37Q_SIGNALS:
38 void changed(quint8 value);
39
40public Q_SLOTS:
41 void slotKeyChanged(const KisKeyframeChannel*, int time);
42 void slotKeyRemoval(const KisKeyframeChannel*, int);
43
44private:
47 QScopedPointer<KisScalarKeyframeChannel> m_channel;
49};
50
51#endif // KISLAMBDAPROPERTY_H
float value(const T *src, size_t ch)
VertexDescriptor get(PredecessorMap const &m, VertexDescriptor v)
KisScalarKeyframeChannel * channel() const
QScopedPointer< KisScalarKeyframeChannel > m_channel
void changed(quint8 value)
KisKeyframeChannel stores and manages KisKeyframes. Maps units of time to virtual keyframe values....
The KisScalarKeyframeChannel is a concrete KisKeyframeChannel subclass that stores and manages KisSca...
#define bounds(x, a, b)