TrafficLightRunner.h 953 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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 TRAFFICLIGHTRUNNER_H_
  12. #define TRAFFICLIGHTRUNNER_H_
  13. #include <QObject>
  14. #include <QTimer>
  15. #include <src-gen/TrafficLightWaiting.h>
  16. class TrafficLightRunner: public QObject {
  17. Q_OBJECT
  18. public:
  19. TrafficLightRunner(TrafficLightWaiting *handle, int time_ms);
  20. virtual ~TrafficLightRunner();
  21. public slots:
  22. void runCycle();
  23. void raisePedestrianRequest();
  24. void raiseOnOff();
  25. signals:
  26. void cycleDone(TrafficLightWaiting *handle);
  27. private:
  28. QTimer *timer;
  29. TrafficLightWaiting *handle;
  30. };
  31. #endif /* TRAFFICLIGHTRUNNER_H_ */