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"
46 inline static std::string_view logger_name =
47 "ores.qt.account_mdi_window";
49 [[nodiscard]]
static auto& lg() {
51 static auto instance = make_logger(logger_name);
57 const QString& username,
58 QWidget* parent =
nullptr);
64 void statusChanged(
const QString& message);
65 void errorOccurred(
const QString& error_message);
66 void selectionChanged(
int selection_count);
67 void addNewRequested();
69 void showAccountHistory(
const QString& username);
70 void showSessionHistory(
const boost::uuids::uuid& accountId,
const QString& username);
71 void accountDeleted(
const boost::uuids::uuid& account_id);
74 void doReload()
override;
77 void deleteSelected();
79 void unlockSelected();
80 void resetPasswordSelected();
81 void viewHistorySelected();
82 void viewSessionsSelected();
86 void onLoadError(
const QString& error_message,
const QString& details = {});
87 void onRowDoubleClicked(
const QModelIndex& index);
88 void onSelectionChanged();
89 void onConnectionStateChanged();
93 return tr(
"Refresh accounts");
97 void updateActionStates();
98 void setupReloadAction();
101 QVBoxLayout* verticalLayout_;
102 QTableView* accountTableView_;
107 QAction* reloadAction_;
110 QAction* editAction_;
111 QAction* deleteAction_;
112 QAction* lockAction_;
113 QAction* unlockAction_;
114 QAction* resetPasswordAction_;
115 QAction* historyAction_;
116 QAction* sessionsAction_;
118 std::unique_ptr<ClientAccountModel> accountModel_;
119 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:42
QString normalRefreshTooltip() const override
Get the normal (non-stale) tooltip text for the refresh action.
Definition AccountMdiWindow.hpp:92
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:109
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