|
SILICON
|
#include <projectDocumentController.hpp>
Signals | |
| void | activeDocumentChanged (const QString &path, SILICON::project::DocumentCategory category) |
| Emitted after a document was loaded and made visible. | |
| void | projectDocumentsChanged () |
| Emitted when the set of project documents was added to, changed, or removed. | |
Public Member Functions | |
| ProjectDocumentController (ProjectSession &session, EditorWorkspace &workspace, ProjectTree &tree, ComponentCatalogOverlay &catalog, QUndoStack &undoStack, QWidget *dialogParent) | |
| const std::string & | currentDocumentPath () const noexcept override |
| bool | activateDocument (const std::string &path) override |
| bool | switchToDocument (const std::string &path, bool selectInTree) |
| void | selectDocument (const std::string &path) |
| void | rebuildTree () |
| void | notifyActiveDocumentActivated () |
| Publishes the active document to observers. | |
| void | restoreProjectDocuments (const std::vector< SILICON::project::Document > &documents, const std::string &activePath) |
| void | removeDocument (const std::string &path) |
| void | insertDocument (SILICON::project::Document document, std::optional< std::ptrdiff_t > insertAt, bool activate) |
| void | showArchitectureTabContextMenu (const QPoint &position) |
| void | createCircuit () |
| void | createCodeFile () |
| void | createBinaryFile () |
| void | createArchitecture () |
| void | importProjectDocument () |
| void | exportSelectedDocument () |
| void | renameSelectedDocument () |
| void | deleteSelectedDocument () |
| void | convertActiveDocument () |
| Public Member Functions inherited from DocumentNavigator | |
| virtual | ~DocumentNavigator ()=default |
Private Member Functions | |
| void | createDocument (SILICON::project::DocumentType type) |
| void | pushCreateDocumentCommand (SILICON::project::Document document, const QString &commandText) |
| void | pushDocumentSnapshotCommand (QString commandText, std::vector< SILICON::project::Document > before, std::string beforeActive, std::vector< SILICON::project::Document > after, std::string afterActive) |
| void | renameArchitecture (const std::string &name) |
| void | deleteArchitecture (const std::string &name) |
| void | deleteArchitectureComponent (const std::string &path) |
| void | removeProjectDocuments (const std::vector< std::string > &paths, const QString &commandText) |
| void | commitDocumentChanges (std::vector< SILICON::project::Document > documents, const std::string &sourcePath, const std::string &activatePath, const QString &commandText, const QString &errorTitle) |
| void | convertActiveDocumentTo (SILICON::project::DocumentType target) |
| void | reportLoadFailure (SILICON::project::DocumentType type, const std::string &reason) |
| Reports a rejected document activation to the user. | |
Private Attributes | |
| ProjectSession & | session |
| EditorWorkspace & | workspace |
| ProjectTree * | projectTree |
| ComponentCatalogOverlay & | catalog |
| QUndoStack * | undoStack |
| QWidget * | dialogParent |
Coordinates document activation, editor payloads, and project tree state.
Definition at line 35 of file projectDocumentController.hpp.
| ProjectDocumentController | ( | ProjectSession & | session, |
| EditorWorkspace & | workspace, | ||
| ProjectTree & | tree, | ||
| ComponentCatalogOverlay & | catalog, | ||
| QUndoStack & | undoStack, | ||
| QWidget * | dialogParent ) |
Definition at line 32 of file projectDocumentController.cpp.
|
overridevirtual |
Implements DocumentNavigator.
Definition at line 50 of file projectDocumentController.cpp.
|
signal |
Emitted after a document was loaded and made visible.
Never emitted for a rejected document, so receivers can rely on the editor showing path when they react to it.
| path | Project path of the active document |
| category | Editor category that now owns the document |
|
private |
Definition at line 455 of file projectDocumentActions.cpp.
| void convertActiveDocument | ( | ) |
Definition at line 199 of file projectDocumentConversion.cpp.
|
private |
Definition at line 234 of file projectDocumentConversion.cpp.
| void createArchitecture | ( | ) |
Definition at line 47 of file projectArchitectureActions.cpp.
| void createBinaryFile | ( | ) |
Definition at line 186 of file projectDocumentActions.cpp.
| void createCircuit | ( | ) |
Definition at line 126 of file projectDocumentActions.cpp.
| void createCodeFile | ( | ) |
Definition at line 131 of file projectDocumentActions.cpp.
|
private |
Definition at line 241 of file projectDocumentActions.cpp.
|
nodiscardoverridevirtualnoexcept |
Implements DocumentNavigator.
Definition at line 45 of file projectDocumentController.cpp.
|
private |
Definition at line 173 of file projectArchitectureActions.cpp.
|
private |
Definition at line 102 of file projectArchitectureActions.cpp.
| void deleteSelectedDocument | ( | ) |
Definition at line 385 of file projectDocumentActions.cpp.
| void exportSelectedDocument | ( | ) |
Definition at line 99 of file projectDocumentActions.cpp.
| void importProjectDocument | ( | ) |
Definition at line 73 of file projectDocumentActions.cpp.
| void insertDocument | ( | SILICON::project::Document | document, |
| std::optional< std::ptrdiff_t > | insertAt, | ||
| bool | activate ) |
Definition at line 201 of file projectDocumentController.cpp.
| void notifyActiveDocumentActivated | ( | ) |
Publishes the active document to observers.
Callers that load a document into the workspace themselves use this to announce the resulting activation.
Definition at line 96 of file projectDocumentController.cpp.
|
signal |
Emitted when the set of project documents was added to, changed, or removed.
|
private |
Definition at line 55 of file projectDocumentActions.cpp.
|
private |
Definition at line 263 of file projectDocumentActions.cpp.
| void rebuildTree | ( | ) |
Definition at line 223 of file projectDocumentController.cpp.
| void removeDocument | ( | const std::string & | path | ) |
Definition at line 182 of file projectDocumentController.cpp.
|
private |
Definition at line 334 of file projectDocumentActions.cpp.
|
private |
Definition at line 117 of file projectArchitectureActions.cpp.
| void renameSelectedDocument | ( | ) |
Definition at line 278 of file projectDocumentActions.cpp.
|
private |
Reports a rejected document activation to the user.
Definition at line 110 of file projectDocumentController.cpp.
| void restoreProjectDocuments | ( | const std::vector< SILICON::project::Document > & | documents, |
| const std::string & | activePath ) |
Definition at line 64 of file projectDocumentController.cpp.
| void selectDocument | ( | const std::string & | path | ) |
Definition at line 105 of file projectDocumentController.cpp.
| void showArchitectureTabContextMenu | ( | const QPoint & | position | ) |
Definition at line 74 of file projectArchitectureActions.cpp.
| bool switchToDocument | ( | const std::string & | path, |
| bool | selectInTree ) |
Definition at line 120 of file projectDocumentController.cpp.
|
private |
Definition at line 116 of file projectDocumentController.hpp.
|
private |
Definition at line 118 of file projectDocumentController.hpp.
|
private |
Definition at line 115 of file projectDocumentController.hpp.
|
private |
Definition at line 113 of file projectDocumentController.hpp.
|
private |
Definition at line 117 of file projectDocumentController.hpp.
|
private |
Definition at line 114 of file projectDocumentController.hpp.