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);
63 QSize sizeHint()
const override;
66 void statusChanged(
const QString& message);
67 void errorOccurred(
const QString& error_message);
68 void selectionChanged(
int selection_count);
69 void addNewRequested();
71 void showAccountHistory(
const QString& username);
72 void showSessionHistory(
const boost::uuids::uuid& accountId,
const QString& username);
73 void accountDeleted(
const boost::uuids::uuid& account_id);
76 void reload()
override;
79 void deleteSelected();
81 void unlockSelected();
82 void resetPasswordSelected();
83 void viewHistorySelected();
84 void viewSessionsSelected();
88 void onLoadError(
const QString& error_message,
const QString& details = {});
89 void onRowDoubleClicked(
const QModelIndex& index);
90 void onSelectionChanged();
91 void onConnectionStateChanged();
95 return tr(
"Refresh accounts");
99 void updateActionStates();
100 void setupReloadAction();
103 QVBoxLayout* verticalLayout_;
104 QTableView* accountTableView_;
109 QAction* reloadAction_;
112 QAction* editAction_;
113 QAction* deleteAction_;
114 QAction* lockAction_;
115 QAction* unlockAction_;
116 QAction* resetPasswordAction_;
117 QAction* historyAction_;
118 QAction* sessionsAction_;
120 std::unique_ptr<ClientAccountModel> accountModel_;
121 QSortFilterProxyModel* proxyModel_;
Implements logging infrastructure for ORE Studio.
Definition boost_severity.hpp:28
Qt-based graphical user interface for ORE Studio.
Definition AboutDialog.hpp:35
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:94
Composite structure combining account with its login status.
Definition ClientAccountModel.hpp:57
Model for displaying accounts fetched from the server via client.
Definition ClientAccountModel.hpp:68
Manages the lifecycle of the network client and IO context.
Definition ClientManager.hpp:90
Base class for entity list MDI windows providing stale indicator support.
Definition EntityListMdiWindow.hpp:56
Widget providing pagination controls for data tables.
Definition PaginationWidget.hpp:39