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
18
class
KoShapeBackground
;
19
class
QModelIndex;
20
21
class
KoCanvasResourcesInterface
;
22
using
KoCanvasResourcesInterfaceSP
=
QSharedPointer<KoCanvasResourcesInterface>
;
23
24
#include "kritawidgets_export.h"
25
26
class
KRITAWIDGETS_EXPORT
KoResourcePopupAction
:
public
QAction
27
{
28
Q_OBJECT
29
30
public
:
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
52
Q_SIGNALS:
54
void
resourceSelected
(
QSharedPointer<KoShapeBackground>
background);
55
56
public
Q_SLOTS:
57
void
updateIcon();
58
59
private
Q_SLOTS:
60
void
indexChanged(
const
QModelIndex &modelIndex);
61
62
private
:
63
class
Private
;
64
Private
*
const
d
;
65
};
66
67
#endif
/* KORESOURCEPOPUPACTION_H */
KoResource.h
KoCanvasResourcesInterface
An abstract class for providing access to canvas resources like current gradient and Fg/Bg colors.
Definition
KoCanvasResourcesInterface.h:24
KoResourcePopupAction
Definition
KoResourcePopupAction.h:27
KoResourcePopupAction::d
Private *const d
Definition
KoResourcePopupAction.h:64
KoResourcePopupAction::resourceSelected
void resourceSelected(QSharedPointer< KoShapeBackground > background)
Emitted when a resource was selected.
KoShapeBackground
Definition
KoShapeBackground.h:25
QSharedPointer< KoCanvasResourcesInterface >
Private
Definition
SvgTransformParser.cpp:20
libs
widgets
KoResourcePopupAction.h
Generated at
2025-11-04 02:30:02+01:00
from
Krita
branch
master
, commit
c9dde2e79561a8aea4a7e8d9ac99c98a7bac9e52