| 1 | // For license of this file, see <project-root-folder>/LICENSE.md. |
| 2 | |
| 3 | #ifndef LINEEDITWITHSTATUS_H |
| 4 | #define LINEEDITWITHSTATUS_H |
| 5 | |
| 6 | #include "gui/reusable/baselineedit.h" |
| 7 | #include "gui/reusable/widgetwithstatus.h" |
| 8 | |
| 9 | #include <QPlainTextEdit> |
| 10 | |
| 11 | class RSSGUARD_DLLSPEC LineEditWithStatus : public WidgetWithStatus { |
| 12 | Q_OBJECT |
| 13 | |
| 14 | public: |
| 15 | explicit LineEditWithStatus(QWidget* parent = nullptr); |
| 16 | |
| 17 | // Access to line edit. |
| 18 | BaseLineEdit* lineEdit() const; |
| 19 | }; |
| 20 | |
| 21 | inline BaseLineEdit* LineEditWithStatus::lineEdit() const { |
| 22 | return static_cast<BaseLineEdit*>(m_wdgInput); |
| 23 | } |
| 24 | |
| 25 | class RSSGUARD_DLLSPEC TextEditWithStatus : public WidgetWithStatus { |
| 26 | Q_OBJECT |
| 27 | |
| 28 | public: |
| 29 | explicit TextEditWithStatus(QWidget* parent = nullptr); |
| 30 | |
| 31 | // Access to line edit. |
| 32 | QPlainTextEdit* textEdit() const; |
| 33 | }; |
| 34 | |
| 35 | inline QPlainTextEdit* TextEditWithStatus::textEdit() const { |
| 36 | return static_cast<QPlainTextEdit*>(m_wdgInput); |
| 37 | } |
| 38 | |
| 39 | #endif // LINEEDITWITHSTATUS_H |