Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_node_filter_proxy_model.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 __KIS_NODE_FILTER_PROXY_MODEL_H
8#define __KIS_NODE_FILTER_PROXY_MODEL_H
9
10#include <QScopedPointer>
11#include <QSortFilterProxyModel>
12#include "kis_types.h"
13#include "kritaui_export.h"
14
15class KisNodeModel;
16class KisNodeDummy;
17class KisNodeManager;
18
19
20class KRITAUI_EXPORT KisNodeFilterProxyModel : public QSortFilterProxyModel
21{
22 Q_OBJECT
23public:
24 KisNodeFilterProxyModel(QObject *parent);
25 ~KisNodeFilterProxyModel() override;
26
27 void setNodeModel(KisNodeModel *model);
28
29 bool setData(const QModelIndex &index, const QVariant &value, int role) override;
30
31 bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override;
32 void setAcceptedLabels(const QSet<int> &value);
33 void setTextFilter(const QString &text);
34
35 KisNodeSP nodeFromIndex(const QModelIndex &index) const;
36 QModelIndex indexFromNode(KisNodeSP node) const;
37
38 void unsetDummiesFacade();
39
40Q_SIGNALS:
41 void sigBeforeBeginRemoveRows(const QModelIndex &parent, int start, int end);
42
43public Q_SLOTS:
44 void setActiveNode(KisNodeSP node);
45
46private Q_SLOTS:
47 void slotUpdateCurrentNodeFilter();
48 void slotBeforeBeginRemoveRows(const QModelIndex &parent, int start, int end);
49
50private:
51 struct Private;
52 const QScopedPointer<Private> m_d;
53};
54
55#endif /* __KIS_NODE_FILTER_PROXY_MODEL_H */
float value(const T *src, size_t ch)
const QScopedPointer< Private > m_d
void sigBeforeBeginRemoveRows(const QModelIndex &parent, int start, int end)