QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
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
24class QgsMapLayer;
26
34class 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
A dialog to add new layers to the legend.
The QgsMapLayerProxyModel class provides an easy to use model to display the list of layers in widget...
Base class for all map layer types.
Definition qgsmaplayer.h:76