1 #ifndef MUSICCONNECTIONPOOL_H
2 #define MUSICCONNECTIONPOOL_H
25 #define TTK_CONNECTIONPOOL_REGISTER(object) G_CONNECTION_PTR->setValue(className(), object)
26 #define TTK_CONNECTIONPOOL_UNREGISTER(object) G_CONNECTION_PTR->removeValue(object)
27 #define TTK_CONNECTIONPOOL_BIND_TO(object) G_CONNECTION_PTR->connect(className(), object::className())
28 #define TTK_CONNECTIONPOOL_BIND_FROM(object) G_CONNECTION_PTR->connect(object::className(), className())
40 inline void setValue(
const QString &type, QObject *
object) noexcept
42 m_parameters[type] = object;
48 inline QObject*
value(
const QString &type)
const noexcept
50 return m_parameters[type];
56 void removeValue(
const QObject *
object);
61 void connect(
const QString &from,
const QString &to);
73 #define G_CONNECTION_PTR makeMusicConnectionPool()
76 #endif // MUSICCONNECTIONPOOL_H
#define TTK_MODULE_EXPORT
QObject * value(const QString &type) const noexcept
The class of the qt signal and slot connection pool.
#define TTK_DECLARE_SINGLETON_CLASS(Class)
// Singleton Macro // //
QMap< QString, QObject * > m_parameters
TTK_MODULE_EXPORT MusicConnectionPool * makeMusicConnectionPool()
void setValue(const QString &type, QObject *object) noexcept