21 #ifndef __ctkSearchBox_h
22 #define __ctkSearchBox_h
29 #include "ctkWidgetsExport.h"
31 class ctkSearchBoxPrivate;
50 #if QT_VERSION < 0x040700
53 Q_PROPERTY(QString placeholderText READ placeholderText WRITE setPlaceholderText)
57 Q_PROPERTY(
bool showSearchIcon READ showSearchIcon WRITE setShowSearchIcon)
61 Q_PROPERTY(QIcon searchIcon READ searchIcon WRITE setSearchIcon)
64 Q_PROPERTY(QIcon clearIcon READ clearIcon WRITE setClearIcon)
73 #if QT_VERSION < 0x040700
105 QScopedPointer<ctkSearchBoxPrivate>
d_ptr;
QIcon clearIcon() const
Get the current clear icon.
void setShowSearchIcon(bool show)
False by default.
void setClearIcon(const QIcon &icon)
Set the clear icon.
virtual void paintEvent(QPaintEvent *)
QScopedPointer< ctkSearchBoxPrivate > d_ptr
virtual void mouseMoveEvent(QMouseEvent *event)
ctkSearchBox(QWidget *parent=0)
QIcon searchIcon() const
Get the current search icon.
void setSearchIcon(const QIcon &icon)
Set the search icon.
void setAlwaysShowClearIcon(bool show)
False by default.
QLineEdit Superclass
Superclass typedef.
void updateClearButtonState()
Change the clear icon's state to enabled or disabled.
virtual void mousePressEvent(QMouseEvent *event)
bool showSearchIcon() const
virtual void resizeEvent(QResizeEvent *event)
QString placeholderText() const
void setPlaceholderText(const QString &defaultText)
bool alwaysShowClearIcon() const