QGIS API Documentation
2.18.21-Las Palmas (9fba24a)
src
gui
qgssublayersdialog.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgssublayersdialog.h - dialog for selecting sublayers
3
---------------------
4
begin : January 2009
5
copyright : (C) 2009 by Florian El Ahdab
6
email : felahdab at gmail dot com
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 QGSSUBLAYERSDIALOG_H
17
#define QGSSUBLAYERSDIALOG_H
18
19
#include <QDialog>
20
#include <ui_qgssublayersdialogbase.h>
21
#include "
qgscontexthelp.h
"
22
26
class
GUI_EXPORT
QgsSublayersDialog
:
public
QDialog
,
private
Ui::QgsSublayersDialogBase
27
{
28
Q_OBJECT
29
public
:
30
31
enum
ProviderType
32
{
33
Ogr
,
34
Gdal
,
35
Vsifile
36
};
37
40
typedef
struct
LayerDefinition
41
{
42
LayerDefinition
() : layerId( -1 ), count( -1 ) {}
43
44
int
layerId
;
45
QString
layerName
;
46
int
count
;
47
QString
type
;
48
}
LayerDefinition
;
49
52
typedef
QList<LayerDefinition>
LayerDefinitionList
;
53
54
QgsSublayersDialog
(
ProviderType
providerType,
const
QString
& name,
QWidget
* parent =
nullptr
,
const
Qt::WindowFlags
& fl =
nullptr
);
55
~
QgsSublayersDialog
();
56
59
void
populateLayerTable(
const
LayerDefinitionList& list );
60
63
LayerDefinitionList selection();
64
66
Q_DECL_DEPRECATED
void
populateLayerTable(
const
QStringList
& theList,
const
QString
& delim =
":"
);
68
Q_DECL_DEPRECATED
QStringList
selectionNames();
70
Q_DECL_DEPRECATED
QList<int>
selectionIndexes();
71
72
public
slots:
73
void
on_buttonBox_helpRequested
() {
QgsContextHelp::run
( metaObject()->className() ); }
74
int
exec();
75
76
protected
:
77
QString
mName
;
78
QStringList
mSelectedSubLayers
;
79
bool
mShowCount
;
80
bool
mShowType
;
81
};
82
83
#endif
QgsSublayersDialog::LayerDefinition::layerName
QString layerName
name of the layer (not necessarily unique)
Definition:
qgssublayersdialog.h:45
QWidget
QgsSublayersDialog::LayerDefinition::layerId
int layerId
identifier of the layer (one unique layer id may have multiple types though)
Definition:
qgssublayersdialog.h:44
QgsSublayersDialog::ProviderType
ProviderType
Definition:
qgssublayersdialog.h:31
qgscontexthelp.h
QgsSublayersDialog::mName
QString mName
Definition:
qgssublayersdialog.h:77
QgsSublayersDialog::LayerDefinitionList
QList< LayerDefinition > LayerDefinitionList
List of layer definitions for the purpose of this dialog.
Definition:
qgssublayersdialog.h:52
QgsSublayersDialog::mSelectedSubLayers
QStringList mSelectedSubLayers
Definition:
qgssublayersdialog.h:78
QgsSublayersDialog::mShowType
bool mShowType
whether to show type in the table
Definition:
qgssublayersdialog.h:80
QgsSublayersDialog::Ogr
Definition:
qgssublayersdialog.h:33
QgsSublayersDialog::mShowCount
bool mShowCount
whether to show number of features in the table
Definition:
qgssublayersdialog.h:79
QgsSublayersDialog::Gdal
Definition:
qgssublayersdialog.h:34
QgsContextHelp::run
static void run(const QString &context)
Definition:
qgscontexthelp.cpp:31
QgsSublayersDialog::LayerDefinition::count
int count
number of features (might be unused)
Definition:
qgssublayersdialog.h:46
QgsSublayersDialog
Definition:
qgssublayersdialog.h:26
QString
QList
QStringList
QgsSublayersDialog::LayerDefinition::type
QString type
extra type depending on the use (e.g. geometry type for vector sublayers)
Definition:
qgssublayersdialog.h:47
QDialog
Qt::WindowFlags
typedef WindowFlags
QgsSublayersDialog::on_buttonBox_helpRequested
void on_buttonBox_helpRequested()
Definition:
qgssublayersdialog.h:73
QgsSublayersDialog::LayerDefinition
A structure that defines layers for the purpose of this dialog.
Definition:
qgssublayersdialog.h:40
QgsSublayersDialog::LayerDefinition::LayerDefinition
LayerDefinition()
Definition:
qgssublayersdialog.h:42
Generated on Sun Jun 24 2018 11:42:48 for QGIS API Documentation by
1.8.13