34 lines
608 B
C++
34 lines
608 B
C++
#ifndef WIDGETS_CLEARLINEEDIT_H
|
|
#define WIDGETS_CLEARLINEEDIT_H
|
|
|
|
#include "./buttonoverlay.h"
|
|
|
|
#include <c++utilities/application/global.h>
|
|
|
|
#include <QLineEdit>
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
class QHBoxLayout;
|
|
QT_END_NAMESPACE
|
|
|
|
namespace Widgets {
|
|
|
|
class IconButton;
|
|
|
|
class LIB_EXPORT ClearLineEdit : public QLineEdit, public ButtonOverlay
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit ClearLineEdit(QWidget *parent = nullptr);
|
|
~ClearLineEdit();
|
|
bool isCleared() const;
|
|
|
|
private Q_SLOTS:
|
|
void handleTextChanged(const QString &text);
|
|
void handleClearButtonClicked();
|
|
};
|
|
|
|
}
|
|
|
|
#endif // WIDGETS_CLEARLINEEDIT_H
|