57class ITOMWIDGETS_EXPORT
SearchBox :
public QLineEdit
60#if QT_VERSION < 0x040700
63 Q_PROPERTY(QString placeholderText READ placeholderText WRITE setPlaceholderText)
67 Q_PROPERTY(
bool showSearchIcon READ showSearchIcon WRITE setShowSearchIcon)
71 Q_PROPERTY(QIcon searchIcon READ searchIcon WRITE setSearchIcon)
74 Q_PROPERTY(QIcon clearIcon READ clearIcon WRITE setClearIcon)
83#if QT_VERSION < 0x040700
84 QString placeholderText()
const;
85 void setPlaceholderText(
const QString& defaultText);
88 void setShowSearchIcon(
bool show);
89 bool showSearchIcon()
const;
92 void setAlwaysShowClearIcon(
bool show);
93 bool alwaysShowClearIcon()
const;
96 void setSearchIcon(
const QIcon& icon);
98 QIcon searchIcon()
const;
101 void setClearIcon(
const QIcon& icon);
103 QIcon clearIcon()
const;
107 void updateClearButtonState();
110 virtual void paintEvent(QPaintEvent*);
111 virtual void mousePressEvent(QMouseEvent* event);
112 virtual void mouseMoveEvent(QMouseEvent *event);
113 virtual void resizeEvent(QResizeEvent * event);
115 QScopedPointer<SearchBoxPrivate> d_ptr;