QGIS API Documentation
4.3.0-Master (52aa6503bed)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
layout
qgslayoutitemgroupundocommand.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgslayoutitemgroupundocommand.h
3
-------------------------------
4
begin : 2016-06-09
5
copyright : (C) 2016 by Sandro Santilli
6
email : strk at kbt dot io
7
***************************************************************************/
8
9
/***************************************************************************
10
* *
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
15
* *
16
***************************************************************************/
17
18
#ifndef QGSLAYOUTITEMGROUPUNDOCOMMAND_H
19
#define QGSLAYOUTITEMGROUPUNDOCOMMAND_H
20
21
#include "qgis_core.h"
22
#include "
qgslayoutitem.h
"
23
24
#include <QUndoCommand>
25
26
#define SIP_NO_FILE
27
29
34
class
CORE_EXPORT QgsLayoutItemGroupUndoCommand :
public
QObject,
public
QUndoCommand
35
{
36
Q_OBJECT
37
38
public
:
40
enum
State
41
{
42
Grouped = 0,
43
Ungrouped
44
};
45
56
QgsLayoutItemGroupUndoCommand( State s,
QgsLayoutItemGroup
*group,
QgsLayout
*layout,
const
QString &text, QUndoCommand *parent =
nullptr
);
57
58
void
redo()
override
;
59
void
undo()
override
;
60
61
private
:
62
QString mGroupUuid;
63
QSet<QString> mItemUuids;
64
QgsLayout
*mLayout =
nullptr
;
65
State mState;
67
bool
mFirstRun =
true
;
68
69
//changes between added / removed state
70
void
switchState();
71
};
73
74
#endif
// QGSLAYOUTITEMGROUPUNDOCOMMAND_H
QgsLayoutItemGroup
A container for grouping several QgsLayoutItems.
Definition
qgslayoutitemgroup.h:28
QgsLayout
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
Definition
qgslayout.h:51
qgslayoutitem.h
Generated on
for QGIS API Documentation by
1.17.0