34 lines
1.5 KiB
TeX
34 lines
1.5 KiB
TeX
\begin{tikzpicture}
|
|
\node[umlDetail] {
|
|
\textbf{tkrMainWindow}\quad\textit{final; View / assembly; extends QMainWindow}
|
|
\nodepart{second}
|
|
\textbf{Responsibilities}\\
|
|
Assemble and own components; connect controls and controller signals.\\
|
|
Display read-only source, status, file title, and unsaved-state prompts.\\
|
|
Ask the controller to open/save; accept or reject a close request.
|
|
\nodepart{third}\ttfamily
|
|
\normalfont\textbf{Private attributes}\ttfamily\\
|
|
- m\_document: tkrTikzDocument\quad\normalfont(owned value)\ttfamily\\
|
|
- m\_pScene: tkrDiagramScene* = nullptr\\
|
|
- m\_pView: tkrDiagramView* = nullptr\\
|
|
- m\_pSidebar: tkrWorkspaceSidebar* = nullptr\\
|
|
- m\_pSourceView: QPlainTextEdit* = nullptr\\
|
|
- m\_pSaveAction: QAction* = nullptr\\
|
|
- m\_pUndoAction, m\_pRedoAction: QAction* = nullptr\\
|
|
- m\_upController: std::unique\_ptr<tkrEditorController>\\
|
|
\normalfont\textit{Scene/widgets/actions use QObject parent ownership.}
|
|
\nodepart{fourth}\ttfamily
|
|
\normalfont\textbf{Public lifetime operations}\ttfamily\\
|
|
+ tkrMainWindow(pParent: QWidget* = nullptr,\\
|
|
\hspace*{1em}strInitialFilePath: const QString\& = \{\}) [explicit]\\
|
|
+ \textasciitilde tkrMainWindow() [override]\\[3pt]
|
|
\normalfont\textbf{Protected operation}\ttfamily\\
|
|
\# closeEvent(pEvent: QCloseEvent*): void [override]\\[3pt]
|
|
\normalfont\textbf{Private operations}\ttfamily\\
|
|
- openDocument(): void\\
|
|
- saveDocument(): bool\\
|
|
- confirmDiscardOrSave(): bool\\
|
|
- updateDocumentView(): void
|
|
};
|
|
\end{tikzpicture}
|