mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-09-20 15:24:14 +02:00
Add QET 2.0 refactoring initiative to History page
- Document code refactoring goals and rationale - Explain file format evolution (.elmt → .selmt, .qet → SQLite structure) - Detail architectural improvements (ActionPool, persistence layer, conductor system) - Add context: Joshua inherited project with technical debt in 2012 - Explain modern design patterns for maintainability Source: qelectrotech.org/wiki_new/refonte_du_code_de_qelectrotech Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GtMZqGEiUMvDBqcFvVG2vb
@@ -76,3 +76,45 @@ Gathered from: qelectrotech.org, qelectrotech.org/wiki_new/, qelectrotech.org/fo
|
||||
- License: GNU/GPL
|
||||
- Actively maintained with regular features and translations
|
||||
- Version 0.100.1 or 0.200.0 planned with newer Qt6 framework
|
||||
|
||||
## From QET Code Refactoring Wiki (refonte_du_code_de_qelectrotech)
|
||||
|
||||
### QET 2.0 Refactoring Initiative
|
||||
|
||||
This is a major architectural redesign effort to address accumulated technical debt and modernize the codebase.
|
||||
|
||||
#### Historical Context
|
||||
- **2006** — QET started as a student project with architectural limitations
|
||||
- **2012** — Original creator left, Joshua inherited the project
|
||||
- **Problem:** "Spaghetti code" and poor modularity accumulated over time
|
||||
- **Solution:** Comprehensive refactoring (QET 2.0)
|
||||
|
||||
#### Refactoring Goals
|
||||
1. Decouple code into distinct, well-separated modules
|
||||
2. Remove band-aid solutions
|
||||
3. Improve code clarity
|
||||
4. Restructure for modern functionality
|
||||
5. Enhance maintainability for external contributors
|
||||
|
||||
#### Major Technical Changes
|
||||
|
||||
**File Format Redesign:**
|
||||
- `.elmt` → `.selmt` (with proper SVG namespace)
|
||||
- Direct SVG import capability in element editor
|
||||
- Separate graphical from non-graphical data (dynamic text, terminals, info)
|
||||
|
||||
- `.qet` → **zipped structure with SQLite database**
|
||||
- Simplified .qet file with folio lists and element coordinates
|
||||
- SQLite database for comprehensive metadata
|
||||
- Separate folders for images, elements, title blocks
|
||||
- UUID-based cross-referencing
|
||||
|
||||
**Architectural Improvements:**
|
||||
- **ActionPool singleton** — Centralize QActions from QetDiagramEditor
|
||||
- **Persistence layer abstraction** — Separate serialization from domain logic
|
||||
- **Conductor system redesign** — Electrical potential as first-class concept with inheritance
|
||||
- **Element prefix standardization** — Unified system
|
||||
- **Auto-numbering simplification** — Intelligent formula support
|
||||
- **Xref flexibility** — Enhanced cross-reference system
|
||||
- **Text rendering** — Switch from points to pixels
|
||||
- **Independent text handling** — Simplified structure
|
||||
|
||||
+28
@@ -157,6 +157,34 @@ From basic diagram drawing to:
|
||||
- Custom element creation
|
||||
- Multi-diagram projects
|
||||
|
||||
### QET 2.0 Refactoring Initiative
|
||||
|
||||
As QElectroTech matured, accumulated technical debt from the original architecture needed addressing. In **2012**, after the original creator's departure, Joshua and subsequent developers recognized the need for a comprehensive refactoring:
|
||||
|
||||
**The Challenge:** Spaghetti code, poor modularity, and band-aid solutions had accumulated over years of development.
|
||||
|
||||
**The Solution:** QET 2.0 — A major architectural redesign addressing:
|
||||
|
||||
- **Code modularity** — Decouple into distinct, well-separated modules
|
||||
- **Action management** — Centralize scattered QActions with an ActionPool singleton
|
||||
- **File formats** — Modernize from flat XML to structured, efficient formats
|
||||
- **Persistence layer** — Abstract serialization from domain logic
|
||||
- **Conductor system** — Introduce electrical potential as a first-class concept
|
||||
|
||||
**File Format Evolution:**
|
||||
- **Elements:** `.elmt` → `.selmt` (with proper SVG namespace, direct SVG import)
|
||||
- **Projects:** `.qet` → Zipped structure with SQLite database for metadata
|
||||
- **Structure:** Separate folders for images, elements, title blocks with UUID-based cross-referencing
|
||||
|
||||
**Additional Improvements:**
|
||||
- Element prefix system standardization
|
||||
- Intelligent auto-numbering with formula support
|
||||
- Enhanced cross-reference (xref) system
|
||||
- Text rendering modernization (points → pixels)
|
||||
- Simplified independent text handling
|
||||
|
||||
This refactoring represents the project's commitment to long-term maintainability and enabling external contributors to work effectively with the codebase.
|
||||
|
||||
---
|
||||
|
||||
## Future Direction
|
||||
|
||||
Reference in New Issue
Block a user