Krita Source Code Documentation
Loading...
Searching...
No Matches
KisSelectedShapesProxy.cpp
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2017 Dmitry Kazakov <dimula73@gmail.com>
3
*
4
* SPDX-License-Identifier: GPL-2.0-or-later
5
*/
6
7
#include <QPointer>
8
#include "
KisSelectedShapesProxy.h
"
9
10
#include "
kis_signal_auto_connection.h
"
11
#include <
KoShapeManager.h
>
12
#include <
KoSelection.h
>
13
14
15
struct
KisSelectedShapesProxy::Private
16
{
17
KoShapeManager
*
globalShapeManager
;
18
QPointer<KoShapeManager>
shapeManager
;
19
KisSignalAutoConnectionsStore
shapeManagerConnections
;
20
};
21
22
KisSelectedShapesProxy::KisSelectedShapesProxy
(
KoShapeManager
*globalShapeManager)
23
: m_d(new
Private
())
24
{
25
m_d
->globalShapeManager = globalShapeManager;
26
27
connect
(
m_d
->globalShapeManager->selection(),
28
SIGNAL(
currentLayerChanged
(
const
KoShapeLayer
*)),
29
SIGNAL(
currentLayerChanged
(
const
KoShapeLayer
*)));
30
}
31
32
KisSelectedShapesProxy::~KisSelectedShapesProxy
()
33
{
34
35
}
36
37
void
KisSelectedShapesProxy::setShapeManager
(
KoShapeManager
*shapeManager)
38
{
39
if
(shapeManager !=
m_d
->shapeManager) {
40
m_d
->shapeManager = shapeManager;
41
42
m_d
->shapeManagerConnections.clear();
43
44
if
(
m_d
->shapeManager) {
45
m_d
->shapeManagerConnections.addConnection(
46
m_d
->shapeManager, SIGNAL(
selectionChanged
()),
this
, SIGNAL(
selectionChanged
()));
47
m_d
->shapeManagerConnections.addConnection(
48
m_d
->shapeManager, SIGNAL(
selectionContentChanged
()),
this
, SIGNAL(
selectionContentChanged
()));
49
}
50
51
Q_EMIT
selectionChanged
();
52
}
53
}
54
55
KoSelection
*
KisSelectedShapesProxy::selection
()
56
{
57
return
m_d
->shapeManager ?
58
m_d
->shapeManager->selection() :
59
m_d
->globalShapeManager->selection();
60
}
61
KisSelectedShapesProxy.h
KoSelection.h
KoShapeManager.h
connect
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
KisSelectedShapesProxy::KisSelectedShapesProxy
KisSelectedShapesProxy(KoShapeManager *globalShapeManager)
Definition
KisSelectedShapesProxy.cpp:22
KisSelectedShapesProxy::currentLayerChanged
void currentLayerChanged(const KoShapeLayer *layer)
KisSelectedShapesProxy::m_d
QScopedPointer< Private > m_d
Definition
KisSelectedShapesProxy.h:36
KisSelectedShapesProxy::~KisSelectedShapesProxy
~KisSelectedShapesProxy() override
Definition
KisSelectedShapesProxy.cpp:32
KisSelectedShapesProxy::selectionContentChanged
void selectionContentChanged()
KisSelectedShapesProxy::selectionChanged
void selectionChanged()
KisSelectedShapesProxy::selection
KoSelection * selection() override
Definition
KisSelectedShapesProxy.cpp:55
KisSelectedShapesProxy::setShapeManager
void setShapeManager(KoShapeManager *manager)
Definition
KisSelectedShapesProxy.cpp:37
KisSignalAutoConnectionsStore
Definition
kis_signal_auto_connection.h:71
KoSelection
Definition
KoSelection.h:38
KoShapeLayer
Definition
KoShapeLayer.h:20
KoShapeManager
Definition
KoShapeManager.h:42
QPointer
Definition
kis_types.h:255
kis_signal_auto_connection.h
Private
Definition
SvgTransformParser.cpp:20
KisSelectedShapesProxy::Private
Definition
KisSelectedShapesProxy.cpp:16
KisSelectedShapesProxy::Private::shapeManagerConnections
KisSignalAutoConnectionsStore shapeManagerConnections
Definition
KisSelectedShapesProxy.cpp:19
KisSelectedShapesProxy::Private::globalShapeManager
KoShapeManager * globalShapeManager
Definition
KisSelectedShapesProxy.cpp:17
KisSelectedShapesProxy::Private::shapeManager
QPointer< KoShapeManager > shapeManager
Definition
KisSelectedShapesProxy.cpp:18
libs
ui
KisSelectedShapesProxy.cpp
Generated at
2025-11-04 02:30:02+01:00
from
Krita
branch
master
, commit
c9dde2e79561a8aea4a7e8d9ac99c98a7bac9e52