QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
qgscomposeritemcombobox.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgscomposeritemcombobox.h
3  --------------------------------------
4  Date : August 2014
5  Copyright : (C) 2014 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 QGSCOMPOSERITEMCOMBOBOX_H
17 #define QGSCOMPOSERITEMCOMBOBOX_H
18 
19 #include <QComboBox>
20 #include "qgscomposeritem.h"
21 
23 
31 class GUI_EXPORT QgsComposerItemComboBox : public QComboBox
32 {
33  Q_OBJECT
34 
35  public:
43  explicit QgsComposerItemComboBox( QWidget* parent = nullptr, QgsComposition* composition = nullptr );
44 
47  void setComposition( QgsComposition* composition );
48 
54  void setItemType( QgsComposerItem::ItemType itemType );
55 
59  QgsComposerItem::ItemType itemType() const;
60 
65  void setExceptedItemList( const QList< QgsComposerItem* >& exceptList );
66 
70  QList< QgsComposerItem* > exceptedItemList() const;
71 
76  QgsComposerItem* item( int index ) const;
77 
81 
82  public slots:
86  void setItem( const QgsComposerItem* item );
87 
88  signals:
89 
91  void itemChanged( QgsComposerItem* item );
92 
93  private slots:
94  void indexChanged( int i );
95  void rowsChanged();
96 
97  private:
98  QgsComposerProxyModel* mProxyModel;
99 
100 };
101 
102 #endif // QGSCOMPOSERITEMCOMBOBOX_H
static unsigned index
A item that forms part of a map composition.
int currentItem() const
The QgsComposerItemComboBox class is a combo box which displays items of a matching type from a compo...
Graphics scene for map printing.
Allows for filtering a QgsComposerModel by item type.