-
Notifications
You must be signed in to change notification settings - Fork 0
/
GroupRotationClasses.h
102 lines (83 loc) · 2.71 KB
/
GroupRotationClasses.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
// COP 3003 - CRN 15050 - Programming II
// Header file containing Class declaration and function prototypes
// also has an enum.
// --------------------------------------------------------------------------------------------------------------------
#ifndef GROUPROTATIONAPP_GROUPROTATIONCLASSES_H
#define GROUPROTATIONAPP_GROUPROTATIONCLASSES_H
// Directives
#include <wx/wx.h>
#include <wx/grid.h>
#include <wx/numdlg.h>
#include <vector>
#include <string>
#include <fstream>
// --------------------------------------------------------------------------------------------------------------------
// File struct
struct File {
std::string filename;
std::string filePath;
std::ofstream myFile;
};
// --------------------------------------------------------------------------------------------------------------------
// MyApp Class
class MyApp : public wxApp
{
public:
virtual bool OnInit();
};
// --------------------------------------------------------------------------------------------------------------------
// MyFrame Class
class MyFrame : public wxFrame
{
public:
MyFrame();
private:
// members
int selectedGroupIndex;
int selectedRotationItemIndex;
int timeSpanDefaultValue;
int timeSpanMinValue;
int timeSpanMaxValue;
int timeSpanValue;
std::string outputString;
std::string concatenatedArrayString;
int countIndexControl;
int startIndexControl;
// Functions that are being called
void OnAbout(wxCommandEvent& event);
void OnSaveAs(wxCommandEvent &event);
void OnExit(wxCommandEvent& event);
void OnAddGroup(wxCommandEvent &event);
void OnAddRotationItem(wxCommandEvent &event);
void OnDeleteEntry(wxCommandEvent &event);
void OnSelectTimeInterval(wxCommandEvent &event);
void OnTimeSpan(wxCommandEvent &event);
void OnPrint(wxCommandEvent &event);
void WriteFile();
// wxWidgets declaration;
wxGrid *m_grid;
wxListBox *m_groupListBox;
wxListBox *m_rotationItemListBox;
wxArrayString timeIntervalChoices;
wxString timeIntervalSelection;
wxBoxSizer *sizer;
wxBoxSizer *listBoxSizer;
File File;
// 2D vector being used to print out the output
std::vector<std::vector<std::string> > outputArray;
};
// --------------------------------------------------------------------------------------------------------------------
// Enum with ID's
enum
{
ID_SAVEAS = 1,
ID_EXIT = 2,
ID_ADDGROUP = 3,
ID_ADDROTATIONITEM = 4,
ID_DELETEENTRY = 5,
ID_SELECTTIMEINTERVAL = 6,
ID_TIMESPAN = 7,
ID_PRINT = 8
};
// --------------------------------------------------------------------------------------------------------------------
#endif //GROUPROTATIONAPP_GROUPROTATIONCLASSES_H