Krita Source Code Documentation
Loading...
Searching...
No Matches
KoResourcePopupAction.h
Go to the documentation of this file.
1/*
2 * Made by Tomislav Lukman (tomislav.lukman@ck.tel.hr)
3 * SPDX-FileCopyrightText: 2012 Jean-Nicolas Artaud <jeannicolasartaud@gmail.com>
4 * SPDX-FileCopyrightText: 2019 Boudewijn Rempt <boud@valdyas.org>
5 *
6 * SPDX-License-Identifier: LGPL-2.0-or-later
7 */
8
9#ifndef KORESOURCEPOPUPACTION_H
10#define KORESOURCEPOPUPACTION_H
11
12#include <QAction>
13
14#include <QSharedPointer>
15
16#include <KoResource.h>
17
19class QModelIndex;
20
23
24#include "kritawidgets_export.h"
25
26class KRITAWIDGETS_EXPORT KoResourcePopupAction : public QAction
27{
28 Q_OBJECT
29
30public:
37 explicit KoResourcePopupAction(const QString &resourceType, KoCanvasResourcesInterfaceSP canvasResourcesInterface, QObject *parent = 0);
38
42 ~KoResourcePopupAction() override;
43
44 QSharedPointer<KoShapeBackground> currentBackground() const;
45 void setCurrentBackground(QSharedPointer<KoShapeBackground> background);
46
47 void setCurrentResource(KoResourceSP resource);
48 KoResourceSP currentResource() const;
49
50 void setCanvasResourcesInterface(KoCanvasResourcesInterfaceSP canvasResourcesInterface);
51
52Q_SIGNALS:
55
56public Q_SLOTS:
57 void updateIcon();
58
59private Q_SLOTS:
60 void indexChanged(const QModelIndex &modelIndex);
61
62private:
63 class Private;
64 Private * const d;
65};
66
67#endif /* KORESOURCEPOPUPACTION_H */
An abstract class for providing access to canvas resources like current gradient and Fg/Bg colors.
void resourceSelected(QSharedPointer< KoShapeBackground > background)
Emitted when a resource was selected.