QGIS API Documentation 3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
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 <QComboBox>
20#include "qgis_sip.h"
21#include "qgis_gui.h"
22#include "qgslayoutmanager.h"
23
30class GUI_EXPORT QgsLayoutComboBox : public QComboBox
31{
32 Q_OBJECT
33
34 public:
39 explicit QgsLayoutComboBox( QWidget *parent SIP_TRANSFERTHIS = nullptr, QgsLayoutManager *manager = nullptr );
40
44 void setLayoutManager( QgsLayoutManager *manager );
45
52
58 void setFilters( QgsLayoutManagerProxyModel::Filters filters );
59
64 void setAllowEmptyLayout( bool allowEmpty );
65
70 bool allowEmptyLayout() const;
71
75 QgsMasterLayoutInterface *currentLayout() const;
76
80 QgsMasterLayoutInterface *layout( int index ) const;
81
82 public slots:
83
87 void setCurrentLayout( QgsMasterLayoutInterface *layout );
88
89 signals:
90
93
94 private slots:
95 void indexChanged( int i );
96 void rowsChanged();
97
98 private:
99 QgsLayoutManagerModel *mModel = nullptr;
100 QgsLayoutManagerProxyModel *mProxyModel = nullptr;
101};
102
103#endif // QGSLAYOUTCOMBOBOX_H
The QgsLayoutComboBox class is a combo box which displays available layouts from a QgsLayoutManager.
void layoutChanged(QgsMasterLayoutInterface *layout)
Emitted whenever the currently selected layout changes.
List model representing the print layouts and reports available in a layout manager.
QSortFilterProxyModel subclass for QgsLayoutManagerModel.
Manages storage of a set of layouts.
Interface for master layout type objects, such as print layouts and reports.
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53