TimeEvent.h 831 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /**
  2. * Copyright (c) 2012 committers of YAKINDU and others.
  3. * All rights reserved. This program and the accompanying materials
  4. * are made available under the terms of the Eclipse Public License v1.0
  5. * which accompanies this distribution, and is available at
  6. * http://www.eclipse.org/legal/epl-v10.html
  7. * Contributors:
  8. * m.muehlbrandt - initial API and implementation
  9. *
  10. */
  11. #ifndef TIMEEVENT_H_
  12. #define TIMEEVENT_H_
  13. #include <QObject>
  14. #include <QTimer>
  15. #include "src-gen/sc_types.h"
  16. class TimeEvent: public QObject {
  17. Q_OBJECT
  18. public:
  19. TimeEvent(sc_eventid evid, sc_integer time_ms, sc_boolean periodic);
  20. virtual ~TimeEvent();
  21. public slots:
  22. void timeout();
  23. signals:
  24. void timeout(const sc_eventid evid);
  25. private:
  26. sc_eventid evid;
  27. QTimer *timer;
  28. };
  29. #endif /* TIMEEVENT_H_ */