Krita Source Code Documentation
Loading...
Searching...
No Matches
timeline_node_list_keeper.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2015 Dmitry Kazakov <dimula73@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#ifndef __TIMELINE_NODE_LIST_KEEPER_H
8#define __TIMELINE_NODE_LIST_KEEPER_H
9
10#include <QObject>
11#include <QList>
12#include <QScopedPointer>
13#include <QAbstractTableModel>
14
15#include "kritaanimationdocker_export.h"
16
18
19class KisNodeDummy;
22
23
24class KRITAANIMATIONDOCKER_EXPORT TimelineNodeListKeeper : public QObject
25{
26 Q_OBJECT
27public:
29
30 struct OtherLayer;
32
33
35 KisDummiesFacadeBase *dummiesFacade,
36 KisNodeDisplayModeAdapter *displayModeAdapter);
37 ~TimelineNodeListKeeper() override;
38
39 KisNodeDummy* dummyFromRow(int row);
40 int rowForDummy(KisNodeDummy *dummy);
41 int rowCount();
42
43 OtherLayersList otherLayersList() const;
44
45 void updateActiveDummy(KisNodeDummy *dummy);
46
47private Q_SLOTS:
48 void slotEndInsertDummy(KisNodeDummy *dummy);
49 void slotBeginRemoveDummy(KisNodeDummy *dummy);
50 void slotDummyChanged(KisNodeDummy *dummy);
51
52 void slotUpdateDummyContent(QPointer<KisNodeDummy> dummy);
53
54 void slotDisplayModeChanged();
55
56public:
59 : KisTimeBasedItemModel(parent) {}
60
62 beginResetModel();
63 }
64
66 endResetModel();
67 }
68
69 void callBeginInsertRows(const QModelIndex &parent, int first, int last) {
70 beginInsertRows(parent, first, last);
71 }
72
74 endInsertRows();
75 }
76
77 void callBeginRemoveRows(const QModelIndex &parent, int first, int last) {
78 beginRemoveRows(parent, first, last);
79 }
80
82 endRemoveRows();
83 }
84
85 void callIndexChanged(const QModelIndex &index0, const QModelIndex &index1) {
86 Q_EMIT dataChanged(index0, index1);
87 }
88 };
89
90 struct OtherLayer {
91 OtherLayer(const QString &_name, KisNodeDummy *_dummy)
92 : name(_name),
93 dummy(_dummy)
94 {
95 }
96
97 QString name;
99 };
100
101private:
102 struct Private;
103 const QScopedPointer<Private> m_d;
104};
105
107
108#endif /* __TIMELINE_NODE_LIST_KEEPER_H */
const QScopedPointer< Private > m_d
QList< OtherLayer > OtherLayersList
Q_DECLARE_METATYPE(KisPaintopLodLimitations)
void callBeginRemoveRows(const QModelIndex &parent, int first, int last)
void callBeginInsertRows(const QModelIndex &parent, int first, int last)
void callIndexChanged(const QModelIndex &index0, const QModelIndex &index1)
OtherLayer(const QString &_name, KisNodeDummy *_dummy)