-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSettingsDialog.cpp
More file actions
33 lines (24 loc) · 1.06 KB
/
SettingsDialog.cpp
File metadata and controls
33 lines (24 loc) · 1.06 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
#include "SettingsDialog.h"
#include "LanguageManager.h"
SettingsDialog::SettingsDialog(wxWindow* parent, bool showOnStart, bool hideLogin)
: wxDialog(parent, wxID_ANY, L("SETTINGS_TITLE"), wxDefaultPosition, wxDefaultSize) {
auto* mainSizer = new wxBoxSizer(wxVERTICAL);
auto* panel = new wxPanel(this);
auto* panelSizer = new wxBoxSizer(wxVERTICAL);
m_chkShowOnStart = new wxCheckBox(panel, wxID_ANY, L("SHOW_ON_START"));
m_chkShowOnStart->SetValue(showOnStart);
panelSizer->Add(m_chkShowOnStart, 0, wxALL, 10);
m_chkHideLogin = new wxCheckBox(panel, wxID_ANY, L("HIDE_LOGIN"));
m_chkHideLogin->SetValue(hideLogin);
panelSizer->Add(m_chkHideLogin, 0, wxALL, 10);
panel->SetSizer(panelSizer);
mainSizer->Add(panel, 1, wxEXPAND);
mainSizer->Add(CreateButtonSizer(wxOK | wxCANCEL), 0, wxALIGN_RIGHT | wxALL, 10);
SetSizerAndFit(mainSizer);
}
bool SettingsDialog::GetShowOnStart() const {
return m_chkShowOnStart->GetValue();
}
bool SettingsDialog::GetHideLogin() const {
return m_chkHideLogin->GetValue();
}