QGIS API Documentation  2.99.0-Master (7d4f81d)
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 #ifndef QGSNEWHTTPCONNECTION_H
18 #define QGSNEWHTTPCONNECTION_H
19 #include "ui_qgsnewhttpconnectionbase.h"
20 #include "qgsguiutils.h"
21 #include "qgscontexthelp.h"
22 #include "qgis_gui.h"
23 
25 
30 class GUI_EXPORT QgsNewHttpConnection : public QDialog, private Ui::QgsNewHttpConnectionBase
31 {
32  Q_OBJECT
33 
34  public:
36  QgsNewHttpConnection( QWidget *parent SIP_TRANSFERTHIS = nullptr, const QString &baseKey = "qgis/connections-wms/", const QString &connName = QString(), Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
37 
38  public slots:
39  // Saves the connection to ~/.qt/qgisrc
40  void accept() override;
41 
42  void on_txtName_textChanged( const QString & );
43 
44  void on_txtUrl_textChanged( const QString & );
45 
46  void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); }
47 
48  private:
49  QString mBaseKey;
50  QString mCredentialsBaseKey;
51  QString mOriginalConnName; //store initial name to delete entry in case of rename
52  QgsAuthConfigSelect *mAuthConfigSelect = nullptr;
53 };
54 
55 #endif // QGSNEWHTTPCONNECTION_H
#define SIP_TRANSFERTHIS
Definition: qgis_sip.h:46
static void run(const QString &context)
Dialog to allow the user to configure and save connection information for an HTTP Server for WMS...
Selector widget for authentication configs.