ctkEventBusDemoMainWindow.h 979 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #ifndef CTKEVENTBUSDEMOMAINWINDOW_H
  2. #define CTKEVENTBUSDEMOMAINWINDOW_H
  3. #include <QMainWindow>
  4. #include <QVariant>
  5. class ctkEventAdminBus;
  6. namespace Ui {
  7. class ctkEventBusDemoMainWindow;
  8. }
  9. class ctkEventDemo : public QObject {
  10. Q_OBJECT
  11. Q_SIGNALS:
  12. void receiveEventSignal(QVariantList l);
  13. void updateMessageSignal(QString message);
  14. public Q_SLOTS:
  15. void receiveEvent(QVariantList l);
  16. };
  17. class ctkEventBusDemoMainWindow : public QMainWindow {
  18. Q_OBJECT
  19. public:
  20. ctkEventBusDemoMainWindow(QWidget *parent = 0);
  21. ctkEventBusDemoMainWindow(ctkEventAdminBus *bus, QWidget *parent = 0);
  22. ~ctkEventBusDemoMainWindow();
  23. public Q_SLOTS:
  24. void sendEvent();
  25. void updateMessage(QString message);
  26. void connectClient();
  27. protected:
  28. void changeEvent(QEvent *e);
  29. void connectEvents();
  30. private:
  31. Ui::ctkEventBusDemoMainWindow *ui;
  32. ctkEventAdminBus *m_EventBus;
  33. ctkEventDemo *handler;
  34. };
  35. #endif // CTKEVENTBUSDEMOMAINWINDOW_H