Skip to content
API Documentation
BastionGuard™
SambaPage.hpp
Go to the documentation of this file.
1/*
2 * BastionGuard™
3 * Copyright (C) 2025–2026 Calogero Scarnà
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, version 3.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 *
17 * BastionGuard™ is a trademark of Calogero Scarnà.
18 * The BastionGuard™ name and branding are not licensed under the GPL.
19 */
20
21#pragma once
22#include <gtkmm.h>
23#include "Backend.hpp"
24
25class SambaPage : public Gtk::Box {
26public:
27 SambaPage();
28 virtual ~SambaPage() = default;
29
30private:
31 struct SambaColumns : public Gtk::TreeModel::ColumnRecord {
33 add(col_path);
34 add(col_color);
35 }
36 Gtk::TreeModelColumn<Glib::ustring> col_path;
37 Gtk::TreeModelColumn<Glib::ustring> col_color;
38 };
39
41 Glib::RefPtr<Gtk::ListStore> sambaStore;
42 Gtk::TreeView sambaView;
43
44 Gtk::Switch switchEnable;
46
47 bool loading_ = false;
48
49 void loadConfig();
50 void saveConfig();
51 void refreshUI();
52
53 void onAddDir();
54 void onRemoveDir();
55 void onScanNow();
56};
Glib::RefPtr< Gtk::ListStore > sambaStore
Definition SambaPage.hpp:41
void onAddDir()
virtual ~SambaPage()=default
Gtk::Button btnRemove
Definition SambaPage.hpp:45
void loadConfig()
Gtk::Button btnScan
Definition SambaPage.hpp:45
bool loading_
Definition SambaPage.hpp:47
Gtk::Button btnAdd
Definition SambaPage.hpp:45
SambaColumns sambaCols
Definition SambaPage.hpp:40
void onScanNow()
void saveConfig()
void onRemoveDir()
Gtk::Switch switchEnable
Definition SambaPage.hpp:44
Gtk::TreeView sambaView
Definition SambaPage.hpp:42
Gtk::Button btnSave
Definition SambaPage.hpp:45
void refreshUI()
Gtk::TreeModelColumn< Glib::ustring > col_color
Definition SambaPage.hpp:37
Gtk::TreeModelColumn< Glib::ustring > col_path
Definition SambaPage.hpp:36