|
| | 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.
|
| |
| virtual void | showListWindow ()=0 |
| | Shows the main list window for this entity. Must be implemented by derived classes.
|
| |
| virtual void | closeAllWindows ()=0 |
| | Closes all windows managed by this controller. Must be implemented by derived classes.
|
| |
|
| 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.
|
| |
Abstract base class for entity controllers.
Entity controllers manage the lifecycle of windows related to specific data entities (like currencies, accounts, etc.). This base class provides common functionality for managing windows, tracking them for reuse, and handling the client connection.