QGIS API Documentation
3.14.0-Pi (9f7028fd23)
src
gui
layout
qgslayoutitemcombobox.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgslayoutitemcombobox.h
3
--------------------------------------
4
Date : October 2017
5
Copyright : (C) 2017 Nyall Dawson
6
Email : nyall dot dawson at gmail dot com
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
16
#ifndef QGSLAYOUTITEMCOMBOBOX_H
17
#define QGSLAYOUTITEMCOMBOBOX_H
18
19
#include <QComboBox>
20
#include "
qgis_sip.h
"
21
#include "
qgslayoutitem.h
"
22
#include "
qgslayoutitemregistry.h
"
23
#include "qgis_gui.h"
24
#include "
qgslayoutmodel.h
"
25
26
34
class
GUI_EXPORT
QgsLayoutItemComboBox
:
public
QComboBox
35
{
36
Q_OBJECT
37
38
public
:
39
46
explicit
QgsLayoutItemComboBox
( QWidget *parent
SIP_TRANSFERTHIS
=
nullptr
,
QgsLayout
*layout =
nullptr
);
47
53
void
setCurrentLayout(
QgsLayout
*layout );
54
60
QgsLayout
*currentLayout();
61
68
void
setItemType(
QgsLayoutItemRegistry::ItemType
itemType );
69
74
QgsLayoutItemRegistry::ItemType
itemType()
const
;
75
80
void
setExceptedItemList(
const
QList< QgsLayoutItem * > &exceptList );
81
86
QList< QgsLayoutItem * > exceptedItemList()
const
;
87
93
void
setAllowEmptyItem(
bool
allowEmpty );
94
100
bool
allowEmptyItem()
const
;
101
106
QgsLayoutItem
*item(
int
index )
const
;
107
111
QgsLayoutItem
*currentItem()
const
;
112
113
public
slots:
114
118
void
setItem(
const
QgsLayoutItem
*item );
119
120
signals:
121
123
void
itemChanged(
QgsLayoutItem
*item );
124
125
private
slots:
126
void
indexChanged(
int
i );
127
void
rowsChanged();
128
129
private
:
130
std::unique_ptr< QgsLayoutProxyModel > mProxyModel;
131
132
};
133
134
#endif // QGSLAYOUTITEMCOMBOBOX_H
QgsLayoutItemComboBox
The QgsLayoutItemComboBox class is a combo box which displays items of a matching type from a layout.
Definition:
qgslayoutitemcombobox.h:34
QgsLayoutItemRegistry::ItemType
ItemType
Item types.
Definition:
qgslayoutitemregistry.h:306
qgslayoutitem.h
qgis_sip.h
QgsLayoutItem
Base class for graphical items within a QgsLayout.
Definition:
qgslayoutitem.h:112
QgsLayout
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
Definition:
qgslayout.h:49
qgslayoutitemregistry.h
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition:
qgis_sip.h:53
qgslayoutmodel.h
Generated on Mon Jun 22 2020 05:14:09 for QGIS API Documentation by
1.8.17