Skip to content
API Documentation
BastionGuard™
SettingsPage.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <gtkmm.h>
4#include <string>
5
6class SettingsPage : public Gtk::Box
7{
8public:
10
11 void setProtectionEnabled(bool enabled);
12 void setSystemIntegrationStatus(const std::string& text);
13 void refreshState();
15
16private:
17 Gtk::ScrolledWindow m_scroll;
18 Gtk::Box m_content {Gtk::Orientation::VERTICAL, 16};
19
20 Gtk::Label m_title;
21 Gtk::Label m_intro;
22
23 Gtk::Frame m_serviceFrame;
24 Gtk::Box m_serviceBox {Gtk::Orientation::VERTICAL, 12};
25 Gtk::Switch m_enableSwitch;
26 Gtk::Label m_enableLabel;
27 Gtk::Label m_statusLabel;
28 Gtk::Label m_infoLabel;
29 Gtk::Button m_applyButton;
30 Gtk::Button m_refreshButton;
31
32 Gtk::Frame m_detailsFrame;
33 Gtk::Box m_detailsBox {Gtk::Orientation::VERTICAL, 8};
34 Gtk::Label m_savedPrefLabel;
38 Gtk::Label m_serviceTitle;
39 Gtk::Label m_serviceBadge;
40 Gtk::Label m_detailsTitle;
41 Gtk::Label m_detailsBadge;
42 bool m_updatingSwitch = false;
43 sigc::signal<void(bool)> m_signalToggleProtectionRequested;
44 std::string m_configPath;
45 std::string m_backupPath;
46 bool m_savedEnabled = true;
47
48 void buildUi();
49 void loadPreference();
50 bool serviceEnabled() const;
51 bool autostartInstalled() const;
52 bool backupExists() const;
53
54 static std::string boolText(bool value);
55};
Gtk::Label m_serviceTitle
Gtk::Box m_detailsBox
std::string m_configPath
void setProtectionEnabled(bool enabled)
Gtk::ScrolledWindow m_scroll
Gtk::Button m_refreshButton
bool autostartInstalled() const
Gtk::Label m_savedPrefLabel
std::string m_backupPath
Gtk::Switch m_enableSwitch
Gtk::Box m_content
sigc::signal< void(bool)> & signal_toggle_protection_requested()
Gtk::Label m_intro
Gtk::Label m_autostartStateLabel
Gtk::Label m_infoLabel
Gtk::Frame m_detailsFrame
static std::string boolText(bool value)
Gtk::Label m_serviceBadge
Gtk::Label m_title
void setSystemIntegrationStatus(const std::string &text)
bool backupExists() const
Gtk::Label m_backupStateLabel
Gtk::Label m_serviceStateLabel
Gtk::Label m_statusLabel
Gtk::Frame m_serviceFrame
Gtk::Box m_serviceBox
bool serviceEnabled() const
Gtk::Label m_detailsBadge
sigc::signal< void(bool)> m_signalToggleProtectionRequested
void loadPreference()
Gtk::Label m_enableLabel
Gtk::Label m_detailsTitle
Gtk::Button m_applyButton