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
|
|
|
|
*****************************************************************************/
|
|
|
|
|
2021-08-04 10:11:12 +02:00
|
|
|
#pragma once
|
2018-02-26 09:39:53 +01:00
|
|
|
|
2018-03-11 17:28:32 +01:00
|
|
|
#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 );
|
|
|
|
|
2018-03-09 12:24:18 +01:00
|
|
|
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
|
|
|
|
2018-02-27 17:47:23 +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:
|
2018-03-11 17:28:32 +01:00
|
|
|
QVector< Callback > m_callbacks;
|
2018-02-26 09:39:53 +01:00
|
|
|
};
|
|
|
|
|
2018-03-09 12:24:18 +01:00
|
|
|
inline void Invoker::addFunctionCall( const QskMetaFunction& function )
|
2018-02-26 09:39:53 +01:00
|
|
|
{
|
2018-03-09 12:24:18 +01:00
|
|
|
addFunctionCall( this, function );
|
2018-02-26 09:39:53 +01:00
|
|
|
}
|