ctkEventBus.h 571 B

12345678910111213141516171819202122232425262728
  1. #ifndef CTKEVENTBUS_H
  2. #define CTKEVENTBUS_H
  3. #include "ctkEvent.h"
  4. class ctkEventBus {
  5. public:
  6. typedef QMap<QString, QVariant> Properties;
  7. virtual ~ctkEventBus() {}
  8. virtual void postEvent(const ctkEvent& event) = 0;
  9. virtual void sendEvent(const ctkEvent& event) = 0;
  10. virtual void publishSignal(const QObject* publisher, const char* signal) = 0;
  11. virtual void subscribeSlot(const QObject* subscriber, const char* member, const Properties& properties) = 0;
  12. };
  13. Q_DECLARE_INTERFACE(ctkEventBus, "org.commontk.core.ctkEventBus")
  14. #endif // CTKEVENTBUS_H