QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
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
6
Email : denis@opengis.ch
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
21
#include "ui_qgsmaplayersavestyledialog.h"
22
23
#include "qgis_gui.h"
24
#include "
qgslayerpropertiesdialog.h
"
25
#include "
qgsmaplayer.h
"
26
27
#include <QDialog>
28
29
#define SIP_NO_FILE
30
31
class
QgsMapLayerStyleCategoriesModel
;
32
46
class
GUI_EXPORT
QgsMapLayerSaveStyleDialog
:
public
QDialog,
private
Ui::QgsMapLayerSaveStyleDialog
47
{
48
Q_OBJECT
49
50
public
:
51
struct
SaveToDbSettings
52
{
53
public
:
54
QString
uiFileContent
;
55
QString
name
;
56
QString
description
;
57
bool
isDefault
;
58
};
59
63
explicit
QgsMapLayerSaveStyleDialog
(
QgsMapLayer
*layer, QWidget *parent =
nullptr
);
64
68
SaveToDbSettings
saveToDbSettings
()
const
;
69
73
QString
outputFilePath
()
const
;
74
78
QgsMapLayer::StyleCategories
styleCategories
()
const
;
79
83
QgsLayerPropertiesDialog::StyleType
currentStyleType
()
const
;
84
90
bool
saveOnlyCurrentStyle
()
const
;
91
97
void
setSaveOnlyCurrentStyle
(
bool
saveCurrentStyle );
98
102
const
QListWidget *
stylesWidget
();
103
108
Qgis::SldExportOptions
sldExportOptions
()
const
;
109
110
public
slots:
111
void
accept
()
override
;
112
113
private
slots:
114
void
updateSaveButtonState();
115
void
showHelp();
116
void
readUiFileContent(
const
QString &filePath );
117
void
selectAll();
118
void
deselectAll();
119
void
invertSelection();
120
121
private
:
122
void
setupMultipleStyles();
123
void
populateStyleComboBox();
124
QgsMapLayer
*mLayer =
nullptr
;
125
QgsMapLayerStyleCategoriesModel
*mModel;
126
QString mUiFileContent;
127
bool
mSaveOnlyCurrentStyle =
true
;
128
};
129
130
#endif
// QGSMAPLAYERSAVESTYLEDIALOG_H
Qgis::SldExportOptions
QFlags< SldExportOption > SldExportOptions
Definition
qgis.h:763
QgsLayerPropertiesDialog::StyleType
StyleType
Style storage type.
Definition
qgslayerpropertiesdialog.h:50
QgsMapLayerSaveStyleDialog::outputFilePath
QString outputFilePath() const
Returns the selected file output path.
Definition
qgsmaplayersavestyledialog.cpp:182
QgsMapLayerSaveStyleDialog::sldExportOptions
Qgis::SldExportOptions sldExportOptions() const
Returns the SLD export options.
Definition
qgsmaplayersavestyledialog.cpp:284
QgsMapLayerSaveStyleDialog::saveToDbSettings
SaveToDbSettings saveToDbSettings() const
Returns the database settings for saving the style in the DB.
Definition
qgsmaplayersavestyledialog.cpp:172
QgsMapLayerSaveStyleDialog::setSaveOnlyCurrentStyle
void setSaveOnlyCurrentStyle(bool saveCurrentStyle)
Sets whether the user only allowed to save the current style.
Definition
qgsmaplayersavestyledialog.cpp:270
QgsMapLayerSaveStyleDialog::saveOnlyCurrentStyle
bool saveOnlyCurrentStyle() const
Returns whether the user only allowed to save the current style.
Definition
qgsmaplayersavestyledialog.cpp:265
QgsMapLayerSaveStyleDialog::styleCategories
QgsMapLayer::StyleCategories styleCategories() const
Returns the available style categories.
Definition
qgsmaplayersavestyledialog.cpp:187
QgsMapLayerSaveStyleDialog::currentStyleType
QgsLayerPropertiesDialog::StyleType currentStyleType() const
Returns the selected style storage type.
Definition
qgsmaplayersavestyledialog.cpp:192
QgsMapLayerSaveStyleDialog::QgsMapLayerSaveStyleDialog
QgsMapLayerSaveStyleDialog(QgsMapLayer *layer, QWidget *parent=nullptr)
Constructor.
Definition
qgsmaplayersavestyledialog.cpp:34
QgsMapLayerSaveStyleDialog::accept
void accept() override
Definition
qgsmaplayersavestyledialog.cpp:139
QgsMapLayerSaveStyleDialog::stylesWidget
const QListWidget * stylesWidget()
Returns the styles list widget.
Definition
qgsmaplayersavestyledialog.cpp:279
QgsMapLayerStyleCategoriesModel
Model for layer style categories.
Definition
qgsmaplayerstylecategoriesmodel.h:33
QgsMapLayer
Base class for all map layer types.
Definition
qgsmaplayer.h:83
QgsMapLayer::StyleCategories
QFlags< StyleCategory > StyleCategories
Definition
qgsmaplayer.h:204
qgslayerpropertiesdialog.h
qgsmaplayer.h
QgsMapLayerSaveStyleDialog::SaveToDbSettings
Definition
qgsmaplayersavestyledialog.h:52
QgsMapLayerSaveStyleDialog::SaveToDbSettings::description
QString description
Definition
qgsmaplayersavestyledialog.h:56
QgsMapLayerSaveStyleDialog::SaveToDbSettings::name
QString name
Definition
qgsmaplayersavestyledialog.h:55
QgsMapLayerSaveStyleDialog::SaveToDbSettings::isDefault
bool isDefault
Definition
qgsmaplayersavestyledialog.h:57
QgsMapLayerSaveStyleDialog::SaveToDbSettings::uiFileContent
QString uiFileContent
Definition
qgsmaplayersavestyledialog.h:54
Generated on
for QGIS API Documentation by
1.17.0