Skip to content
API Documentation
BastionGuard™
PasswordVaultView.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
23#include <gtkmm.h>
24#include <vector>
25#include "PasswordVault.hpp"
26#include "PasswordEntry.hpp"
27
29public:
30 explicit PasswordVaultView(Gtk::Window& parent, PasswordVault& vault);
32
33 void present();
34
35private:
36 Gtk::Window& parent_;
38 Gtk::Dialog* dialog_ = nullptr;
39 Gtk::Box toolBar_;
40 Gtk::SearchEntry searchEntry_;
41 Gtk::Button exportBtn_;
42 Gtk::Label countLabel_;
43 Gtk::ListBox list_;
44 Gtk::ScrolledWindow scrolled_;
45 std::vector<PasswordEntry> entries_;
46
47 void buildUi();
48 void styleExportButton();
49 void populate(const std::string& filter = "");
50 void onSearchChanged();
51 void onExportClicked();
52 void showEntryDetail(const PasswordEntry& entry);
53};
void populate(const std::string &filter="")
PasswordVault & vault_
std::vector< PasswordEntry > entries_
Gtk::ScrolledWindow scrolled_
Gtk::SearchEntry searchEntry_
PasswordVaultView(Gtk::Window &parent, PasswordVault &vault)
void showEntryDetail(const PasswordEntry &entry)