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)
107 bool advancedSearchEnabled,
const QString& settingKey = "", QWidget* parent =
nullptr);
115 bool isAdvancedSearchActive()
const;
121 QString text() const;
127 QString placeholderText() const;
128 void setPlaceholderText(const QString& text);
134 QString settingKey() const;
140 QSettings* settings() const;
146 bool isAdvancedSearchEnabled() const;
154 void advancedSearchActivated(
bool);
160 void textChanged(const QString&);
166 void settingKeyChanged(const QString&);
174 void setAdvancedSearchActive(
bool use);
180 void setText(const QString& text);
190 QString setSettingKey(const QString& key);
196 void setAdvancedSearchEnabled(
bool enable);
199 void keyPressEvent(QKeyEvent* e) override;
202 void onAdvancedButtonClicked(
bool);
203 void updateSettings();
204 void updateFromSettings();
210 friend class pqInternals;
212 const QScopedPointer<pqInternals> Internals;
#define PQCOMPONENTS_EXPORT
pqSearchBox is a line edit and an advanced tool button in the same layout.