2018-02-26 09:39:53 +01:00
|
|
|
/******************************************************************************
|
|
|
|
* QSkinny - Copyright (C) 2016 Uwe Rathmann
|
|
|
|
* This file may be used under the terms of the 3-clause BSD License
|
|
|
|
*****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef INVOKER_H
|
|
|
|
#define INVOKER_H 1
|
|
|
|
|
|
|
|
#include <QskMetaFunction.h>
|
|
|
|
#include <QskMetaCallback.h>
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <QVector>
|
|
|
|
|
|
|
|
class Invoker : public QObject
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Invoker( QObject* parent = nullptr );
|
|
|
|
|
|
|
|
void addCallback( const QskMetaFunction& );
|
|
|
|
void addCallback( const QObject*, const QskMetaFunction& );
|
2018-03-02 14:58:43 +01:00
|
|
|
void addCallback( const QObject*, const char* methodName );
|
2018-02-26 09:39:53 +01:00
|
|
|
|
2018-02-27 17:47:23 +01:00
|
|
|
void invoke( qreal d, int i, Qt::ConnectionType );
|
2018-02-26 09:39:53 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
QVector< QskMetaCallback > m_callbacks;
|
|
|
|
};
|
|
|
|
|
|
|
|
inline void Invoker::addCallback( const QskMetaFunction& function )
|
|
|
|
{
|
|
|
|
addCallback( this, function );
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|