QGIS API Documentation 3.99.0-Master (a5475b57e34)
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
20#include "ui_qgslayoutlegendlayersdialogbase.h"
21
22#include "qgis_gui.h"
23
24#define SIP_NO_FILE
25
26class QgsMapLayer;
28
36class GUI_EXPORT QgsLayoutLegendLayersDialog : public QDialog, private Ui::QgsLayoutLegendLayersDialogBase
37{
38 Q_OBJECT
39
40 public:
42 QgsLayoutLegendLayersDialog( QWidget *parent = nullptr );
43
47 void setVisibleLayers( const QList<QgsMapLayer *> &layers );
48
50 QList<QgsMapLayer *> selectedLayers() const;
51
52 private slots:
53
54 void filterVisible( bool enabled );
55 void showHelp();
56
57 private:
58 QgsMapLayerProxyModel *mModel = nullptr;
59 QList<QgsMapLayer *> mVisibleLayers;
60};
61
62#endif //QGSLAYOUTLEGENDLAYERSDIALOG_H
void setVisibleLayers(const QList< QgsMapLayer * > &layers)
Sets a list of visible layers, to use for filtering within the dialog.
QList< QgsMapLayer * > selectedLayers() const
Returns the list of selected layers.
QgsLayoutLegendLayersDialog(QWidget *parent=nullptr)
constructor
A proxy model which provides an easy to use model to display the list of layers in widgets.
Base class for all map layer types.
Definition qgsmaplayer.h:83