]> git.sesse.net Git - ccbs/blobdiff - bigscreen/groupscreen.h
Let each screen get width and height in as a parameter on draw() instead of hardcodin...
[ccbs] / bigscreen / groupscreen.h
index c794f60465904d2070c2976f9b9fba95130379ae..fb27787b34813e1ca39f6708aed6cec7a610c899 100644 (file)
@@ -1,21 +1,33 @@
 #ifndef _GROUPSCREEN_H
 #define _GROUPSCREEN_H 1
 
+#include <vector>
+#include <pqxx/connection>
+#include <time.h>
+#include <sys/time.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 Screen {
+class GroupScreen : public GenericScreen {
 private:
-       unsigned tournament;
+       unsigned tournament, round, parallel, machine, num_machines;
        FlagTrigger scores_changed;
-       
+       pqxx::connection &conn;
+       bool valid;
+       struct timeval last_updated;
+       std::vector<TextDefer> last_text;
 
 public:
-       Screen(unsigned tournament);
+       GroupScreen(pqxx::connection &conn, unsigned tournament, unsigned round, unsigned parallel, unsigned machine, unsigned num_machines);
+       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) */