38 lines
976 B
C
Raw Normal View History

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 "Callback.h"
2018-02-26 09:39:53 +01:00
#include <QskMetaFunction.h>
#include <QObject>
#include <QVector>
class Invoker : public QObject
{
2018-08-03 08:15:28 +02:00
public:
2018-02-26 09:39:53 +01:00
Invoker( QObject* parent = nullptr );
void addFunctionCall( const QskMetaFunction& );
void addFunctionCall( const QObject*, const QskMetaFunction& );
void addMethodCall( const QObject*, const char* methodName );
void addPropertyCall( const QObject*, const char* property );
2018-02-26 09:39:53 +01:00
void invoke( qreal d, int i, Qt::ConnectionType );
2018-02-26 09:39:53 +01:00
2018-08-03 08:15:28 +02:00
private:
QVector< Callback > m_callbacks;
2018-02-26 09:39:53 +01:00
};
inline void Invoker::addFunctionCall( const QskMetaFunction& function )
2018-02-26 09:39:53 +01:00
{
addFunctionCall( this, function );
2018-02-26 09:39:53 +01:00
}
#endif