docs: Describe MVC architecture in CONTEXT.md
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
14
CONTEXT.md
14
CONTEXT.md
@@ -8,7 +8,19 @@ Don't ask for unrelated files to be added to the chat.
|
||||
|
||||
## Architecture
|
||||
|
||||
...
|
||||
The application is structured using a Model-View-Controller (MVC) architecture to ensure a clear separation of concerns, making the codebase easier to maintain and extend.
|
||||
|
||||
* **Model:** This layer represents the application's data and business logic. It knows nothing about the user interface.
|
||||
* `Document`: Manages the collection of all features.
|
||||
* `Feature`, `SketchFeature`: Represent individual components or operations in the CAD model.
|
||||
|
||||
* **View:** This layer is responsible for displaying the data from the Model and capturing user input. It should be as "dumb" as possible, delegating all actions to the Controller.
|
||||
* `MainWindow`: The main application window, toolbars, and menus.
|
||||
* `ViewportWidget`: The 3D OpenGL viewport for rendering the model.
|
||||
* `FeatureBrowser`: The UI component that lists the features in the document.
|
||||
|
||||
* **Controller:** This layer acts as the intermediary between the Model and the View. It contains the application's core logic.
|
||||
* `ApplicationController`: The "brains" of the application. It is created in `main()` and passed to the UI. It responds to user actions from the View, manipulates the Model, and uses signals and slots to notify the View of any state changes.
|
||||
|
||||
## Development Log
|
||||
|
||||
|
||||
Reference in New Issue
Block a user