]> git.sesse.net Git - ccbs/blobdiff - bigscreen/top5chosenscreen.h
Added a "top 5 chosen songs this tournament" screen.
[ccbs] / bigscreen / top5chosenscreen.h
diff --git a/bigscreen/top5chosenscreen.h b/bigscreen/top5chosenscreen.h
new file mode 100644 (file)
index 0000000..af2df73
--- /dev/null
@@ -0,0 +1,28 @@
+#ifndef _TOP5CHOSENSCREEN_H
+#define _TOP5CHOSENSCREEN_H 1
+
+#include <set>
+#include <pqxx/connection>
+
+#include "screen.h"
+#include "flagtrigger.h"
+#include "fetch_top_chosen_songs_for_tournament.h"
+
+/* A screen class showing a group in the tournament */
+class Top5ChosenScreen : public GenericScreen {
+private:
+       pqxx::connection &conn;
+       unsigned tournament;
+       FlagTrigger scores_changed;
+       bool valid;
+       std::set<TopChosen> seen_topchosen;
+       
+public:
+       Top5ChosenScreen(pqxx::connection &conn, unsigned tournament);
+       virtual ~Top5ChosenScreen();
+
+       bool check_invalidated();
+       void draw(unsigned char *buf);
+};
+
+#endif /* !defined(_TOP5CHOSENSCREEN_H) */