35 lines
817 B
C
35 lines
817 B
C
![]() |
/******************************************************************************
|
||
|
* 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& );
|
||
|
|
||
|
void invoke( qreal d, int i );
|
||
|
|
||
|
private:
|
||
|
QVector< QskMetaCallback > m_callbacks;
|
||
|
};
|
||
|
|
||
|
inline void Invoker::addCallback( const QskMetaFunction& function )
|
||
|
{
|
||
|
addCallback( this, function );
|
||
|
}
|
||
|
|
||
|
#endif
|