-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmainframe.hpp
More file actions
43 lines (40 loc) · 1.22 KB
/
mainframe.hpp
File metadata and controls
43 lines (40 loc) · 1.22 KB
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
#ifndef MAINFRAME_HPP
#define MAINFRAME_HPP
#include <wx/generic/grid.h>
#include <wx/wx.h>
class MainFrame : public wxFrame {
public:
MainFrame(const wxString &title);
void PopulateGridFromDatabase(wxGrid *grid);
std::string FetchWelcomingText();
static size_t WriteCallback(void *contents, size_t size, size_t nmemb, std::string *userp);
private:
int regionsDropDownSelection;
wxPanel *panel;
wxArrayString *regions;
wxArrayString *cities;
wxArrayString fuelType;
wxChoice *regionsDropDown;
wxChoice *citiesDropDown;
wxChoice *fuelsDropDown;
wxButton *goButton;
wxButton *goLocationButton;
wxStaticText *favoritesLabel;
wxGrid *grid;
wxCheckBox *nowOpenBox;
std::string cityCode;
std::string latitude;
std::string longitude;
wxButton *refreshButton;
void OnGoButtonClick(wxCommandEvent &event);
void OnGoLocationButtonClick(wxCommandEvent &event);
void On_button_clear_clicked(wxCommandEvent &evt);
void On_textField_change(wxCommandEvent &evt);
void OnPaint(wxPaintEvent &event);
void FetchRegions();
void FetchCities();
void OnRegionSelected(wxCommandEvent &event);
void OnCitySelected(wxCommandEvent &event);
int GetRegionCodeByCity(std::string cityName);
};
#endif // MAINFRAME_HPP