dotherside/src/DynamicSlot.h

42 lines
934 B
C
Raw Normal View History

#pragma once
2014-07-19 18:26:08 +02:00
#include <memory>
#include <functional>
#include <QtCore/QList>
#include <QtCore/QMetaType>
#include <QtCore/QVariant>
2015-02-04 23:02:26 +01:00
#include <QtCore/QDebug>
#include <QtCore/QString>
#include <QtCore/QVariant>
#include <QtCore/QMetaType>
#include "private/qmetaobjectbuilder_p.h"
2014-07-19 18:26:08 +02:00
class QString;
class DynamicSlot final
2014-07-19 18:26:08 +02:00
{
public:
DynamicSlot();
DynamicSlot(const QString& name,
QMetaType::Type returnType,
const QList<QMetaType::Type>& argumentsTypes);
DynamicSlot(const DynamicSlot& slot);
DynamicSlot& operator=(const DynamicSlot& slot);
~DynamicSlot();
QString name() const;
bool isValid() const;
QByteArray signature() const;
QMetaType::Type returnType() const;
QList<QMetaType::Type> argumentsTypes() const;
QMetaType::Type argumentTypeAt(int i) const;
2014-07-19 18:26:08 +02:00
private:
void _initSignature();
struct SlotData;
2014-07-19 18:26:08 +02:00
std::unique_ptr<SlotData> d;
};