2 #define _GROUPSCREEN_H 1
5 #include <pqxx/connection>
10 #include "flagtrigger.h"
14 /* A screen class showing a group in the tournament */
15 class GroupScreen : public GenericScreen {
17 unsigned tournament, round, parallel, machine, num_machines, players_per_machine;
18 FlagTrigger scores_changed;
19 pqxx::connection &conn;
21 struct timeval last_updated;
22 std::vector<TextDefer> last_text;
24 void draw_main_heading(std::vector<TextDefer> &td);
25 void draw_column_headings(std::vector<TextDefer> &td, const Group &group, const std::vector<unsigned> &colwidth);
26 void find_column_widths(const Group &group, std::vector<unsigned> &colwidth);
29 // the last two parameters should probably not be there, but fetched from GroupScreen itself
30 GroupScreen(pqxx::connection &conn, unsigned tournament, unsigned round, unsigned parallel, unsigned machine, unsigned num_machines, unsigned players_per_machine);
31 virtual ~GroupScreen();
33 bool check_invalidated();
34 void draw(unsigned char *buf, unsigned width, unsigned height);
38 #endif /* !defined(_GROUPSCREEN_H) */