QGIS API Documentation 3.41.0-Master (af5edcb665c)
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:
48 explicit QgsMapLayerLoadStyleDialog( QgsMapLayer *layer, QWidget *parent = nullptr );
49
53 QgsMapLayer::StyleCategories styleCategories() const;
54
58 QgsLayerPropertiesDialog::StyleType currentStyleType() const;
59
65 QString fileExtension() const;
66
72 QString filePath() const;
73
77 void initializeLists( const QStringList &ids, const QStringList &names, const QStringList &descriptions, int sectionLimit );
78
82 QString selectedStyleId();
83
84 public slots:
85 void accept() override;
86
87 private slots:
88 void updateLoadButtonState();
89 void onRelatedTableSelectionChanged();
90 void onOthersTableSelectionChanged();
91 void deleteStyleFromDB();
92 void showHelp();
93 void selectAll();
94 void deselectAll();
95 void invertSelection();
96
97 private:
98 void selectionChanged( QTableWidget *styleTable );
99
100 QgsMapLayer *mLayer = nullptr;
102 QString mSelectedStyleId;
103 QString mSelectedStyleName;
104 int mSectionLimit = 0;
105 QPushButton *mDeleteButton = nullptr;
106 QPushButton *mLoadButton = nullptr;
107 QPushButton *mCancelButton = nullptr;
108};
109
110#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:76
QFlags< StyleCategory > StyleCategories