Krita Source Code Documentation
Loading...
Searching...
No Matches
KisResourceItemChooserContextMenu.h
Go to the documentation of this file.
1/*
2 * This file is part of the KDE project
3 * SPDX-FileCopyrightText: 2013 Sascha Suelzer <s.suelzer@gmail.com>
4 * SPDX-FileCopyrightText: 2019 Boudewijn Rempt <boud@valdyas.org>
5 * SPDX-FileCopyrightText: 2020 Agata Cacko <cacko.azh@gmail.com>
6 *
7 * SPDX-License-Identifier: LGPL-2.0-or-later
8 * */
9
10#ifndef KISRESOURCEITEMCHOOSERCONTEXTMENU_H
11#define KISRESOURCEITEMCHOOSERCONTEXTMENU_H
12
13#include <QMenu>
14#include <QWidgetAction>
15#include <QLineEdit>
16
17#include <KoResource.h>
18#include <KisTag.h>
19#include <KisTagModel.h>
20
21#include "TagActions.h"
22#include "KisTagChooserWidget.h"
23
35{
36 Q_OBJECT
37public:
43 explicit KisResourceItemChooserContextMenu(KoResourceSP resource, const KisTagSP currentlySelectedTag, KisTagChooserWidget *tagChooser);
46
47Q_SIGNALS:
48
51
54
56 void resourceAssignmentToNewTagRequested(const QString &tag, KoResourceSP resource);
57
58
59public Q_SLOTS:
60
66 void removeResourceExistingTag(const KisTagSP tag, KoResourceSP resource);
67
73 void addResourceExistingTag(const KisTagSP tag, KoResourceSP resource);
74
75
76private:
82
83};
84
85#endif // KISRESOURCEITEMCHOOSERCONTEXTMENU_H
The KisResourceItemChooserContextMenu class is responsible for the context menu in ResourceItemChoose...
void resourceAssignmentToNewTagRequested(const QString &tag, KoResourceSP resource)
Emitted when a resource should be added to a new tag, which will need to be created.
void resourceTagRemovalRequested(KoResourceSP resource, const KisTagSP tag)
Emitted when a resource should be removed from an existing tag.
void removeResourceExistingTag(const KisTagSP tag, KoResourceSP resource)
removeResourceExistingTag slot for a signal from the action to remove the tag from the resource
KisResourceItemChooserContextMenu(KoResourceSP resource, const KisTagSP currentlySelectedTag, KisTagChooserWidget *tagChooser)
KisResourceItemChooserContextMenu the constructor for the KisResourceItemChooserContextMenu class.
KisTagModel * m_tagModel
m_tagModel data model for tags (for tagging and untagging resources and create lists of tags)
void addResourceExistingTag(const KisTagSP tag, KoResourceSP resource)
addResourceExistingTag slot for a signal from the action to add the tag to the resource
void resourceTagAdditionRequested(const KisTagSP tag, KoResourceSP resource)
Emitted when a resource should be added to an existing tag.
The KisTagChooserWidget class is responsible for all the logic that the tags combobox has in various ...