20#ifndef ORES_QT_ACCOUNT_MDI_WINDOW_HPP
21#define ORES_QT_ACCOUNT_MDI_WINDOW_HPP
29#include <QSortFilterProxyModel>
31#include "ores.qt/ClientManager.hpp"
32#include "ores.utility/log/make_logger.hpp"
33#include "ores.qt/ClientAccountModel.hpp"
34#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,
60 QWidget* parent =
nullptr);
65 QSize sizeHint()
const override;
68 void statusChanged(
const QString& message);
69 void errorOccurred(
const QString& error_message);
70 void selectionChanged(
int selection_count);
71 void addNewRequested();
73 void showAccountHistory(
const QString& username);
74 void accountDeleted(
const boost::uuids::uuid& account_id);
80 void deleteSelected();
82 void unlockSelected();
83 void resetPasswordSelected();
84 void viewHistorySelected();
104 void onLoadError(
const QString& error_message);
105 void onRowDoubleClicked(
const QModelIndex& index);
106 void onSelectionChanged();
107 void onConnectionStateChanged();
110 void updateActionStates();
111 void setupReloadAction();
112 void startPulseAnimation();
113 void stopPulseAnimation();
116 QVBoxLayout* verticalLayout_;
117 QTableView* accountTableView_;
122 QAction* reloadAction_;
123 QIcon normalReloadIcon_;
124 QIcon staleReloadIcon_;
126 bool pulseState_{
false};
130 QAction* editAction_;
131 QAction* deleteAction_;
132 QAction* lockAction_;
133 QAction* unlockAction_;
134 QAction* resetPasswordAction_;
135 QAction* historyAction_;
137 std::unique_ptr<ClientAccountModel> accountModel_;
138 QSortFilterProxyModel* proxyModel_;
141 bool isStale_{
false};
Qt-based graphical user interface for ORE Studio.
Definition AboutDialog.hpp:35
Implements logging for ORE Studio.
Definition lifecycle_manager.hpp:30
MDI window for displaying and managing user accounts.
Definition AccountMdiWindow.hpp:44
void clearStaleIndicator()
Clear the stale indicator.
Definition AccountMdiWindow.cpp:1077
void markAsStale()
Mark the data as stale (changed on server).
Definition AccountMdiWindow.cpp:1068
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:56
Widget providing pagination controls for data tables.
Definition PaginationWidget.hpp:38