/* * Copyright 2008-2009 Ben Boeckel * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #ifndef SIGENARENAS_ATBTIMER #define SIGENARENAS_ATBTIMER // Sigencore includes #include // Qt includes #include #include #include // Forward declarations class QSignalMapper; class ActionMap; class ATBArena; class ATBTimer : public QThread { Q_OBJECT public: ATBTimer(ATBArena* arena, ActionMap& actions); ~ATBTimer(); signals: void actionReady(Sigencore::TeamMember* teamMember); protected: void run(); void timerEvent(QTimerEvent* event); protected slots: void actionReceived(QObject* object); private: struct TimerIncrementFunctor; ATBArena* m_arena; QSignalMapper* m_actionMapper; QMap m_timers; ActionMap& m_actions; }; #endif