~ubuntu-branches/ubuntu/trusty/tomahawk/trusty-proposed

« back to all changes in this revision

Viewing changes to src/libtomahawk/thirdparty/Qocoa/qsearchfield.h

  • Committer: Package Import Robot
  • Author(s): Harald Sitter
  • Date: 2013-03-07 21:50:13 UTC
  • Revision ID: package-import@ubuntu.com-20130307215013-6gdjkdds7i9uenvs
Tags: upstream-0.6.0+dfsg
ImportĀ upstreamĀ versionĀ 0.6.0+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef QSEARCHFIELD_H
 
2
#define QSEARCHFIELD_H
 
3
 
 
4
#include <QWidget>
 
5
#include <QPointer>
 
6
 
 
7
#include "DllMacro.h"
 
8
 
 
9
class QSearchFieldPrivate;
 
10
class DLLEXPORT QSearchField : public QWidget
 
11
{
 
12
    Q_OBJECT
 
13
public:
 
14
    explicit QSearchField(QWidget *parent);
 
15
 
 
16
    QString text() const;
 
17
    QString placeholderText() const;
 
18
    void setFocus(Qt::FocusReason reason);
 
19
 
 
20
public slots:
 
21
    void setText(const QString &text);
 
22
    void setPlaceholderText(const QString &text);
 
23
    void clear();
 
24
    void selectAll();
 
25
    void setFocus();
 
26
 
 
27
signals:
 
28
    void textChanged(const QString &text);
 
29
    void editingFinished();
 
30
    void returnPressed();
 
31
 
 
32
protected:
 
33
    void resizeEvent(QResizeEvent*);
 
34
    bool eventFilter(QObject*, QEvent*);
 
35
 
 
36
private:
 
37
    friend class QSearchFieldPrivate;
 
38
    QPointer <QSearchFieldPrivate> pimpl;
 
39
 
 
40
    Q_PROPERTY(QString placeholderText READ placeholderText WRITE setPlaceholderText);
 
41
};
 
42
 
 
43
#endif // QSEARCHFIELD_H