File indexing completed on 2024-04-28 03:53:11
0001 #ifndef _KLINEEDITTEST_H 0002 #define _KLINEEDITTEST_H 0003 0004 #include <QWidget> 0005 0006 class QLabel; 0007 class QLineEdit; 0008 class QString; 0009 class QPushButton; 0010 0011 class KLineEdit; 0012 0013 class KLineEditTest : public QWidget 0014 { 0015 Q_OBJECT 0016 0017 public: 0018 KLineEditTest(QWidget *parent = nullptr); 0019 ~KLineEditTest() override; 0020 KLineEdit *lineEdit() const 0021 { 0022 return m_lineedit; 0023 } 0024 0025 public Q_SLOTS: 0026 virtual void show(); 0027 0028 private Q_SLOTS: 0029 void quitApp(); 0030 void slotHide(); 0031 void slotEnable(bool); 0032 void slotReadOnly(bool); 0033 void slotPassword(bool); 0034 void slotReturnPressed(); 0035 void resultOutput(const QString &); 0036 void slotReturnKeyPressed(const QString &); 0037 void slotPlaceholderText(bool click); 0038 void slotInvalidChar(int); 0039 void slotSetStyleSheet(); 0040 0041 protected: 0042 KLineEdit *m_lineedit; 0043 KLineEdit *m_restrictedLine; 0044 QLabel *m_invalidCharLabel; 0045 QPushButton *m_btnExit; 0046 QPushButton *m_btnReadOnly; 0047 QPushButton *m_btnPassword; 0048 QPushButton *m_btnEnable; 0049 QPushButton *m_btnHide; 0050 QPushButton *m_btnPlaceholderText; 0051 QPushButton *m_btnClickMessage; 0052 }; 0053 0054 #endif