summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOrangerot <purple@orangerot.dev>2024-08-16 22:04:42 +0200
committerOrangerot <purple@orangerot.dev>2024-08-16 22:04:42 +0200
commit4956818d53f22fa3cda483852c57f66432b7d127 (patch)
treed3268a6f6b5e0e922032c08aa2b2838ad3535bdf
parent8cf2692f65cdc9b47f744c997dd6393b682492bc (diff)
feat(README): UML Diagram
-rw-r--r--README.md115
1 files changed, 93 insertions, 22 deletions
diff --git a/README.md b/README.md
index 94ed927..7ff0581 100644
--- a/README.md
+++ b/README.md
@@ -24,38 +24,109 @@ cmake --build build
### UML Diagram
```plantuml
-class Application {
- QGuiApplication app
- QmlComponent component
- SportModel model
- FilterModel<SportModel> filter
+@startuml
+allowmixing
+set namespaceSeparator none
+skinparam ranksep 10
+
+package C++ <<Frame>> {
+ class Application {
+ QGuiApplication app
+ QmlComponent component
+ SportModel model
+ FilterModel<SportModel> filter
+ }
+
+ class SportModel {
+ String discipline
+ <EventInfo> model
+ request(String discipline)
+ parseData()
+ }
+
+ class FilterModel {
+ void setFilterFixedString(String)
+ }
+
+ class EventInfo {
+ String eventName
+ List<Competitor> competitors
+ }
+
+ class Competitor {
+ String name
+ String code
+ String noc
+ }
}
-class SportModel {
- String discipline
- <EventInfo> model
- request(String discipline)
- parseData()
+package QML <<Frame>> {
+
+ component EventInfoPage {
+ component [Page] as EIPage {
+ component [ToolBar] as EIToolBar
+ component [ListView] as EILisView
+ }
+ }
+
+ EIToolBar -[hidden]- EILisView
+
+ component EventsPage {
+ component [Page] as EPage {
+ component [ToolBar] as EToolBar
+ component [Column] as EColumn {
+ component [Row] as ERow {
+ component [ComboBox] as EComboBox
+ component [TextField] as ETextField
+ }
+ component [ListView] as EListView
+ }
+ }
+ }
+
+ EToolBar -[hidden]- EColumn
+ ERow -[hidden]- EListView
+
+ component application.qml {
+ component ApplicationWindow {
+ component StackView
+ }
+ }
}
-class FilterModel {}
-
-class EventInfo {
- String eventName
- List<Competitor> competitors
-}
-
-class Competitor {
- String name
- String code
- String noc
-}
+'application.qml -u- a
+'Application -r- a
Application *-- "1" SportModel
Application *-- "1" FilterModel
+FilterModel "1" o-- "1" SportModel
+
SportModel *-- "0..*" EventInfo
EventInfo *-- "0..*" Competitor
+
+Application <.l. application.qml
+StackView <.. EventInfoPage
+StackView <.. EventsPage
+
+EComboBox "request()" .> SportModel
+
+EComboBox -[hidden]u- ETextField
+
+SportModel "View" .> EListView
+FilterModel "View" .> EListView
+ETextField "Control" .r.> FilterModel
+
+EILisView <. "View" Competitor
+
+cloud api.olympics.com
+() REST
+REST - api.olympics.com
+
+SportModel -( REST
+
+application.qml -[hidden]u- Application
+@enduml
```
## Authors