blob: 8dcb4c06dbe11af1638b6ecc0d86fe06c4b9c3d4 (
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
38
|
#ifndef TESTOBJECT_H
#define TESTOBJECT_H
#include <QObject>
#ifdef pysidetest_EXPORTS
#define PYSIDE_EXPORTS 1
#endif
#include "pysidemacros.h"
class PYSIDE_API TestObject : public QObject
{
Q_OBJECT
public:
TestObject(int idValue, QObject* parent = 0) : QObject(parent), m_idValue(idValue) {}
int idValue() const { return m_idValue; }
static int staticMethodDouble(int value) { return value * 2; }
void addChild(QObject* c) { m_children.append(c); emit childrenChanged(m_children); }
void emitIdValueSignal();
void emitStaticMethodDoubleSignal();
void emitSignalWithDefaultValue_void();
void emitSignalWithDefaultValue_bool();
signals:
void idValue(int newValue);
void justASignal();
void staticMethodDouble();
void childrenChanged(const QList<QObject*>&);
void signalWithDefaultValue(bool value = false);
private:
int m_idValue;
QList<QObject*> m_children;
};
#endif // TESTOBJECT_H
|