aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual/debugger/qquick1/myplugin/mytype.h
blob: 8f4116a25117d66f240da44d97d17d760db5a36a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef MYTYPE_H
#define MYTYPE_H

#include <QObject>
#include <QString>

class QTimer;

class MyType : public QObject
{
    Q_OBJECT

    Q_PROPERTY(QString timeText READ timeText WRITE setTimeText NOTIFY timeChanged)

public:
    MyType(QObject *parent = 0);

    QString timeText() const;
    void setTimeText(const QString &text);

signals:
    void timeChanged(const QString &newText);

private slots:
    void updateTimerText();

private:
    QString m_timeText;
    QTimer *m_timer;

    Q_DISABLE_COPY(MyType)
};

#endif // MYTYPE_H