QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
symbology
qgsstyleexportimportdialog.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsstyleexportimportdialog.h
3
---------------------
4
begin : Jan 2011
5
copyright : (C) 2011 by Alexander Bruy
6
email : alexander dot bruy at gmail dot com
7
8
***************************************************************************
9
* *
10
* This program is free software; you can redistribute it and/or modify *
11
* it under the terms of the GNU General Public License as published by *
12
* the Free Software Foundation; either version 2 of the License, or *
13
* (at your option) any later version. *
14
* *
15
***************************************************************************/
16
17
#ifndef QGSSTYLEV2EXPORTIMPORTDIALOG_H
18
#define QGSSTYLEV2EXPORTIMPORTDIALOG_H
19
20
#include "ui_qgsstyleexportimportdialogbase.h"
21
22
#include <memory>
23
24
#include "qgis_gui.h"
25
#include "
qgis_sip.h
"
26
#include "
qgshelp.h
"
27
28
#include <QDialog>
29
#include <QUrl>
30
31
class
QgsStyle
;
32
class
QgsStyleGroupSelectionDialog
;
33
class
QgsTemporaryCursorOverride
;
34
class
QgsStyleProxyModel
;
35
class
QTemporaryFile;
36
42
class
GUI_EXPORT
QgsStyleExportImportDialog
:
public
QDialog,
private
Ui::QgsStyleExportImportDialogBase
43
{
44
Q_OBJECT
45
46
public
:
48
enum
Mode
49
{
50
Export
,
51
Import
,
52
};
53
60
QgsStyleExportImportDialog
(
QgsStyle
*style, QWidget *parent
SIP_TRANSFERTHIS
=
nullptr
, Mode mode = Export );
61
~QgsStyleExportImportDialog
()
override
;
62
68
void
setImportFilePath(
const
QString &path );
69
74
void
selectSymbols(
const
QStringList &symbolNames );
75
80
void
deselectSymbols(
const
QStringList &symbolNames );
81
82
public
slots:
83
void
doExportImport();
84
88
void
selectByGroup();
89
93
void
selectAll();
94
98
void
clearSelection();
99
104
void
selectFavorites();
105
110
void
deselectFavorites();
111
116
void
selectTag(
const
QString &tagName );
117
122
void
deselectTag(
const
QString &tagName );
123
128
void
selectSmartgroup(
const
QString &groupName );
129
134
void
deselectSmartgroup(
const
QString &groupName );
135
136
void
importTypeChanged(
int
);
137
138
private
slots:
139
void
selectionChanged(
const
QItemSelection &selected,
const
QItemSelection &deselected );
140
void
showHelp();
141
142
void
fetch();
143
void
importFileChanged(
const
QString &path );
144
145
private
:
146
enum
ImportSource
147
{
148
File,
149
//Official,
150
Url,
151
};
152
153
void
downloadStyleXml(
const
QUrl &url );
154
bool
populateStyles();
155
void
moveStyles( QModelIndexList *selection, QgsStyle *src, QgsStyle *dst );
156
157
QgsStyleGroupSelectionDialog *mGroupSelectionDlg =
nullptr
;
158
std::unique_ptr<QTemporaryFile> mTempFile;
159
160
QString mFileName;
161
Mode mDialogMode;
162
163
QgsStyleProxyModel *mModel =
nullptr
;
164
165
QgsStyle *mStyle =
nullptr
;
166
std::unique_ptr<QgsStyle> mTempStyle;
167
std::unique_ptr<QgsTemporaryCursorOverride> mCursorOverride;
168
};
169
170
#endif
// QGSSTYLEV2EXPORTIMPORTDIALOG_H
QgsStyleExportImportDialog
A dialog allowing importing and exporting of entities from a QgsStyle.
Definition
qgsstyleexportimportdialog.h:43
QgsStyleExportImportDialog::Mode
Mode
Dialog modes.
Definition
qgsstyleexportimportdialog.h:49
QgsStyleExportImportDialog::Export
@ Export
Export existing symbols mode.
Definition
qgsstyleexportimportdialog.h:50
QgsStyleExportImportDialog::Import
@ Import
Import xml file mode.
Definition
qgsstyleexportimportdialog.h:51
QgsStyleExportImportDialog::QgsStyleExportImportDialog
QgsStyleExportImportDialog(QgsStyle *style, QWidget *parent=nullptr, Mode mode=Export)
Constructor for QgsStyleExportImportDialog, with the specified parent widget.
Definition
qgsstyleexportimportdialog.cpp:47
QgsStyleGroupSelectionDialog
A dialog which presents available groups from a QgsStyle.
Definition
qgsstylegroupselectiondialog.h:35
QgsStyleProxyModel
A QSortFilterProxyModel subclass for showing filtered symbol and color ramps entries from a QgsStyle ...
Definition
qgsstylemodel.h:264
QgsStyle
A database of saved style entities, including symbols, color ramps, text formats and others.
Definition
qgsstyle.h:91
QgsTemporaryCursorOverride
Temporarily sets a cursor override for the QApplication for the lifetime of the object.
Definition
qgsguiutils.h:300
qgis_sip.h
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition
qgis_sip.h:52
qgshelp.h
Generated on
for QGIS API Documentation by
1.17.0