QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
qgsmaplayerloadstyledialog.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsmaplayerloadstyledialog.h
3
---------------------
4
begin : April 2013
5
copyright : (C) 2013 by Emilio Loi
6
email : loi at faunalia dot it
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 QGSMAPLAYERLOADSTYLEDIALOG_H
17
#define QGSMAPLAYERLOADSTYLEDIALOG_H
18
19
// We don't want to expose this in the public API
20
21
#include "ui_qgsvectorlayerloadstyledialog.h"
22
23
#include "qgis_gui.h"
24
#include "
qgsmaplayer.h
"
25
#include "
qgsvectorlayerproperties.h
"
26
27
#define SIP_NO_FILE
28
29
class
QgsMapLayerStyleCategoriesModel
;
30
43
class
GUI_EXPORT
QgsMapLayerLoadStyleDialog
:
public
QDialog,
private
Ui::QgsVectorLayerLoadStyleDialog
44
{
45
Q_OBJECT
46
public
:
50
explicit
QgsMapLayerLoadStyleDialog
(
QgsMapLayer
*layer, QWidget *parent =
nullptr
);
51
55
QgsMapLayer::StyleCategories
styleCategories
()
const
;
56
60
QgsLayerPropertiesDialog::StyleType
currentStyleType
()
const
;
61
67
QString
fileExtension
()
const
;
68
74
QString
filePath
()
const
;
75
79
void
initializeLists
(
const
QStringList &ids,
const
QStringList &names,
const
QStringList &descriptions,
int
sectionLimit );
80
84
QString
selectedStyleId
();
85
91
void
allowLoadingOnlyFromFiles
();
92
93
public
slots:
94
void
accept
()
override
;
95
96
private
slots:
97
void
updateLoadButtonState();
98
void
onRelatedTableSelectionChanged();
99
void
onOthersTableSelectionChanged();
100
void
deleteStyleFromDB();
101
void
showHelp();
102
void
selectAll();
103
void
deselectAll();
104
void
invertSelection();
105
106
private
:
107
void
selectionChanged( QTableWidget *styleTable );
108
109
QgsMapLayer
*mLayer =
nullptr
;
110
QgsMapLayerStyleCategoriesModel
*mModel;
111
QString mSelectedStyleId;
112
QString mSelectedStyleName;
113
int
mSectionLimit = 0;
114
QPushButton *mDeleteButton =
nullptr
;
115
QPushButton *mLoadButton =
nullptr
;
116
QPushButton *mCancelButton =
nullptr
;
117
};
118
119
#endif
//QGSMAPLAYERLOADSTYLEDIALOG_H
QgsLayerPropertiesDialog::StyleType
StyleType
Style storage type.
Definition
qgslayerpropertiesdialog.h:50
QgsMapLayerLoadStyleDialog::styleCategories
QgsMapLayer::StyleCategories styleCategories() const
Returns the list of selected style categories the user has opted to load.
Definition
qgsmaplayerloadstyledialog.cpp:178
QgsMapLayerLoadStyleDialog::accept
void accept() override
Definition
qgsmaplayerloadstyledialog.cpp:304
QgsMapLayerLoadStyleDialog::initializeLists
void initializeLists(const QStringList &ids, const QStringList &names, const QStringList &descriptions, int sectionLimit)
Initialize list of database stored styles.
Definition
qgsmaplayerloadstyledialog.cpp:205
QgsMapLayerLoadStyleDialog::selectedStyleId
QString selectedStyleId()
Returns the ID of the selected database stored style.
Definition
qgsmaplayerloadstyledialog.cpp:245
QgsMapLayerLoadStyleDialog::QgsMapLayerLoadStyleDialog
QgsMapLayerLoadStyleDialog(QgsMapLayer *layer, QWidget *parent=nullptr)
Constructor for QgsMapLayerLoadStyleDialog, associated with the specified map layer.
Definition
qgsmaplayerloadstyledialog.cpp:34
QgsMapLayerLoadStyleDialog::filePath
QString filePath() const
Returns the full path to the selected layer style source file.
Definition
qgsmaplayerloadstyledialog.cpp:200
QgsMapLayerLoadStyleDialog::fileExtension
QString fileExtension() const
Returns the file extension for the selected layer style source file.
Definition
qgsmaplayerloadstyledialog.cpp:195
QgsMapLayerLoadStyleDialog::allowLoadingOnlyFromFiles
void allowLoadingOnlyFromFiles()
Do not allow loading styles from databases, only from files.
Definition
qgsmaplayerloadstyledialog.cpp:366
QgsMapLayerLoadStyleDialog::currentStyleType
QgsLayerPropertiesDialog::StyleType currentStyleType() const
Returns the selected style type.
Definition
qgsmaplayerloadstyledialog.cpp:183
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
qgsmaplayer.h
qgsvectorlayerproperties.h
Generated on
for QGIS API Documentation by
1.17.0