Qt Utilities: widgets/clearplaintextedit.h Source File

Qt Utilities 6.20.0 Common Qt related C++ classes and routines used by my applications such as dialogs, widgets and models

Loading...
Searching...
No Matches
clearplaintextedit.h
Go to the documentation of this file.
1#ifndef WIDGETS_CLEARPLAINTEXTEDIT_H
2#define WIDGETS_CLEARPLAINTEXTEDIT_H
3
4#include "./buttonoverlay.h"
5
6#include <QPlainTextEdit>
7
8namespace QtUtilities {
9
10 class QT_UTILITIES_EXPORT ClearPlainTextEdit : public QPlainTextEdit, public ButtonOverlay {
11 Q_OBJECT
12 Q_PROPERTY(bool cleared READ isCleared)
13
14public:
15 explicit ClearPlainTextEdit(QWidget *parent = nullptr);
16 ~ClearPlainTextEdit() override;
17 bool isCleared() const override;
18
19private Q_SLOTS:
20 void handleTextChanged();
21 void handleClearButtonClicked() override;
22 void handleCustomLayoutCreated() override;
23 void handleScroll();
24};
25
26} // namespace QtUtilities
27
28#endif // WIDGETS_CLEARPLAINTEXTEDIT_H
buttonoverlay.h
QtUtilities::ButtonOverlay::ButtonOverlay
ButtonOverlay(QWidget *widget)
Constructs a button overlay for the specified widget.
Definition buttonoverlay.cpp:49
QtUtilities::ClearPlainTextEdit::ClearPlainTextEdit
ClearPlainTextEdit(QWidget *parent=nullptr)
Constructs a clear plain text edit.
Definition clearplaintextedit.cpp:20
QtUtilities::ClearPlainTextEdit::cleared
bool cleared
Definition clearplaintextedit.h:12
QtUtilities::ClearPlainTextEdit::isCleared
bool isCleared() const override
Returns whether the related widget is cleared.
Definition clearplaintextedit.cpp:71
QT_UTILITIES_EXPORT
#define QT_UTILITIES_EXPORT
Marks the symbol to be exported by the qtutilities library.
Definition global.h:14
QtUtilities
!
Definition trylocker.h:8