OpenMW
|
00001 /**************************************************************************** 00002 ** 00003 ** Copyright (c) 2007 Trolltech ASA <info@trolltech.com> 00004 ** 00005 ** Use, modification and distribution is allowed without limitation, 00006 ** warranty, liability or support of any kind. 00007 ** 00008 ****************************************************************************/ 00009 00010 #ifndef LINEEDIT_H 00011 #define LINEEDIT_H 00012 00013 #include <QLineEdit> 00014 #include <QStyle> 00015 #include <QStylePainter> 00016 #include <QToolButton> 00017 00018 class QToolButton; 00019 00020 class LineEdit : public QLineEdit 00021 { 00022 Q_OBJECT 00023 00024 QString mPlaceholderText; 00025 00026 public: 00027 LineEdit(QWidget *parent = 0); 00028 00029 protected: 00030 void resizeEvent(QResizeEvent *); 00031 00032 private slots: 00033 void updateClearButton(const QString &text); 00034 00035 protected: 00036 QToolButton *mClearButton; 00037 00038 void setupClearButton(); 00039 }; 00040 00041 #endif // LIENEDIT_H 00042