diff --git a/docs/developers/PlantUml/UserScripts.puml b/docs/developers/PlantUml/UserScripts.puml index 08cf370d..e8ba557b 100644 --- a/docs/developers/PlantUml/UserScripts.puml +++ b/docs/developers/PlantUml/UserScripts.puml @@ -2,6 +2,20 @@ namespace MellowPlayer.Application { +class ISettingsProvider + +class UserScripts { + - _items: QList + + UserScripts(QString serviceName); + + count() : int + + at(int) : IUserScript* + + toList() : QList + + remove(QString) + + add(IUserScript* userScript) +} +UserScripts "*" -> IUserScript +UserScripts "*" --> ISettingsProvider + interface IUserScript { path(): QString name(): QString @@ -24,12 +38,11 @@ class UserScriptBase { IUserScript <|-- UserScriptBase class StreamingService { - - _userScripts: QList - + addUserScript(IUserScript* script) - + userScripts(): QList + - _userScripts: UserScripts* + + userScripts(): UserScripts* } -StreamingService "*" -> IUserScript +StreamingService -right-> UserScripts } @@ -42,16 +55,15 @@ class UserScript { MellowPlayer.Application.UserScriptBase <|-- UserScript -class StreamingServiceLoader { - + load() -} - -StreamingServiceLoader .left..> UserScript: <> -StreamingServiceLoader .> MellowPlayer.Application.StreamingService: <> - } namespace MellowPlayer.Presentation { + class UserScriptsViewModel { + - _userScripts: ListModel + + model(): ListModel + + addScript(QString path) + + removeScript(QString name) + } class UserScriptViewModel { - _userScript: IUserScript& + code(): QString @@ -61,14 +73,14 @@ namespace MellowPlayer.Presentation { } class StreamingServiceViewModel { - - _userScripts: ListModel - + userScripts(): ListModel - + addScript(QString path) - + removeScript(QString name) + + userScripts(): UserScriptViewModel* } + StreamingServiceViewModel -> UserScriptsViewModel + StreamingServiceViewModel --> MellowPlayer.Application.StreamingService + UserScriptsViewModel --> MellowPlayer.Application.UserScripts UserScriptViewModel --> MellowPlayer.Application.IUserScript - StreamingServiceViewModel "*" -> UserScriptViewModel + UserScriptsViewModel "*" -> UserScriptViewModel } @enduml