sipify QgsCredentials dialog

This commit is contained in:
Alexander Bruy 2017-04-14 08:43:11 +03:00
parent ec5a8911a8
commit 6bcc066d6f
3 changed files with 41 additions and 12 deletions

View File

@ -349,7 +349,6 @@ gui/qgscomposerruler.sip
gui/qgscomposerview.sip
gui/qgscompoundcolorwidget.sip
gui/qgsconfigureshortcutsdialog.sip
gui/qgscredentialdialog.sip
gui/qgscustomdrophandler.sip
gui/qgscurveeditorwidget.sip
gui/qgsdetaileditemdata.sip

View File

@ -1,18 +1,45 @@
/** \ingroup gui
* A generic dialog for requesting credentials
*/
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgscredentialdialog.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsCredentialDialog : QDialog, QgsCredentials
{
%TypeHeaderCode
#include <qgscredentialdialog.h>
%Docstring
A generic dialog for requesting credentials
%End
%TypeHeaderCode
#include "qgscredentialdialog.h"
%End
public:
QgsCredentialDialog( QWidget *parent /TransferThis/ = 0, const Qt::WindowFlags& fl = QgisGui::ModalDialogFlags );
~QgsCredentialDialog();
QgsCredentialDialog( QWidget *parent /TransferThis/ = 0, Qt::WindowFlags fl = QgisGui::ModalDialogFlags );
protected:
virtual bool request( const QString& realm, QString &username /In,Out/, QString &password /In,Out/, const QString& message = QString::null );
virtual bool request( const QString &realm, QString &username /In,Out/, QString &password /In,Out/, const QString &message = QString::null );
%Docstring
:rtype: bool
%End
virtual bool requestMasterPassword( QString &password /In,Out/, bool stored = false );
%Docstring
:rtype: bool
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgscredentialdialog.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/

View File

@ -22,6 +22,7 @@
#include "qgscredentials.h"
#include <QString>
#include "qgis.h"
#include "qgis_gui.h"
class QPushButton;
@ -33,8 +34,9 @@ class GUI_EXPORT QgsCredentialDialog : public QDialog, public QgsCredentials, pr
{
Q_OBJECT
public:
QgsCredentialDialog( QWidget *parent = nullptr, Qt::WindowFlags fl = QgisGui::ModalDialogFlags );
QgsCredentialDialog( QWidget *parent SIP_TRANSFERTHIS = nullptr, Qt::WindowFlags fl = QgisGui::ModalDialogFlags );
#ifndef SIP_RUN
signals:
//! \note not available in Python bindings
@ -42,6 +44,7 @@ class GUI_EXPORT QgsCredentialDialog : public QDialog, public QgsCredentials, pr
//! \note not available in Python bindings
void credentialsRequestedMasterPassword( QString *, bool, bool * );
#endif
private slots:
void requestCredentials( const QString &, QString *, QString *, const QString &, bool * );
@ -53,9 +56,9 @@ class GUI_EXPORT QgsCredentialDialog : public QDialog, public QgsCredentials, pr
void on_chkbxEraseAuthDb_toggled( bool checked );
protected:
virtual bool request( const QString &realm, QString &username, QString &password, const QString &message = QString::null ) override;
virtual bool request( const QString &realm, QString &username SIP_INOUT, QString &password SIP_INOUT, const QString &message = QString::null ) override;
virtual bool requestMasterPassword( QString &password, bool stored = false ) override;
virtual bool requestMasterPassword( QString &password SIP_INOUT, bool stored = false ) override;
private:
QPushButton *mOkButton = nullptr;