PySide/tests/pysidetest/testobject.h
Renato Araujo Oliveira Filho 2734efb6b7 Moved list_signal_test to pysidetest library.
This isolate the test case, and avoid other problems with X during the
buildbot compilation.

Reviewer: Lauro Moura <lauro.neto@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
2012-03-08 16:48:04 -03:00

34 lines
815 B
C++

#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();
signals:
void idValue(int newValue);
void justASignal();
void staticMethodDouble();
void childrenChanged(const QList<QObject*>);
private:
int m_idValue;
QList<QObject*> m_children;
};
#endif // TESTOBJECT_H