8 #include <QScopedPointer> 34 Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged USER
true)
42 Q_PROPERTY(QString placeholderText READ placeholderText WRITE setPlaceholderText)
50 Q_PROPERTY(
bool advancedSearchActive READ isAdvancedSearchActive WRITE setAdvancedSearchActive
51 NOTIFY advancedSearchActivated)
58 Q_PROPERTY(
bool advancedSearchEnabled READ isAdvancedSearchEnabled WRITE setAdvancedSearchEnabled)
72 Q_PROPERTY(QString settingKey READ settingKey WRITE setSettingKey NOTIFY settingKeyChanged)
79 bool advancedSearchEnabled,
const QString& settingKey = "", QWidget* parent =
nullptr);
87 bool isAdvancedSearchActive()
const;
99 QString placeholderText() const;
100 void setPlaceholderText(const QString& text);
106 QString settingKey() const;
112 QSettings* settings() const;
118 bool isAdvancedSearchEnabled() const;
126 void advancedSearchActivated(
bool);
132 void textChanged(const QString&);
138 void settingKeyChanged(const QString&);
146 void setAdvancedSearchActive(
bool use);
152 void setText(const QString& text);
162 QString setSettingKey(const QString& key);
168 void setAdvancedSearchEnabled(
bool enable);
171 void keyPressEvent(QKeyEvent* e) override;
174 void onAdvancedButtonClicked(
bool);
175 void updateSettings();
176 void updateFromSettings();
182 friend class pqInternals;
184 const QScopedPointer<pqInternals> Internals;
#define PQCOMPONENTS_EXPORT
pqSearchBox is a line edit and an advanced tool button in the same layout.