QGIS API Documentation 3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
qgsmaplayersavestyledialog.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsmaplayersavestyledialog.h
3 --------------------------------------
4 Date : September 2018
5 Copyright : (C) 2018 by Denis Rouzaud
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 QGSMAPLAYERSAVESTYLEDIALOG_H
17#define QGSMAPLAYERSAVESTYLEDIALOG_H
18
19// We don't want to expose this in the public API
20#define SIP_NO_FILE
21
22#include <QDialog>
23#include "ui_qgsmaplayersavestyledialog.h"
24#include "qgsmaplayer.h"
26#include "qgis_gui.h"
27
29
40class GUI_EXPORT QgsMapLayerSaveStyleDialog : public QDialog, private Ui::QgsMapLayerSaveStyleDialog
41{
42 Q_OBJECT
43
44 public:
46 {
47 public:
49 QString name;
50 QString description;
52 };
53
57 explicit QgsMapLayerSaveStyleDialog( QgsMapLayer *layer, QWidget *parent = nullptr );
58
62 SaveToDbSettings saveToDbSettings() const;
63
67 QString outputFilePath() const;
68
72 QgsMapLayer::StyleCategories styleCategories() const;
73
77 QgsLayerPropertiesDialog::StyleType currentStyleType() const;
78
84 bool saveOnlyCurrentStyle() const;
85
91 void setSaveOnlyCurrentStyle( bool saveCurrentStyle );
92
96 const QListWidget *stylesWidget();
97
102 Qgis::SldExportOptions sldExportOptions() const;
103
104 public slots:
105 void accept() override;
106
107 private slots:
108 void updateSaveButtonState();
109 void showHelp();
110 void readUiFileContent( const QString &filePath );
111 void selectAll();
112 void deselectAll();
113 void invertSelection();
114
115 private:
116 void setupMultipleStyles();
117 void populateStyleComboBox();
118 QgsMapLayer *mLayer = nullptr;
120 QString mUiFileContent;
121 bool mSaveOnlyCurrentStyle = true;
122};
123
124#endif // QGSMAPLAYERSAVESTYLEDIALOG_H
QFlags< SldExportOption > SldExportOptions
Definition qgis.h:666
The QgsMapLayerSaveStyleDialog class provides the UI to save the current style or multiple styles int...
Base class for all map layer types.
Definition qgsmaplayer.h:76
QFlags< StyleCategory > StyleCategories