Running Manager  1.7
API for Running Manager (https://github.com/HWiman-ICONIC/running-manager)
D:/dev/running-manager/WeekDay.h
Go to the documentation of this file.
1 #pragma once
2 #include "wx\panel.h"
3 #include <wx/grid.h>
4 #include <wx/button.h>
5 #include <vector>
6 #include <Plan.h>
7 
13 class DragGrid : public wxGrid {
14 public:
21  DragGrid(wxWindow *parent, wxWindowID id, wxButton *createButton);
22 
27  void OnColumnMoved(wxGridEvent &e);
28 
33  wxArrayInt GetColumnOrder();
34 
39  void SetColumnOrder(wxArrayInt order);
40 
45  void OnPaint(wxPaintEvent &e);
46 
47 protected:
49  wxButton *createButton;
50 
51  DECLARE_EVENT_TABLE()
52 };
53 
60 class WeekDay: public wxPanel {
61 public:
67  WeekDay(wxWindow *parent, Plan &plan);
68 
73  virtual ~WeekDay(void);
74 
79  wxArrayInt GetWeekdayOrder();
80 
86  bool Update(Plan &plan);
87 
92  void SetWeekdayOrder(wxArrayInt order);
93 
95  wxButton *createButton;
96  std::vector<std::vector<int>> cTrainingPerDay;
97 
98 protected:
99  void _Init();
100 };
DragGrid * table
Definition: WeekDay.h:94
wxArrayInt GetColumnOrder()
Return the current order of the columns.
wxButton * createButton
Definition: WeekDay.h:95
DragGrid(wxWindow *parent, wxWindowID id, wxButton *createButton)
Constructor.
void OnColumnMoved(wxGridEvent &e)
Handle a column darg event.
void OnPaint(wxPaintEvent &e)
Refresh this panel.
void SetColumnOrder(wxArrayInt order)
Set current order of columns.
void SetWeekdayOrder(wxArrayInt order)
Set week day order.
wxButton * createButton
Definition: WeekDay.h:49
void _Init()
virtual ~WeekDay(void)
Desctructor.
Grid which can change order of columns.
Definition: WeekDay.h:13
std::vector< std::vector< int > > cTrainingPerDay
Definition: WeekDay.h:96
WeekDay(wxWindow *parent, Plan &plan)
Constructor.
wxArrayInt GetWeekdayOrder()
Return current weekday order.
A training plan.
Definition: Plan.h:11
GUI for weekdays.
Definition: WeekDay.h:60
bool Update(Plan &plan)
Update the plan according to current weekday order.
bool isColumnOrderChanged
Definition: WeekDay.h:48