summaryrefslogtreecommitdiff
path: root/examples/qtobject/testobject.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/qtobject/testobject.h')
-rw-r--r--examples/qtobject/testobject.h53
1 files changed, 0 insertions, 53 deletions
diff --git a/examples/qtobject/testobject.h b/examples/qtobject/testobject.h
deleted file mode 100644
index 72e57bb..0000000
--- a/examples/qtobject/testobject.h
+++ /dev/null
@@ -1,53 +0,0 @@
-#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 NOTIFY prop1Changed)
- Q_PROPERTY(QString prop2 READ prop2 WRITE setProp2 NOTIFY prop2Changed)
-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();
- void sig1(int a, float b, const QString& c);
- void sig2();
- void prop1Changed();
- void prop2Changed(const QString& newValue);
-
-public slots:
- void startTimer(int millis)
- {
- timer.start(millis);
- }
-
- QString debugMe(const QString& data);
-
- QString manyArgs(int a, float b, const QString& c) const;
-
-private:
- QString p1;
- QString p2;
- QTimer timer;
-};
-
-class TestObjectFactory : public QObject
-{
- Q_OBJECT
-public:
- explicit TestObjectFactory(QObject* parent = 0);
-
- Q_INVOKABLE TestObject* createObject(const QString& name);
-};
-
-#endif // TESTOBJECT_H