20#ifndef ORES_QT_MAIN_WINDOW_HPP
21#define ORES_QT_MAIN_WINDOW_HPP
26#include <QSystemTrayIcon>
30#include "ores.qt/ClientManager.hpp"
31#include "ores.qt/MdiAreaWithBackground.hpp"
32#include "ores.eventing/service/event_bus.hpp"
33#include "ores.utility/log/make_logger.hpp"
34#include "ui_MainWindow.h"
44class DetachableMdiSubWindow;
45class CurrencyController;
46class AccountController;
74 inline static std::string_view logger_name =
"ores.qt.main_window";
76 [[nodiscard]]
static auto& lg() {
78 static auto instance = make_logger(logger_name);
91 explicit MainWindow(QWidget* parent =
nullptr);
119 void onLoginTriggered();
124 void onDisconnectTriggered();
129 void onAboutTriggered();
134 void onMyAccountTriggered();
139 void onDetachAllTriggered();
147 void onWindowMenuAboutToShow();
157 void updateMenuState();
165 void createControllers();
170 void performDisconnectCleanup();
180 QLabel* connectionStatusIconLabel_;
188 QList<DetachableMdiSubWindow*> allDetachableWindows_;
191 QIcon connectedIcon_;
194 QIcon disconnectedIcon_;
197 QIcon reconnectingIcon_;
206 std::unique_ptr<CurrencyController> currencyController_;
214 std::unique_ptr<AccountController> accountController_;
217 std::shared_ptr<eventing::service::event_bus> eventBus_;
223 std::string username_;
226 QSystemTrayIcon* systemTrayIcon_;
229 QMenu* trayContextMenu_;
232 std::vector<eventing::service::subscription> eventSubscriptions_;
Qt-based graphical user interface for ORE Studio.
Definition AboutDialog.hpp:35
Implements logging for ORE Studio.
Definition lifecycle_manager.hpp:30
Manages the lifecycle of the network client and IO context.
Definition ClientManager.hpp:56
Main application window providing the MDI interface and entity management.
Definition MainWindow.hpp:70
ClientManager * getClientManager() const
Get the client manager.
Definition MainWindow.hpp:101
~MainWindow() override
Destroys the main window.
Definition MainWindow.cpp:291
void closeEvent(QCloseEvent *event) override
Handles the close event for the main window.
Definition MainWindow.cpp:271
Custom QMdiArea that displays a background logo when no windows are open.
Definition MdiAreaWithBackground.hpp:32