goldendict-ng/globalbroadcaster.h

29 lines
561 B
C
Raw Normal View History

#ifndef GLOBAL_GLOBALBROADCASTER_H
#define GLOBAL_GLOBALBROADCASTER_H
#include <QObject>
2022-04-23 08:15:23 +00:00
#include "config.hh"
2022-04-23 08:15:23 +00:00
struct ActiveDictIds
{
QString word;
QStringList dictIds;
2022-04-23 08:15:23 +00:00
};
class GlobalBroadcaster : public QObject
{
Q_OBJECT
2022-04-23 08:15:23 +00:00
private:
Config::Preferences * preference;
public:
2022-04-23 08:15:23 +00:00
void setPreference( Config::Preferences * _pre );
Config::Preferences * getPreference();
GlobalBroadcaster( QObject * parent = nullptr );
static GlobalBroadcaster * instance();
signals:
2022-04-23 08:15:23 +00:00
void emitDictIds( ActiveDictIds ad );
};
#endif // GLOBAL_GLOBALBROADCASTER_H