blob: fe5043d27aaae9489876544ff06e9fd499835ac9 (
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
36
37
|
#ifndef TESTOBJECT_H
#define TESTOBJECT_H
#include <QObject>
#include <QtDebug>
#include <QTimer>
class TestObject : public QObject
{
Q_OBJECT
Q_PROPERTY(QString prop1 READ prop1 WRITE setProp1)
Q_PROPERTY(QString prop2 READ prop2 WRITE setProp2)
public:
explicit TestObject(QObject *parent = 0);
QString prop1() const { return "p1" + p1 + objectName(); }
void setProp1(const QString& s);
QString prop2() const { return "p2" + p2 + objectName(); }
void setProp2(const QString& s);
signals:
void timeout();
public slots:
void startTimer(int millis)
{
timer.start(millis);
}
QString debugMe(const QString& data);
private:
QString p1;
QString p2;
QTimer timer;
};
#endif // TESTOBJECT_H
|