35 lines
919 B
C
Raw Normal View History

2018-02-26 09:39:53 +01:00
/******************************************************************************
2024-01-17 14:31:45 +01:00
* QSkinny - Copyright (C) The authors
2023-04-06 09:23:37 +02:00
* SPDX-License-Identifier: BSD-3-Clause
2018-02-26 09:39:53 +01:00
*****************************************************************************/
2021-08-04 10:11:12 +02:00
#pragma once
2018-02-26 09:39:53 +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 );
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
}