QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
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
66 public slots:
67 void accept() override;
68
69 private slots:
70 void updateSaveButtonState();
71 void showHelp();
72 void readUiFileContent( const QString &filePath );
73
74 private:
75 void setupMultipleStyles();
76 void populateStyleComboBox();
77 QgsVectorLayer *mLayer = nullptr;
79 QString mUiFileContent;
80 bool mSaveOnlyCurrentStyle = true;
81};
82
83#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.