Make the bigscreen application read in the number of players per machine, but don...
[ccbs] / bigscreen / groupscreen.h
index 2d0e81b..d017588 100644 (file)
@@ -1,26 +1,34 @@
 #ifndef _GROUPSCREEN_H
 #define _GROUPSCREEN_H 1
 
 #ifndef _GROUPSCREEN_H
 #define _GROUPSCREEN_H 1
 
+#include <vector>
 #include <pqxx/connection>
 #include <pqxx/connection>
+#include <time.h>
+#include <sys/time.h>
 
 #include "screen.h"
 #include "flagtrigger.h"
 #include "group.h"
 
 #include "screen.h"
 #include "flagtrigger.h"
 #include "group.h"
+#include "fonts.h"
 
 /* A screen class showing a group in the tournament */
 class GroupScreen : public GenericScreen {
 private:
 
 /* A screen class showing a group in the tournament */
 class GroupScreen : public GenericScreen {
 private:
-       unsigned tournament, round, parallel;
+       unsigned tournament, round, parallel, machine, num_machines, players_per_machine;
        FlagTrigger scores_changed;
        pqxx::connection &conn;
        bool valid;
        FlagTrigger scores_changed;
        pqxx::connection &conn;
        bool valid;
+       struct timeval last_updated;
+       std::vector<TextDefer> last_text;
 
 public:
 
 public:
-       GroupScreen(pqxx::connection &conn, unsigned tournament, unsigned round, unsigned parallel);
+       // the last two parameters should probably not be there, but fetched from GroupScreen itself
+       GroupScreen(pqxx::connection &conn, unsigned tournament, unsigned round, unsigned parallel, unsigned machine, unsigned num_machines, unsigned players_per_machine);
        virtual ~GroupScreen();
 
        bool check_invalidated();
        virtual ~GroupScreen();
 
        bool check_invalidated();
-       void draw(unsigned char *buf);
+       void draw(unsigned char *buf, unsigned width, unsigned height);
+       int get_priority();
 };
 
 #endif /* !defined(_GROUPSCREEN_H) */
 };
 
 #endif /* !defined(_GROUPSCREEN_H) */