/usr/include/qgis/qgsauthconfigselect.h is in libqgis-dev 2.18.17+dfsg-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | /***************************************************************************
qgsauthconfigselect.h
---------------------
begin : October 5, 2014
copyright : (C) 2014 by Boundless Spatial, Inc. USA
author : Larry Shaffer
email : lshaffer at boundlessgeo dot com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef QGSAUTHCONFIGSELECT_H
#define QGSAUTHCONFIGSELECT_H
#include <QWidget>
#include "ui_qgsauthconfigselect.h"
#include "qgsauthconfig.h"
/** \ingroup gui
* Selector widget for authentication configs
*/
class GUI_EXPORT QgsAuthConfigSelect : public QWidget, private Ui::QgsAuthConfigSelect
{
Q_OBJECT
public:
/**
* Create a dialog for setting an associated authentication config, either
* from existing configs, or creating/removing them from auth database
* @param parent Parent widget
* @param dataprovider The key of the calling layer provider, if applicable
*/
explicit QgsAuthConfigSelect( QWidget *parent = nullptr, const QString &dataprovider = QString() );
~QgsAuthConfigSelect();
/** Set the authentication config id for the resource */
void setConfigId( const QString& authcfg );
/** Get the authentication config id for the resource */
const QString configId() const { return mAuthCfg; }
/** Set key of layer provider, if applicable */
void setDataProviderKey( const QString &key );
signals:
/** Emitted when authentication config is changed or missing */
void selectedConfigIdChanged( const QString& authcfg );
/** Emitted when authentication config is removed */
void selectedConfigIdRemoved( const QString& authcfg );
public slots:
/** Show a small message bar with a close button */
void showMessage( const QString &msg );
/** Clear and hide small message bar */
void clearMessage();
private slots:
void loadConfig();
void clearConfig();
void validateConfig();
void populateConfigSelector();
void on_cmbConfigSelect_currentIndexChanged( int index );
void on_btnConfigAdd_clicked();
void on_btnConfigEdit_clicked();
void on_btnConfigRemove_clicked();
void on_btnConfigMsgClear_clicked();
private:
void loadAvailableConfigs();
QString mAuthCfg;
QString mDataProvider;
QgsAuthMethodConfigsMap mConfigs;
bool mDisabled;
QVBoxLayout *mAuthNotifyLayout;
QLabel *mAuthNotify;
};
//////////////// Embed in dialog ///////////////////
#include "ui_qgsauthconfiguriedit.h"
class QPushButton;
/** \ingroup gui
* Dialog wrapper of select widget to edit an authcfg in a data source URI
*/
class GUI_EXPORT QgsAuthConfigUriEdit : public QDialog, private Ui::QgsAuthConfigUriEdit
{
Q_OBJECT
public:
/**
* Construct wrapper dialog for select widget to edit an authcfg in a data source URI
* @param parent Parent widget
* @param datauri URI QString with of without an authcfg=ID string
* @param dataprovider The key of the calling layer provider, if applicable
*/
explicit QgsAuthConfigUriEdit( QWidget *parent = nullptr,
const QString &datauri = QString(),
const QString &dataprovider = QString() );
~QgsAuthConfigUriEdit();
/** Set the data source URI to parse */
void setDataSourceUri( const QString &datauri );
/** The returned, possibly edited data source URI */
QString dataSourceUri();
/** Whether a string contains an authcfg ID */
static bool hasConfigID( const QString &txt );
private slots:
void saveChanges();
void resetChanges();
void authCfgUpdated( const QString &authcfg );
void authCfgRemoved( const QString &authcfg );
private:
int authCfgIndex();
QString authCfgFromUri();
void selectAuthCfgInUri();
void updateUriWithAuthCfg();
void removeAuthCfgFromUri();
QString mAuthCfg;
QString mDataUri;
QString mDataUriOrig;
bool mDisabled;
QVBoxLayout *mAuthNotifyLayout;
QLabel *mAuthNotify;
};
#endif // QGSAUTHCONFIGSELECT_H
|