20#ifndef ORES_QT_ACCOUNT_MDI_WINDOW_HPP
21#define ORES_QT_ACCOUNT_MDI_WINDOW_HPP
26#include <QSortFilterProxyModel>
28#include "ores.qt/EntityListMdiWindow.hpp"
29#include "ores.qt/ClientManager.hpp"
30#include "ores.logging/make_logger.hpp"
31#include "ores.qt/ClientAccountModel.hpp"
32#include "ores.qt/PaginationWidget.hpp"
48 inline static std::string_view logger_name =
49 "ores.qt.account_mdi_window";
51 [[nodiscard]]
static auto& lg() {
53 static auto instance = make_logger(logger_name);
59 const QString& username,
61 QWidget* parent =
nullptr);
67 void statusChanged(
const QString& message);
68 void errorOccurred(
const QString& error_message);
69 void selectionChanged(
int selection_count);
70 void addNewRequested();
72 void showAccountHistory(
const QString& username);
73 void showSessionHistory(
const boost::uuids::uuid& accountId,
const QString& username);
74 void accountDeleted(
const boost::uuids::uuid& account_id);
77 void doReload()
override;
80 void deleteSelected();
82 void unlockSelected();
83 void resetPasswordSelected();
84 void viewHistorySelected();
85 void viewSessionsSelected();
89 void onLoadError(
const QString& error_message,
const QString& details = {});
90 void onRowDoubleClicked(
const QModelIndex& index);
91 void onSelectionChanged();
92 void onConnectionStateChanged();
96 return tr(
"Refresh accounts");
100 void updateActionStates();
101 void setupReloadAction();
104 QVBoxLayout* verticalLayout_;
105 QTableView* accountTableView_;
110 QAction* reloadAction_;
113 QAction* editAction_;
114 QAction* deleteAction_;
115 QAction* lockAction_;
116 QAction* unlockAction_;
117 QAction* resetPasswordAction_;
118 QAction* historyAction_;
119 QAction* sessionsAction_;
121 std::unique_ptr<ClientAccountModel> accountModel_;
122 QSortFilterProxyModel* proxyModel_;
Implements logging infrastructure for ORE Studio.
Definition boost_severity.hpp:28
Qt-based graphical user interface for ORE Studio.
Definition AboutDialog.hpp:29
MDI window for displaying and managing user accounts.
Definition AccountMdiWindow.hpp:44
QString normalRefreshTooltip() const override
Get the normal (non-stale) tooltip text for the refresh action.
Definition AccountMdiWindow.hpp:95
Client-side cache of badge definitions and mappings.
Definition BadgeCache.hpp:46
Composite structure combining account with its login status.
Definition ClientAccountModel.hpp:59
Model for displaying accounts fetched from the server via client.
Definition ClientAccountModel.hpp:71
Manages the lifecycle of the NATS client and login state.
Definition ClientManager.hpp:112
Base class for entity list MDI windows providing stale indicator support.
Definition EntityListMdiWindow.hpp:62
Widget providing pagination controls for data tables.
Definition PaginationWidget.hpp:39