QGIS API Documentation  3.16.0-Hannover (43b64b13f3)
qgslayoutlegendlayersdialog.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgslayoutlegendlayersdialog.h
3  -----------------------------
4  begin : October 2017
5  copyright : (C) 2017 by 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 #ifndef QGSLAYOUTLEGENDLAYERSDIALOG_H
16 #define QGSLAYOUTLEGENDLAYERSDIALOG_H
17 
18 // We don't want to expose this in the public API
19 #define SIP_NO_FILE
20 
21 #include "qgis_gui.h"
22 #include "ui_qgslayoutlegendlayersdialogbase.h"
23 
24 class QgsMapLayer;
26 
34 class GUI_EXPORT QgsLayoutLegendLayersDialog: public QDialog, private Ui::QgsLayoutLegendLayersDialogBase
35 {
36  Q_OBJECT
37 
38  public:
40  QgsLayoutLegendLayersDialog( QWidget *parent = nullptr );
41 
45  void setVisibleLayers( const QList<QgsMapLayer *> &layers );
46 
48  QList< QgsMapLayer * > selectedLayers() const;
49 
50  private slots:
51 
52  void filterVisible( bool enabled );
53  void showHelp();
54 
55  private:
56 
57  QgsMapLayerProxyModel *mModel = nullptr;
58  QList< QgsMapLayer * > mVisibleLayers;
59 };
60 
61 #endif //QGSLAYOUTLEGENDLAYERSDIALOG_H
QgsLayoutLegendLayersDialog
A dialog to add new layers to the legend.
Definition: qgslayoutlegendlayersdialog.h:35
QgsMapLayerProxyModel
The QgsMapLayerProxyModel class provides an easy to use model to display the list of layers in widget...
Definition: qgsmaplayerproxymodel.h:34
QgsMapLayer
Base class for all map layer types.
Definition: qgsmaplayer.h:83