QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
layout
qgslayoutcombobox.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgslayoutcombobox.h
3
--------------------------------------
4
Date : March 2019
5
Copyright : (C) 2019 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 QGSLAYOUTCOMBOBOX_H
17
#define QGSLAYOUTCOMBOBOX_H
18
19
#include "qgis_gui.h"
20
#include "
qgis_sip.h
"
21
#include "
qgslayoutmanagermodel.h
"
22
23
#include <QComboBox>
24
25
class
QgsLayoutManager
;
26
33
class
GUI_EXPORT
QgsLayoutComboBox
:
public
QComboBox
34
{
35
Q_OBJECT
36
37
public
:
42
explicit
QgsLayoutComboBox
( QWidget *parent
SIP_TRANSFERTHIS
=
nullptr
,
QgsLayoutManager
*manager =
nullptr
);
43
47
void
setLayoutManager
(
QgsLayoutManager
*manager );
48
54
QgsLayoutManagerProxyModel::Filters
filters
()
const
;
55
61
void
setFilters
(
QgsLayoutManagerProxyModel::Filters
filters
);
62
67
void
setAllowEmptyLayout
(
bool
allowEmpty );
68
73
bool
allowEmptyLayout
()
const
;
74
78
QgsMasterLayoutInterface
*
currentLayout
()
const
;
79
83
QgsMasterLayoutInterface
*
layout
(
int
index )
const
;
84
85
public
slots:
86
90
void
setCurrentLayout
(
QgsMasterLayoutInterface
*
layout
);
91
92
signals:
93
95
void
layoutChanged
(
QgsMasterLayoutInterface
*
layout
);
96
97
private
slots:
98
void
indexChanged(
int
i );
99
void
rowsChanged();
100
101
private
:
102
QgsLayoutManagerModel
*mModel =
nullptr
;
103
QgsLayoutManagerProxyModel
*mProxyModel =
nullptr
;
104
};
105
106
#endif
// QGSLAYOUTCOMBOBOX_H
QgsLayoutComboBox::allowEmptyLayout
bool allowEmptyLayout() const
Returns true if the combobox includes the empty layout ("not set") choice.
Definition
qgslayoutcombobox.cpp:63
QgsLayoutComboBox::setLayoutManager
void setLayoutManager(QgsLayoutManager *manager)
Sets the layout manager containing the layouts to list in the combo box.
Definition
qgslayoutcombobox.cpp:31
QgsLayoutComboBox::layoutChanged
void layoutChanged(QgsMasterLayoutInterface *layout)
Emitted whenever the currently selected layout changes.
QgsLayoutComboBox::currentLayout
QgsMasterLayoutInterface * currentLayout() const
Returns the layout currently selected in the combo box.
Definition
qgslayoutcombobox.cpp:86
QgsLayoutComboBox::QgsLayoutComboBox
QgsLayoutComboBox(QWidget *parent=nullptr, QgsLayoutManager *manager=nullptr)
QgsLayoutComboBox creates a combo box to display a list of items in a layout manager.
Definition
qgslayoutcombobox.cpp:23
QgsLayoutComboBox::setCurrentLayout
void setCurrentLayout(QgsMasterLayoutInterface *layout)
Sets the currently selected layout in the combo box.
Definition
qgslayoutcombobox.cpp:68
QgsLayoutComboBox::setAllowEmptyLayout
void setAllowEmptyLayout(bool allowEmpty)
Sets whether an optional empty layout ("not set") option is present in the combobox.
Definition
qgslayoutcombobox.cpp:58
QgsLayoutComboBox::filters
QgsLayoutManagerProxyModel::Filters filters() const
Returns the current filters used for filtering available layouts.
Definition
qgslayoutcombobox.cpp:48
QgsLayoutComboBox::setFilters
void setFilters(QgsLayoutManagerProxyModel::Filters filters)
Sets the current filters used for filtering available layouts.
Definition
qgslayoutcombobox.cpp:53
QgsLayoutComboBox::layout
QgsMasterLayoutInterface * layout(int index) const
Returns the layout at the specified index.
Definition
qgslayoutcombobox.cpp:110
QgsLayoutManagerModel
List model representing the print layouts and reports available in a layout manager.
Definition
qgslayoutmanagermodel.h:48
QgsLayoutManagerProxyModel
QSortFilterProxyModel subclass for QgsLayoutManagerModel.
Definition
qgslayoutmanagermodel.h:112
QgsLayoutManagerProxyModel::Filters
QFlags< Filter > Filters
Definition
qgslayoutmanagermodel.h:122
QgsLayoutManager
Manages storage of a set of layouts.
Definition
qgslayoutmanager.h:50
QgsMasterLayoutInterface
Interface for master layout type objects, such as print layouts and reports.
Definition
qgsmasterlayoutinterface.h:45
qgis_sip.h
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition
qgis_sip.h:52
qgslayoutmanagermodel.h
Generated on
for QGIS API Documentation by
1.17.0