Plasma Engine  2.0
Loading...
Searching...
No Matches
SearchWidget.moc.h
1#pragma once
2
3#include <GuiFoundation/GuiFoundationDLL.h>
4#include <QWidget>
5
6class QLineEdit;
7class QPushButton;
8
13class PL_GUIFOUNDATION_DLL plQtSearchWidget : public QWidget
14{
15 Q_OBJECT
16public:
17 explicit plQtSearchWidget(QWidget* pParent);
18
20 void setText(const QString& sText);
21
23 QString text() const;
24
26 void setPlaceholderText(const QString& sText);
27
29 void selectAll();
30
31Q_SIGNALS:
33 void textChanged(const QString& sText);
34
37
43 void specialKeyPressed(Qt::Key key);
44
45 void visibleEvent();
46
47private Q_SLOTS:
48 void onLineEditTextChanged(const QString& text);
49 void onClearButtonClicked(bool checked = false);
50
51protected:
52 virtual bool eventFilter(QObject* obj, QEvent* e) override;
53 virtual void showEvent(QShowEvent* e) override;
54
55 QLineEdit* m_pLineEdit;
56 QPushButton* m_pClearButton;
57};
A widget that contains a line edit for a search text and a button to clear the search text.
Definition SearchWidget.moc.h:14
void specialKeyPressed(Qt::Key key)
This signal is sent when certain keys are pressed that could be used by external code to implement ad...
void enterPressed()
The user pressed the enter key.
void textChanged(const QString &sText)
Passed through from the QLineEdit.