dotherside/DOtherSide/DynamicQObject/DynamicSignal.h

31 lines
681 B
C
Raw Normal View History

2014-07-19 16:26:08 +00:00
#pragma once
#include <QtCore/QMetaType>
#include <memory>
class SignalData;
class DynamicQObject;
class DynamicSignal
{
public:
DynamicSignal();
DynamicSignal(const QString& name, const QList<QMetaType::Type>& arguments);
DynamicSignal(const DynamicSignal& signal);
DynamicSignal& operator=(const DynamicSignal& signal);
~DynamicSignal();
bool isValid() const;
QString name() const;
QByteArray signature();
bool validate(const QVariantList& arguments);
static bool validate(const QList<QMetaType::Type>& argumentsTypes, const QVariantList& argumentsValues);
private:
void _initSignature();
std::unique_ptr<SignalData> d;
};