Skip to content

Commit

Permalink
sipify QgsCredentials dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Apr 17, 2017
1 parent ec5a891 commit 6bcc066
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 12 deletions.
1 change: 0 additions & 1 deletion python/auto_sip.blacklist
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
43 changes: 35 additions & 8 deletions python/gui/qgscredentialdialog.sip
Original file line number Diff line number Diff line change
@@ -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 *
************************************************************************/
9 changes: 6 additions & 3 deletions src/gui/qgscredentialdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "qgscredentials.h"

#include <QString>
#include "qgis.h"
#include "qgis_gui.h"

class QPushButton;
Expand All @@ -33,15 +34,17 @@ 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
void credentialsRequested( const QString &, QString *, QString *, const QString &, bool * );

//! \note not available in Python bindings
void credentialsRequestedMasterPassword( QString *, bool, bool * );
#endif

private slots:
void requestCredentials( const QString &, QString *, QString *, const QString &, bool * );
Expand All @@ -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;
Expand Down

0 comments on commit 6bcc066

Please sign in to comment.