1
0
mirror of https://github.com/strawberrymusicplayer/strawberry synced 2024-12-28 01:01:21 +01:00
strawberry-audio-player-win.../3rdparty/qocoa/qsearchfield.h
Jonas Kvinge e337b7933b Includes, comments and bugfixes
- Fix includes
- Use common regex (Song::kCoverRemoveDisc) for removing Disc/CD from album
- Remove Disc/CD from album when creating hash
- Make imobiledevice support compile
- Fix setting device on windows
2018-05-01 00:41:33 +02:00

46 lines
973 B
C++

#ifndef QSEARCHFIELD_H
#define QSEARCHFIELD_H
#include <QWidget>
#include <QObject>
#include <QPointer>
#include <QString>
#include <QEvent>
#include <QResizeEvent>
class QSearchFieldPrivate;
class QSearchField : public QWidget
{
Q_OBJECT
public:
explicit QSearchField(QWidget *parent);
QString text() const;
QString placeholderText() const;
void setFocus(Qt::FocusReason reason);
public slots:
void setText(const QString &text);
void setPlaceholderText(const QString &text);
void clear();
void selectAll();
void setFocus();
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;
Q_PROPERTY(QString placeholderText READ placeholderText WRITE setPlaceholderText);
};
#endif // QSEARCHFIELD_H