36 #include <QScopedPointer> 62 Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged USER
true)
70 Q_PROPERTY(QString placeholderText READ placeholderText WRITE setPlaceholderText)
78 Q_PROPERTY(
bool advancedSearchActive READ isAdvancedSearchActive WRITE setAdvancedSearchActive
79 NOTIFY advancedSearchActivated)
86 Q_PROPERTY(
bool advancedSearchEnabled READ isAdvancedSearchEnabled WRITE setAdvancedSearchEnabled)
100 Q_PROPERTY(QString settingKey READ settingKey WRITE setSettingKey NOTIFY settingKeyChanged)
106 pqSearchBox(
bool advancedSearchEnabled,
const QString& settingKey = "", QWidget* parent = 0);
114 bool isAdvancedSearchActive()
const;
120 QString text() const;
126 QString placeholderText() const;
127 void setPlaceholderText(const QString& text);
133 QString settingKey() const;
139 QSettings* settings() const;
145 bool isAdvancedSearchEnabled() const;
153 void advancedSearchActivated(
bool);
159 void textChanged(const QString&);
165 void settingKeyChanged(const QString&);
173 void setAdvancedSearchActive(
bool use);
179 void setText(const QString& text);
189 QString setSettingKey(const QString& key);
195 void setAdvancedSearchEnabled(
bool enable);
198 void keyPressEvent(QKeyEvent* e) override;
201 void onAdvancedButtonClicked(
bool);
202 void updateSettings();
203 void updateFromSettings();
209 friend class pqInternals;
211 const QScopedPointer<pqInternals> Internals;
#define PQCOMPONENTS_EXPORT
pqSearchBox is a line edit and an advanced tool button in the same layout.