QGIS API Documentation 3.30.0-'s-Hertogenbosch (f186b8efe0)
qgsvectorlayersavestyledialog.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsvectorlayersavestyledialog.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 QGSVECTORLAYERSAVESTYLEDIALOG_H
17#define QGSVECTORLAYERSAVESTYLEDIALOG_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_qgsvectorlayersavestyledialog.h"
25#include "qgis_gui.h"
26
27class QgsVectorLayer;
29
38class GUI_EXPORT QgsVectorLayerSaveStyleDialog : public QDialog, private Ui::QgsVectorLayerSaveStyleDialog
39{
40 Q_OBJECT
41
42 public:
43
45 {
46 public:
48 QString name;
49 QString description;
51 };
52
53 explicit QgsVectorLayerSaveStyleDialog( QgsVectorLayer *layer, QWidget *parent = nullptr );
54
55 SaveToDbSettings saveToDbSettings() const;
56 QString outputFilePath() const;
57 QgsMapLayer::StyleCategories styleCategories() const;
58
59 QgsVectorLayerProperties::StyleType currentStyleType() const;
60
61 bool saveOnlyCurrentStyle() const;
62 void setSaveOnlyCurrentStyle( bool saveCurrentStyle );
63
64 const QListWidget *stylesWidget( );
65
70 Qgis::SldExportOptions sldExportOptions( ) const;
71
72 public slots:
73 void accept() override;
74
75 private slots:
76 void updateSaveButtonState();
77 void showHelp();
78 void readUiFileContent( const QString &filePath );
79
80 private:
81 void setupMultipleStyles();
82 void populateStyleComboBox();
83 QgsVectorLayer *mLayer = nullptr;
85 QString mUiFileContent;
86 bool mSaveOnlyCurrentStyle = true;
87};
88
89#endif // QGSVECTORLAYERSAVESTYLE_H
Model for layer style categories.
The QgsVectorLayerSaveStyleDialog class provides the UI to save the current style or multiple styles ...
Represents a vector layer which manages a vector based data sets.