Clementine-audio-player-Mac.../3rdparty/qocoa/qsearchfield.h

43 lines
901 B
C
Raw Normal View History

#ifndef QSEARCHFIELD_H
#define QSEARCHFIELD_H
#include <QWidget>
#include <QPointer>
class QSearchFieldPrivate;
class QSearchField : public QWidget
{
Q_OBJECT
public:
explicit QSearchField(QWidget *parent);
QString text() const;
QString placeholderText() const;
2012-07-12 16:51:11 +02:00
void setFocus(Qt::FocusReason reason);
public slots:
void setText(const QString &text);
void setPlaceholderText(const QString &text);
void clear();
2012-06-28 12:27:32 +02:00
void selectAll();
2012-07-12 16:51:11 +02:00
void setFocus();
2012-06-28 12:27:32 +02:00
signals:
void textChanged(const QString &text);
void editingFinished();
void returnPressed();
protected:
void resizeEvent(QResizeEvent*);
bool eventFilter(QObject*, QEvent*);
private:
friend class QSearchFieldPrivate;
QPointer <QSearchFieldPrivate> pimpl;
2019-11-10 00:36:23 +01:00
Q_PROPERTY(
QString placeholderText READ placeholderText WRITE setPlaceholderText)
};
#endif // QSEARCHFIELD_H