QGIS API Documentation 4.3.0-Master (621ced71bd7)
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;
28class QgsProject;
29
37class GUI_EXPORT QgsLayoutLegendLayersDialog : public QDialog, private Ui::QgsLayoutLegendLayersDialogBase
38{
39 Q_OBJECT
40
41 public:
46 QgsLayoutLegendLayersDialog( QWidget *parent, QgsProject *project );
47
51 void setVisibleLayers( const QList<QgsMapLayer *> &layers );
52
54 QList<QgsMapLayer *> selectedLayers() const;
55
56 private slots:
57
58 void filterVisible( bool enabled );
59 void showHelp();
60
61 private:
62 QgsMapLayerProxyModel *mModel = nullptr;
63 QList<QgsMapLayer *> mVisibleLayers;
64};
65
66#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, QgsProject *project)
Constructor, taking layers from project.
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
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition qgsproject.h:114