|
ORE Studio 0.0.4
|
Controller managing all currency-related windows and operations. More...
#include <CurrencyController.hpp>


Public Member Functions | |
| CurrencyController (QMainWindow *mainWindow, QMdiArea *mdiArea, ClientManager *clientManager, const QString &username, QList< DetachableMdiSubWindow * > &allDetachableWindows, QObject *parent=nullptr) | |
| Constructs the currency controller. | |
| ~CurrencyController () override | |
| Destroys the currency controller. | |
| void | showListWindow () override |
| Shows the currency list window. | |
| void | closeAllWindows () override |
| Closes all windows managed by this controller. | |
Public Member Functions inherited from EntityController | |
| EntityController (QMainWindow *mainWindow, QMdiArea *mdiArea, ClientManager *clientManager, const QString &username, QObject *parent=nullptr) | |
| Constructs an entity controller. | |
| void | setClientManager (ClientManager *clientManager, const QString &username) |
| Updates the client manager and username (e.g. after re-login). | |
| void | setUsername (const QString &username) |
| Updates just the username. | |
Additional Inherited Members | |
Signals inherited from EntityController | |
| void | statusMessage (const QString &message) |
| Emitted when a status message should be shown to the user. | |
| void | errorMessage (const QString &message) |
| Emitted when an error message should be shown to the user. | |
Protected Member Functions inherited from EntityController | |
| QString | build_window_key (const QString &windowType, const QString &identifier) const |
| Generates a unique key for tracking windows. | |
| bool | try_reuse_window (const QString &key) |
| Tries to reuse an existing window if one exists for the key. | |
| void | bring_window_to_front (DetachableMdiSubWindow *window) |
| Activates the specified window, handling detached state. | |
| void | track_window (const QString &key, DetachableMdiSubWindow *window) |
| Registers a window for tracking. | |
| void | untrack_window (const QString &key) |
| Unregisters a window from tracking. | |
Protected Attributes inherited from EntityController | |
| QMainWindow * | mainWindow_ |
| QMdiArea * | mdiArea_ |
| ClientManager * | clientManager_ |
| QString | username_ |
| QMap< QString, DetachableMdiSubWindow * > | managed_windows_ |
| Map of active windows indexed by unique key. | |
Controller managing all currency-related windows and operations.
The CurrencyController encapsulates all currency-specific functionality, including:
This controller follows the entity controller pattern where MainWindow delegates all currency operations to this controller, keeping the main window clean and entity-agnostic.
|
explicit |
Constructs the currency controller.
| mainWindow | Parent main window (for dialog ownership) |
| mdiArea | MDI area where windows will be displayed |
| clientManager | Client manager for network operations |
| username | Username of logged-in user (for audit trails) |
| allDetachableWindows | Reference to MainWindow's window list for detach/reattach operations |
| parent | QObject parent (for Qt ownership) |
|
override |
Destroys the currency controller.
All windows owned by this controller are automatically cleaned up through Qt's parent-child ownership.
|
overridevirtual |
Shows the currency list window.
If the window already exists, brings it to front. Otherwise, creates a new currency list window displaying all currencies from the server.
Implements EntityController.
|
overridevirtual |
Closes all windows managed by this controller.
Called when disconnecting from the server to clean up all currency windows before destroying the controller.
Implements EntityController.