From a537c0c052142c67c4894508c628b35801bbb22c Mon Sep 17 00:00:00 2001 From: Alexander Bruy Date: Mon, 13 Mar 2017 21:13:39 +0200 Subject: [PATCH] add SIP bindings --- python/gui/gui.sip | 1 + python/gui/qgspasswordlineedit.sip | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 python/gui/qgspasswordlineedit.sip diff --git a/python/gui/gui.sip b/python/gui/gui.sip index bd2b6d3fd39..8b3ac5b003e 100644 --- a/python/gui/gui.sip +++ b/python/gui/gui.sip @@ -134,6 +134,7 @@ %Include qgsowssourceselect.sip %Include qgspanelwidget.sip %Include qgspanelwidgetstack.sip +%Include qgspasswordlineedit.sip %Include qgspixmaplabel.sip %Include qgspluginmanagerinterface.sip %Include qgspresetcolorrampdialog.sip diff --git a/python/gui/qgspasswordlineedit.sip b/python/gui/qgspasswordlineedit.sip new file mode 100644 index 00000000000..5ad2d0e7acb --- /dev/null +++ b/python/gui/qgspasswordlineedit.sip @@ -0,0 +1,28 @@ +/** \class QgsPasswordLineEdit + * \ingroup gui + * QLineEdit subclass with built in support for showing/hiding + * entered password. + * @note added in QGIS 3.0 + **/ +class QgsPasswordLineEdit : QLineEdit +{ +%TypeHeaderCode +#include +%End + + public: + + /** Constructor for QgsPasswordLineEdit. + * @param parent parent widget + */ + QgsPasswordLineEdit( QWidget *parent = nullptr ); + + /** Define if a lock icon shall be shown on the left of the widget + * @param visible set to false to hide the lock icon + */ + void setShowLockIcon( bool visible ); + + /** Returns if a lock icon shall be shown on the left of the widget + */ + bool showLockIcon() const; +};