6#ifndef RACINGWEB_SRC_RACINGWEBAPPLICATION_H_
7#define RACINGWEB_SRC_RACINGWEBAPPLICATION_H_
9#include <Wt/WApplication.h>
10#include <Wt/WContainerWidget.h>
11#include <Wt/WGridLayout.h>
12#include <Wt/WHBoxLayout.h>
13#include <Wt/WLineEdit.h>
14#include <Wt/WMenuItem.h>
16#include <Wt/WPushButton.h>
17#include <Wt/WTabWidget.h>
19#include <Wt/WVBoxLayout.h>
51 std::unique_ptr<Wt::WContainerWidget> BuildSetupContainer();
57 std::unique_ptr<Wt::WContainerWidget> BuildRunContainer();
63 std::unique_ptr<Wt::WContainerWidget> BuildStandingsContainer();
68 void UpdateLineupContainer();
76 std::vector<const Car *> CalculateFinalStandings();
81 void UpdateStandingsContainer();
92 void GenerateSchedule();
102 void SetCurrentHeat(
int heat);
117 void MarkPlace(
const Car &car,
int lane,
int place);
123 [[nodiscard]]
int IdentifyNextHeat()
const;
129 [[nodiscard]]
int IdentifyHeatOnDeck()
const;
132 Wt::WLineEdit *number_of_cars;
135 Wt::WLineEdit *number_of_lanes;
138 Wt::WText *schedule_text;
141 Wt::WTabWidget *tabs;
144 Wt::WMenuItem *setup_tab;
147 Wt::WMenuItem *run_tab;
150 Wt::WMenuItem *standings_tab;
153 std::vector<Car> roster;
156 std::vector<std::vector<const Car *>> schedule;
165 std::vector<std::vector<std::unique_ptr<Result>>> results;
168 int current_heat = 0;
171 Wt::WText *run_title;
174 Wt::WContainerWidget *lineup_container;
177 Wt::WContainerWidget *standings_container;
180 Wt::WText *heat_preview_text;
183 std::vector<std::vector<Wt::WPushButton *>> place_button_matrix;
186 Wt::WPushButton *accept_results_button;
application state container class
Definition: RacingWebApplication.h:38
RacingWebApplication(const Wt::WEnvironment &env)
initializes the application
Definition: RacingWebApplication.cc:8
a race participant
Definition: Car.h:13