 |
CTK
0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
|
Go to the documentation of this file.
21 #ifndef __ctkSearchBox_h
22 #define __ctkSearchBox_h
29 #include "ctkWidgetsExport.h"
31 class ctkSearchBoxPrivate;
50 #if QT_VERSION < 0x040700
51 Q_PROPERTY(QString placeholderText READ placeholderText WRITE setPlaceholderText)
55 Q_PROPERTY(
bool showSearchIcon READ showSearchIcon WRITE setShowSearchIcon)
60 Q_PROPERTY(QIcon searchIcon READ searchIcon WRITE setSearchIcon)
64 Q_PROPERTY(QIcon clearIcon READ clearIcon WRITE setClearIcon)
73 #if QT_VERSION < 0x040700
77 void setShowSearchIcon(
bool show);
105 QScopedPointer<ctkSearchBoxPrivate>
d_ptr;
111 #endif // __ctkSearchBox_h
virtual void paintEvent(QPaintEvent *)
QIcon searchIcon() const
Get the current search icon.
virtual void resizeEvent(QResizeEvent *event)
QScopedPointer< ctkSearchBoxPrivate > d_ptr
void setSearchIcon(const QIcon &icon)
Set the search icon.
void setPlaceholderText(const QString &defaultText)
bool showSearchIcon() const
void updateClearButtonState()
Change the clear icon's state to enabled or disabled.
virtual void mouseMoveEvent(QMouseEvent *event)
QLineEdit Superclass
Superclass typedef.
QString placeholderText() const
QIcon clearIcon() const
Get the current clear icon.
ctkSearchBox(QWidget *parent=0)
virtual void mousePressEvent(QMouseEvent *event)
bool alwaysShowClearIcon() const
void setClearIcon(const QIcon &icon)
Set the clear icon.
void setAlwaysShowClearIcon(bool show)
False by default.