aboutsummaryrefslogtreecommitdiffstats
path: root/tests/pysidetest/testobject.h
blob: 9012359312d5dec5bd0e59494e5d11161627b9bb (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
#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 emitIdValueSignal();
    void emitStaticMethodDoubleSignal();

signals:
    void idValue(int newValue);
    void justASignal();
    void staticMethodDouble();

private:
    int m_idValue;
};

#endif // TESTOBJECT_H