-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRunningManager.h
119 lines (104 loc) · 3.31 KB
/
RunningManager.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#pragma once
#include "Plan.h"
#include "Zone.h"
#include "Mainframe.h"
#include "SettingsPanel.h"
#include "TrainingProgramGrid.h"
#include "TodayControl.h"
#include "ZoneGrid.h"
#include "User.h"
#include <WeekDay.h>
#include <wx/app.h>
#include <wx/config.h>
#include <wx/wxhtml.h>
#include <wx/html/helpwnd.h>
#include <map>
#include <vector>
/**
* @brief The RunningManager application
*/
class MyApp : public wxApp {
public:
/**
* @brief Constructor
*/
MyApp();
/**
* @brief Destructor
*/
virtual ~MyApp();
/**
* @brief Initialize application
* @return True on success
*/
virtual bool OnInit();
/**
* @brief Close application
* @return 0 on success
*/
virtual int OnExit();
/**
* @brief Get the panel for todays training
* @return
*/
TodayControl* GetTodayControl() const;
/**
* @brief Update current date
* @param date Current date
* @param sender Sender does not need to be updated
* @param index 0 if single activity this day, 1 if second activity this day is wanted.
*/
void UpdateCurrentDate(wxDateTime const& date, wxWindow* sender, int index);
/**
* @brief Update lactate threshold heart rate
*/
void UpdatePulse();
/**
* @brief Get a map with all perspectives.
*
* First entry is descriptive name of perspective, second entry is initialization string to open and open the panes for the named perspective.
* @return Map with perspectives.
*/
std::map<wxString, wxString>& GetPerspectives();
private:
boost::shared_ptr<wxAuiManager> GetAuiManager() const;
bool ReadPerspective(int const& n);
void SavePerspectives();
void ReadPaces(wxString const& user);
void SavePaces(wxString const& user);
std::map<wxString, wxString>::iterator FindPerspective(wxString const& s);
void OnCreateTrainingProgram(wxCommandEvent& event);
void OnSaveCalendar(wxCommandEvent& event);
void OnUpdateSaveCalendar(wxUpdateUIEvent& e);
void OnUnitKm(wxCommandEvent& event);
void OnZone(wxCommandEvent& event);
void OnUnitMiles(wxCommandEvent& event);
void OnUpdateUnit(wxUpdateUIEvent& e);
void OnLoadPerspective(wxCommandEvent& e);
void OnDeletePerspective(wxCommandEvent& WXUNUSED(ev));
void OnUpdateLoadPerspective(wxUpdateUIEvent& e);
void OnSavePerspective(wxCommandEvent& e);
void OnSetPace(wxCommandEvent& WXUNUSED(e));
void OnCreateUser( wxCommandEvent &WXUNUSED(e) );
void OnSelectUser( wxCommandEvent &WXUNUSED(e) );
void OnDeleteUser( wxCommandEvent &WXUNUSED(e) );
void OnDateSelected(wxCommandEvent& e);
Plan* plan;
wxString lastDir;
MyFrame* frame;
int cMajorVersion;
int cMinorVersion;
ZoneGrid* zoneGrid;
wxGrid* trainingTypeGrid;
CreateTrainingProgramDialog* trainingDialog;
// boost::shared_ptr<wxAuiManager> auiManager;
TrainingProgramGrid* trainingProgram;
TodayControl* today;
WeekDay *weekDayControl;
wxHtmlHelpWindow* cpHelpWindow;
wxHtmlHelpController* cpHelpController;
std::map<wxString, wxString> vPerspectives;
wxString lastPerspective;
// std::vector<Zone> vZoneMap;
wxDECLARE_EVENT_TABLE();
};