summaryrefslogtreecommitdiff
path: root/tests/manual/debugger/qquick1/myplugin/mytype.h
blob: e833fe81b86217e4910f1aba5dcdb039c6b6a3b6 (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
#pragma once

#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:
    void updateTimerText();

    QString m_timeText;
    QTimer *m_timer;

    Q_DISABLE_COPY(MyType)
};