QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
qgsnewgeopackagelayerdialog.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsnewgeopackagelayerdialog.h
3
-------------------
4
begin : April 2016
5
copyright : (C) 2016 by Even Rouault
6
email : even.rouault at spatialys.com
7
***************************************************************************/
8
9
/***************************************************************************
10
* *
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
15
* *
16
***************************************************************************/
17
#ifndef QGSNEWGEOPACKAGELAYERDIALOG_H
18
#define QGSNEWGEOPACKAGELAYERDIALOG_H
19
20
#include "ui_qgsnewgeopackagelayerdialogbase.h"
21
22
#include "qgis_gui.h"
23
#include "
qgis_sip.h
"
24
#include "
qgsguiutils.h
"
25
30
class
GUI_EXPORT
QgsNewGeoPackageLayerDialog
:
public
QDialog,
private
Ui::QgsNewGeoPackageLayerDialogBase
31
{
32
Q_OBJECT
33
34
public
:
36
enum
OverwriteBehavior
37
{
38
Prompt
,
39
Overwrite
,
40
AddNewLayer
,
41
};
42
44
QgsNewGeoPackageLayerDialog
( QWidget *parent
SIP_TRANSFERTHIS
=
nullptr
, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
45
49
void
setCrs(
const
QgsCoordinateReferenceSystem
&crs );
50
54
QString
databasePath
()
const
{
return
mFileName->filePath(); }
55
59
void
setDatabasePath
(
const
QString &path ) { mFileName->setFilePath( path ); }
60
64
void
lockDatabasePath();
65
72
void
setOverwriteBehavior( OverwriteBehavior behavior );
73
80
void
setAddToProject(
bool
addToProject );
81
82
private
slots:
83
void
mAddAttributeButton_clicked();
84
void
mRemoveAttributeButton_clicked();
85
void
mFieldTypeBox_currentIndexChanged(
int
index );
86
void
mGeometryTypeBox_currentIndexChanged(
int
index );
87
void
mTableNameEdit_textChanged(
const
QString &text );
88
void
mTableNameEdit_textEdited(
const
QString &text );
89
void
mLayerIdentifierEdit_textEdited(
const
QString &text );
90
void
fieldNameChanged(
const
QString & );
91
void
selectionChanged();
92
void
checkOk();
93
94
void
showHelp();
95
void
buttonBox_accepted();
96
void
buttonBox_rejected();
97
void
moveFieldsUp();
98
void
moveFieldsDown();
99
100
private
:
101
bool
apply();
102
103
QPushButton *mOkButton =
nullptr
;
104
QString mCrsId;
105
bool
mTableNameEdited =
false
;
106
bool
mLayerIdentifierEdited =
false
;
107
OverwriteBehavior mBehavior = Prompt;
108
bool
mAddToProject =
true
;
109
};
110
111
#endif
// QGSNEWVECTORLAYERDIALOG_H
QgsCoordinateReferenceSystem
Represents a coordinate reference system (CRS).
Definition
qgscoordinatereferencesystem.h:216
QgsNewGeoPackageLayerDialog
Dialog to set up parameters to create a new GeoPackage layer, and on accept() to create it and add it...
Definition
qgsnewgeopackagelayerdialog.h:31
QgsNewGeoPackageLayerDialog::OverwriteBehavior
OverwriteBehavior
Behavior to use when an existing geopackage already exists.
Definition
qgsnewgeopackagelayerdialog.h:37
QgsNewGeoPackageLayerDialog::AddNewLayer
@ AddNewLayer
Keep existing contents and add new layer.
Definition
qgsnewgeopackagelayerdialog.h:40
QgsNewGeoPackageLayerDialog::Overwrite
@ Overwrite
Overwrite whole geopackage.
Definition
qgsnewgeopackagelayerdialog.h:39
QgsNewGeoPackageLayerDialog::Prompt
@ Prompt
Prompt user for action.
Definition
qgsnewgeopackagelayerdialog.h:38
QgsNewGeoPackageLayerDialog::setDatabasePath
void setDatabasePath(const QString &path)
Sets the initial database path.
Definition
qgsnewgeopackagelayerdialog.h:59
QgsNewGeoPackageLayerDialog::QgsNewGeoPackageLayerDialog
QgsNewGeoPackageLayerDialog(QWidget *parent=nullptr, Qt::WindowFlags fl=QgsGuiUtils::ModalDialogFlags)
Constructor.
Definition
qgsnewgeopackagelayerdialog.cpp:55
QgsNewGeoPackageLayerDialog::databasePath
QString databasePath() const
Returns the database path.
Definition
qgsnewgeopackagelayerdialog.h:54
qgis_sip.h
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition
qgis_sip.h:52
qgsguiutils.h
Generated on
for QGIS API Documentation by
1.17.0