1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-04 02:41:19 +00:00
OpenMW/apps/launcher/utils/lineedit.hpp

41 lines
819 B
C++
Raw Normal View History

2011-04-07 22:04:09 +00:00
/****************************************************************************
**
** Copyright (c) 2007 Trolltech ASA <info@trolltech.com>
**
** Use, modification and distribution is allowed without limitation,
** warranty, liability or support of any kind.
**
****************************************************************************/
#ifndef LINEEDIT_H
#define LINEEDIT_H
#include <QLineEdit>
#include <QStylePainter>
#include <QToolButton>
2011-04-07 22:04:09 +00:00
class QToolButton;
class LineEdit : public QLineEdit
2011-04-07 22:04:09 +00:00
{
Q_OBJECT
2011-04-07 22:04:09 +00:00
QString mPlaceholderText;
public:
2022-09-22 18:26:05 +00:00
LineEdit(QWidget* parent = nullptr);
2011-04-07 22:04:09 +00:00
protected:
2022-09-22 18:26:05 +00:00
void resizeEvent(QResizeEvent*) override;
2011-04-07 22:04:09 +00:00
private slots:
2022-09-22 18:26:05 +00:00
void updateClearButton(const QString& text);
protected:
2022-09-22 18:26:05 +00:00
QToolButton* mClearButton;
void setupClearButton();
};
2011-04-07 22:04:09 +00:00
#endif // LIENEDIT_H