QGIS API Documentation 3.99.0-Master (2fe06baccd8)
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 "ui_qgslayoutlegendlayersdialogbase.h"
22
23#include "qgis_gui.h"
24
25class QgsMapLayer;
27
35class GUI_EXPORT QgsLayoutLegendLayersDialog : public QDialog, private Ui::QgsLayoutLegendLayersDialogBase
36{
37 Q_OBJECT
38
39 public:
41 QgsLayoutLegendLayersDialog( QWidget *parent = nullptr );
42
46 void setVisibleLayers( const QList<QgsMapLayer *> &layers );
47
49 QList<QgsMapLayer *> selectedLayers() const;
50
51 private slots:
52
53 void filterVisible( bool enabled );
54 void showHelp();
55
56 private:
57 QgsMapLayerProxyModel *mModel = nullptr;
58 QList<QgsMapLayer *> mVisibleLayers;
59};
60
61#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:80