QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
Loading...
Searching...
No Matches
qgsmaplayerloadstyledialog.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsmaplayerloadstyledialog.h
3 ---------------------
4 begin : April 2013
5 copyright : (C) 2013 by Emilio Loi
6 email : loi at faunalia dot it
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
16#ifndef QGSMAPLAYERLOADSTYLEDIALOG_H
17#define QGSMAPLAYERLOADSTYLEDIALOG_H
18
19// We don't want to expose this in the public API
20#define SIP_NO_FILE
21
22#include "ui_qgsvectorlayerloadstyledialog.h"
23#include "qgis_gui.h"
25#include "qgsmaplayer.h"
26
28
41class GUI_EXPORT QgsMapLayerLoadStyleDialog : public QDialog, private Ui::QgsVectorLayerLoadStyleDialog
42{
43 Q_OBJECT
44 public:
45
49 explicit QgsMapLayerLoadStyleDialog( QgsMapLayer *layer, QWidget *parent = nullptr );
50
54 QgsMapLayer::StyleCategories styleCategories() const;
55
59 QgsLayerPropertiesDialog::StyleType currentStyleType() const;
60
66 QString fileExtension() const;
67
73 QString filePath() const;
74
78 void initializeLists( const QStringList &ids, const QStringList &names, const QStringList &descriptions, int sectionLimit );
79
83 QString selectedStyleId();
84
85 public slots:
86 void accept() override;
87
88 private slots:
89 void updateLoadButtonState();
90 void onRelatedTableSelectionChanged();
91 void onOthersTableSelectionChanged();
92 void deleteStyleFromDB();
93 void showHelp();
94
95 private:
96 void selectionChanged( QTableWidget *styleTable );
97
98 QgsMapLayer *mLayer = nullptr;
100 QString mSelectedStyleId;
101 QString mSelectedStyleName;
102 int mSectionLimit = 0;
103 QPushButton *mDeleteButton = nullptr;
104 QPushButton *mLoadButton = nullptr;
105 QPushButton *mCancelButton = nullptr;
106};
107
108#endif //QGSMAPLAYERLOADSTYLEDIALOG_H
A reusable dialog which allows users to select stored layer styles and categories to load for a map l...
Base class for all map layer types.
Definition qgsmaplayer.h:74