ctkEventDispatcherLocal.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * ctkEventDispatcherLocal.h
  3. * ctkEventBus
  4. *
  5. * Created by Daniele Giunchi on 11/04/10.
  6. * Copyright 2009 B3C. All rights reserved.
  7. *
  8. * See Licence at: http://tiny.cc/QXJ4D
  9. *
  10. */
  11. #ifndef CTKEVENTDISPATCHERLOCAL_H
  12. #define CTKEVENTDISPATCHERLOCAL_H
  13. #include "ctkEventDefinitions.h"
  14. #include "ctkEventDispatcher.h"
  15. namespace ctkEventBus {
  16. /**
  17. Class name: ctkEventDispatcherLocal
  18. This allows dispatching events coming from local application to attached observers.
  19. */
  20. class org_commontk_eventbus_EXPORT ctkEventDispatcherLocal : public ctkEventDispatcher {
  21. Q_OBJECT
  22. public:
  23. /// object constructor.
  24. ctkEventDispatcherLocal();
  25. /// Emit event corresponding to the given id locally to the application.
  26. virtual void notifyEvent(ctkBusEvent &event_dictionary, ctkEventArgumentsList *argList = NULL, ctkGenericReturnArgument *returnArg = NULL) const;
  27. protected:
  28. /// Register MAF global events
  29. /*virtual*/ void initializeGlobalEvents();
  30. private:
  31. };
  32. }
  33. #endif // CTKEVENTDISPATCHERLOCAL_H