Krita Source Code Documentation
Loading...
Searching...
No Matches
wdgtagselection.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020 Agata Cacko cacko.azh@gmail.com
3 * SPDX-FileCopyrightText: 2023 Srirupa Datta <srirupa.sps@gmail.com>
4 *
5 * SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7#ifndef WDG_TAG_SELECTION_H
8#define WDG_TAG_SELECTION_H
9
10#include <QString>
11#include <QHBoxLayout>
12
13#include <KisTag.h>
14#include <KoResource.h>
16#include <KisTagModelProvider.h>
17
19
21{
22 Q_OBJECT
23
24public:
27
28 void setResourceIds(QString resourceType, QList<int> resourceIds);
29
30private Q_SLOTS:
31 void slotRemoveTag(KoID tag);
32 void slotAddTag(KoID tag);
33 void slotCreateNewTag(QString tag);
34
35private:
36 void updateView();
37
38private:
40 bool m_editable {true};
42 QString m_resourceType {""};
43
46};
47
48
50{
51 Q_OBJECT
52
53public:
56
58
59 void updateView();
60 void setResourceType(const QString& resourceType);
61 void addTag(KoID tag);
62
63Q_SIGNALS:
64 void tagAdded(KoID tag);
65 void tagRemoved(KoID tag);
66
67public Q_SLOTS:
68 void slotRemoveTag(KoID tag);
69 void slotAddTag(KoID tag);
70
71private:
72
74 {
76 };
77
78private:
80 bool m_editable {true};
81 QString m_resourceType {""};
82
84
85 QMap<QString, QList<KoID>> m_selectedTagsByResourceType;
86
89};
90
91
92#endif // WDG_TAG_SELECTION_H
QMap< QString, QList< KoID > > m_selectedTagsByResourceType
KisWdgTagSelectionControllerBundleTags(KisTagSelectionWidget *widget, bool editable)
KisTagSelectionWidget * m_tagSelectionWidget
QSharedPointer< KisTagResourceModel > m_tagResourceModel
QSharedPointer< KisTagModel > m_tagModel
void setResourceType(const QString &resourceType)
KisWdgTagSelectionControllerOneResource(KisTagSelectionWidget *widget, bool editable)
void setResourceIds(QString resourceType, QList< int > resourceIds)
KisTagSelectionWidget * m_tagSelectionWidget
QSharedPointer< KisTagResourceModel > m_tagResourceModel
QSharedPointer< KisTagModel > m_tagModel
Definition KoID.h:30