File indexing completed on 2024-05-12 05:08:00
0001 /* 0002 SPDX-FileCopyrightText: 2019 Thomas Baumgart <tbaumgart@kde.org> 0003 SPDX-License-Identifier: GPL-2.0-or-later 0004 */ 0005 0006 #ifndef PASSWORDTOGGLE_H 0007 #define PASSWORDTOGGLE_H 0008 0009 #include "kmm_base_widgets_export.h" 0010 0011 // ---------------------------------------------------------------------------- 0012 // QT Includes 0013 0014 #include <QObject> 0015 0016 // ---------------------------------------------------------------------------- 0017 // KDE Includes 0018 0019 // ---------------------------------------------------------------------------- 0020 // Project Includes 0021 0022 class QLineEdit; 0023 class QAction; 0024 0025 class KMM_BASE_WIDGETS_EXPORT PasswordToggle : public QObject 0026 { 0027 Q_OBJECT 0028 public: 0029 explicit PasswordToggle(QLineEdit* parent); 0030 0031 protected Q_SLOTS: 0032 void toggleEchoModeAction(const QString& text); 0033 void toggleEchoMode(); 0034 private: 0035 QLineEdit* m_lineEdit; 0036 QAction* m_toggleAction; 0037 }; 0038 0039 0040 #endif // PASSWORDTOGGLE_H