QGIS API Documentation
3.41.0-Master (45a0abf3bec)
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 :
[email protected]
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
"
25
#include "
qgslayerpropertiesdialog.h
"
26
#include "qgis_gui.h"
27
28
class
QgsMapLayerStyleCategoriesModel
;
29
40
class
GUI_EXPORT
QgsMapLayerSaveStyleDialog
:
public
QDialog,
private
Ui::QgsMapLayerSaveStyleDialog
41
{
42
Q_OBJECT
43
44
public
:
45
46
struct
SaveToDbSettings
47
{
48
public
:
49
QString
uiFileContent
;
50
QString
name
;
51
QString
description
;
52
bool
isDefault
;
53
};
54
58
explicit
QgsMapLayerSaveStyleDialog
(
QgsMapLayer
*layer, QWidget *parent =
nullptr
);
59
63
SaveToDbSettings
saveToDbSettings()
const
;
64
68
QString outputFilePath()
const
;
69
73
QgsMapLayer::StyleCategories
styleCategories()
const
;
74
78
QgsLayerPropertiesDialog::StyleType
currentStyleType()
const
;
79
85
bool
saveOnlyCurrentStyle()
const
;
86
92
void
setSaveOnlyCurrentStyle(
bool
saveCurrentStyle );
93
97
const
QListWidget *stylesWidget( );
98
103
Qgis::SldExportOptions
sldExportOptions( )
const
;
104
105
public
slots:
106
void
accept()
override
;
107
108
private
slots:
109
void
updateSaveButtonState();
110
void
showHelp();
111
void
readUiFileContent(
const
QString &filePath );
112
void
selectAll();
113
void
deselectAll();
114
void
invertSelection();
115
116
private
:
117
void
setupMultipleStyles();
118
void
populateStyleComboBox();
119
QgsMapLayer
*mLayer =
nullptr
;
120
QgsMapLayerStyleCategoriesModel
*mModel;
121
QString mUiFileContent;
122
bool
mSaveOnlyCurrentStyle =
true
;
123
};
124
125
#endif
// QGSMAPLAYERSAVESTYLEDIALOG_H
Qgis::SldExportOptions
QFlags< SldExportOption > SldExportOptions
Definition
qgis.h:666
QgsLayerPropertiesDialog::StyleType
StyleType
Style storage type.
Definition
qgslayerpropertiesdialog.h:51
QgsMapLayerSaveStyleDialog
The QgsMapLayerSaveStyleDialog class provides the UI to save the current style or multiple styles int...
Definition
qgsmaplayersavestyledialog.h:41
QgsMapLayerStyleCategoriesModel
Model for layer style categories.
Definition
qgsmaplayerstylecategoriesmodel.h:33
QgsMapLayer
Base class for all map layer types.
Definition
qgsmaplayer.h:76
QgsMapLayer::StyleCategories
QFlags< StyleCategory > StyleCategories
Definition
qgsmaplayer.h:192
qgslayerpropertiesdialog.h
qgsmaplayer.h
QgsMapLayerSaveStyleDialog::SaveToDbSettings
Definition
qgsmaplayersavestyledialog.h:47
QgsMapLayerSaveStyleDialog::SaveToDbSettings::description
QString description
Definition
qgsmaplayersavestyledialog.h:51
QgsMapLayerSaveStyleDialog::SaveToDbSettings::name
QString name
Definition
qgsmaplayersavestyledialog.h:50
QgsMapLayerSaveStyleDialog::SaveToDbSettings::isDefault
bool isDefault
Definition
qgsmaplayersavestyledialog.h:52
QgsMapLayerSaveStyleDialog::SaveToDbSettings::uiFileContent
QString uiFileContent
Definition
qgsmaplayersavestyledialog.h:49
Generated on Tue Nov 19 2024 18:20:01 for QGIS API Documentation by
1.9.8