QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
qgsnewhttpconnection.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsnewhttpconnection.cpp - selector for a new HTTP server for WMS, etc.
3
-------------------
4
begin : 3 April 2005
5
copyright : (C) 2005 by Brendan Morley
6
email : morb at ozemail dot com dot au
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
18
#ifndef QGSNEWHTTPCONNECTION_H
19
#define QGSNEWHTTPCONNECTION_H
20
21
#include "ui_qgsnewhttpconnectionbase.h"
22
23
#include "qgis_gui.h"
24
#include "
qgis_sip.h
"
25
#include "
qgsauthorizationsettings.h
"
26
#include "
qgsguiutils.h
"
27
#include "
qgssettingstree.h
"
28
29
#include <QString>
30
31
using namespace
Qt::StringLiterals;
32
33
class
QgsAuthSettingsWidget
;
34
class
QgsSettingsEntryBool
;
35
41
class
GUI_EXPORT
QgsNewHttpConnection
:
public
QDialog,
private
Ui::QgsNewHttpConnectionBase
42
{
43
Q_OBJECT
44
45
public
:
46
#ifndef SIP_RUN
47
static
inline
QgsSettingsTreeNode
*
sTreeHttpConnectionDialog
=
QgsSettingsTree::sTreeConnections
->createChildNode( u
"http-connection-dialog"
_s );
48
49
static
const
QgsSettingsEntryBool
*
settingsIgnoreReportedLayerExtentsDefault
;
50
#endif
51
55
enum
ConnectionType
SIP_ENUM_BASETYPE
( IntFlag )
56
{
57
ConnectionWfs
= 1 << 1,
58
ConnectionWms
= 1 << 2,
59
ConnectionWcs
= 1 << 3,
60
ConnectionOther
= 1 << 4,
61
};
62
Q_DECLARE_FLAGS(
ConnectionTypes
,
ConnectionType
)
63
64
67
enum
Flag
SIP_ENUM_BASETYPE
( IntFlag )
68
{
69
FlagShowTestConnection
= 1 << 1,
70
FlagHideAuthenticationGroup
= 1 << 2,
71
FlagShowHttpSettings
= 1 << 3,
72
};
73
Q_DECLARE_FLAGS(
Flags
,
Flag
)
74
75
84
QgsNewHttpConnection
(
85
QWidget *parent
SIP_TRANSFERTHIS
=
nullptr
,
86
QgsNewHttpConnection::ConnectionTypes
types =
ConnectionWms
,
87
const
QString &serviceName
SIP_PYARGRENAME
( settingsKey ) =
"WMS"
,
// TODO QGIS 5 remove arg rename
88
const
QString &connectionName = QString(),
89
QgsNewHttpConnection::Flags
flags =
QgsNewHttpConnection::Flags
(),
90
Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags
91
);
92
96
QString
name
()
const
;
97
101
QString
url
()
const
;
102
107
QString
originalConnectionName
()
const
;
108
109
public
slots:
110
111
void
accept
()
override
;
112
113
private
slots:
114
115
void
nameChanged(
const
QString & );
116
void
urlChanged(
const
QString & );
117
void
updateOkButtonState();
118
void
wfsVersionCurrentIndexChanged(
int
index );
119
void
wfsFeaturePagingCurrentIndexChanged(
int
index );
120
void
featureFormatCurrentIndexChanged(
int
index );
121
122
protected
:
124
enum
WfsVersionIndex
125
{
126
WFS_VERSION_MAX
= 0,
127
WFS_VERSION_1_0
= 1,
128
WFS_VERSION_1_1
= 2,
129
WFS_VERSION_2_0
= 3,
130
WFS_VERSION_API_FEATURES_1_0
= 4,
131
};
132
133
#ifndef SIP_RUN
135
enum class
WfsFeaturePagingIndex
136
{
137
DEFAULT = 0,
138
ENABLED = 1,
139
DISABLED = 2,
140
};
141
#endif
142
147
virtual
bool
validate();
148
152
QPushButton *testConnectButton();
153
158
QPushButton *wmsFormatDetectButton()
SIP_SKIP
;
159
165
QgsAuthSettingsWidget
*authSettingsWidget()
SIP_SKIP
;
166
172
QgsAuthorizationSettings
authorizationSettings() const
SIP_SKIP
;
173
178
bool
ignoreAxisOrientation() const;
179
185
QComboBox *wmsPreferredFormatCombo() const
SIP_SKIP
;
186
191
bool
invertAxisOrientation() const;
192
197
QPushButton *wfsVersionDetectButton()
SIP_SKIP
;
198
203
QComboBox *wfsVersionComboBox()
SIP_SKIP
;
204
209
QPushButton *featureFormatDetectButton()
SIP_SKIP
;
210
215
QComboBox *featureFormatComboBox()
SIP_SKIP
;
216
221
QComboBox *wfsPagingComboBox()
SIP_SKIP
;
222
227
QCheckBox *wfsUseGml2EncodingForTransactions()
SIP_SKIP
;
228
233
QLineEdit *wfsPageSizeLineEdit()
SIP_SKIP
;
234
240
Qgis
::HttpMethod preferredHttpMethod() const;
241
246
QUrl urlTrimmed() const
SIP_SKIP
;
247
252
virtual QString wfsSettingsKey( const QString &base, const QString &connectionName ) const;
253
258
virtual QString wmsSettingsKey( const QString &base, const QString &connectionName ) const;
259
264
void
updateServiceSpecificSettings();
265
269
void
showEvent( QShowEvent *event ) override;
270
271
private:
272
ConnectionTypes mTypes = ConnectionWms;
273
QString mServiceName;
274
QString mOriginalConnName;
//store initial name to delete entry in case of rename
275
void
showHelp();
276
};
277
278
Q_DECLARE_OPERATORS_FOR_FLAGS
(
QgsNewHttpConnection
::ConnectionTypes )
279
Q_DECLARE_OPERATORS_FOR_FLAGS
(
QgsNewHttpConnection
::Flags )
280
281
// clazy:excludeall=qstring-allocations
282
283
#endif
// QGSNEWHTTPCONNECTION_H
Qgis
Provides global constants and enumerations for use throughout the application.
Definition
qgis.h:62
QgsAuthSettingsWidget
Widget for entering authentication credentials both in the form username/password and by using QGIS A...
Definition
qgsauthsettingswidget.h:36
QgsAuthorizationSettings
Utility class that contains authorization information.
Definition
qgsauthorizationsettings.h:36
QgsNewHttpConnection
Dialog to allow the user to configure and save connection information for an HTTP Server for WMS,...
Definition
qgsnewhttpconnection.h:42
QgsNewHttpConnection::sTreeHttpConnectionDialog
static QgsSettingsTreeNode * sTreeHttpConnectionDialog
Definition
qgsnewhttpconnection.h:47
QgsNewHttpConnection::Flags
QFlags< Flag > Flags
Definition
qgsnewhttpconnection.h:73
QgsNewHttpConnection::QgsNewHttpConnection
QgsNewHttpConnection(QWidget *parent=nullptr, QgsNewHttpConnection::ConnectionTypes types=ConnectionWms, const QString &serviceName="WMS", const QString &connectionName=QString(), QgsNewHttpConnection::Flags flags=QgsNewHttpConnection::Flags(), Qt::WindowFlags fl=QgsGuiUtils::ModalDialogFlags)
Constructor for QgsNewHttpConnection.
Definition
qgsnewhttpconnection.cpp:42
QgsNewHttpConnection::name
QString name() const
Returns the current connection name.
Definition
qgsnewhttpconnection.cpp:243
QgsNewHttpConnection::Flag
Flag
Flags controlling dialog behavior.
Definition
qgsnewhttpconnection.h:68
QgsNewHttpConnection::FlagShowHttpSettings
@ FlagShowHttpSettings
Display the 'http' group.
Definition
qgsnewhttpconnection.h:71
QgsNewHttpConnection::FlagHideAuthenticationGroup
@ FlagHideAuthenticationGroup
Hide the Authentication group.
Definition
qgsnewhttpconnection.h:70
QgsNewHttpConnection::FlagShowTestConnection
@ FlagShowTestConnection
Display the 'test connection' button.
Definition
qgsnewhttpconnection.h:69
QgsNewHttpConnection::url
QString url() const
Returns the current connection url.
Definition
qgsnewhttpconnection.cpp:248
QgsNewHttpConnection::originalConnectionName
QString originalConnectionName() const
Returns the original connection name (might be empty).
Definition
qgsnewhttpconnection.cpp:457
QgsNewHttpConnection::WfsVersionIndex
WfsVersionIndex
Index of wfsVersionComboBox.
Definition
qgsnewhttpconnection.h:125
QgsNewHttpConnection::WFS_VERSION_MAX
@ WFS_VERSION_MAX
Definition
qgsnewhttpconnection.h:126
QgsNewHttpConnection::WFS_VERSION_2_0
@ WFS_VERSION_2_0
Definition
qgsnewhttpconnection.h:129
QgsNewHttpConnection::WFS_VERSION_1_1
@ WFS_VERSION_1_1
Definition
qgsnewhttpconnection.h:128
QgsNewHttpConnection::WFS_VERSION_1_0
@ WFS_VERSION_1_0
Definition
qgsnewhttpconnection.h:127
QgsNewHttpConnection::WFS_VERSION_API_FEATURES_1_0
@ WFS_VERSION_API_FEATURES_1_0
Definition
qgsnewhttpconnection.h:130
QgsNewHttpConnection::settingsIgnoreReportedLayerExtentsDefault
static const QgsSettingsEntryBool * settingsIgnoreReportedLayerExtentsDefault
Definition
qgsnewhttpconnection.h:49
QgsNewHttpConnection::WfsFeaturePagingIndex
WfsFeaturePagingIndex
Index of wfsFeaturePaging.
Definition
qgsnewhttpconnection.h:136
QgsNewHttpConnection::accept
void accept() override
Definition
qgsnewhttpconnection.cpp:489
QgsNewHttpConnection::ConnectionType
ConnectionType
Available connection types for configuring in the dialog.
Definition
qgsnewhttpconnection.h:56
QgsNewHttpConnection::ConnectionWms
@ ConnectionWms
WMS connection.
Definition
qgsnewhttpconnection.h:58
QgsNewHttpConnection::ConnectionWfs
@ ConnectionWfs
WFS connection.
Definition
qgsnewhttpconnection.h:57
QgsNewHttpConnection::ConnectionWcs
@ ConnectionWcs
WCS connection.
Definition
qgsnewhttpconnection.h:59
QgsNewHttpConnection::ConnectionOther
@ ConnectionOther
Other connection type.
Definition
qgsnewhttpconnection.h:60
QgsNewHttpConnection::ConnectionTypes
QFlags< ConnectionType > ConnectionTypes
Definition
qgsnewhttpconnection.h:62
QgsSettingsEntryBool
A boolean settings entry.
Definition
qgssettingsentryimpl.h:298
QgsSettingsTreeNode
A tree node for the settings tree to help organizing and introspecting the tree.
Definition
qgssettingstreenode.h:48
QgsSettingsTree::sTreeConnections
static QgsSettingsTreeNode * sTreeConnections
Definition
qgssettingstree.h:50
qgis_sip.h
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition
qgis_sip.h:52
SIP_ENUM_BASETYPE
#define SIP_ENUM_BASETYPE(type)
Definition
qgis_sip.h:277
SIP_SKIP
#define SIP_SKIP
Definition
qgis_sip.h:138
SIP_PYARGRENAME
#define SIP_PYARGRENAME(pyname)
Definition
qgis_sip.h:173
qgsauthorizationsettings.h
Q_DECLARE_OPERATORS_FOR_FLAGS
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsTimeZoneComboBox::StandardItems)
qgsguiutils.h
qgssettingstree.h
Generated on
for QGIS API Documentation by
1.17.0