|
|
## Enumerations present in the code base
|
|
|
|
|
|
```java
|
|
|
Enum VivyDocument_Capability {
|
|
|
AssAble
|
|
|
VideoAble
|
|
|
AudioAble
|
|
|
}
|
|
|
|
|
|
Enum VivyDocument_Option {
|
|
|
NoOption
|
|
|
UntouchedByDefault
|
|
|
MemoryDocumentCreation
|
|
|
}
|
|
|
```
|
|
|
|
|
|
## Global UML Class Diagram
|
|
|
|
|
|
```mermaid
|
|
|
classDiagram
|
|
|
direction TB
|
|
|
|
|
|
%% The TopLevel Application
|
|
|
class VivyApplication {
|
|
|
+Font getApplicationFont(VivyApplication_FontId)
|
|
|
+Ptr~MainWindow~ getMainWindow()
|
|
|
+Ptr~AbstractDocument~ getCurrentDocument()
|
|
|
}
|
|
|
|
|
|
%% LIB classes
|
|
|
class ScriptDocument {
|
|
|
-Ptr~QTextDocument~ textDocument
|
|
|
+attachTextDocument(Ptr~QTextDocument~)
|
|
|
}
|
|
|
class VivyDocument {
|
|
|
+bool loadSubDocument(String)
|
|
|
+bool loadSubDocument(String, VivyDocument_Capability)
|
|
|
+bool checkDocumentCapabilities(VivyDocument_Capability)
|
|
|
+bool checkDocumentOptions(VivyDocument_Option)
|
|
|
+SharedPtr~AudioSubDocument~ getAudioSubDocument()
|
|
|
+SharedPtr~VideoSubDocument~ getVideoSubDocument()
|
|
|
+SharedPtr~AssSubDocument~ getAssSubDocument()
|
|
|
}
|
|
|
class AbstractDocument {
|
|
|
<<Abstract>>
|
|
|
+copy(String)*
|
|
|
+rename(String)*
|
|
|
+save()*
|
|
|
|
|
|
+String getName()
|
|
|
+Type getType()
|
|
|
+Uuid getUuid()
|
|
|
}
|
|
|
class ScriptStore {
|
|
|
<<Store>>
|
|
|
+loadScriptFolder(String)
|
|
|
+executeScript(Uuid)
|
|
|
+executeScript(Uuid, SharedPtr~VivyDocument~)
|
|
|
+String getLastLuaError()
|
|
|
-UniquePtr~LuaContext~ luaContext
|
|
|
}
|
|
|
class VivyDocumentStore {
|
|
|
<<Store>>
|
|
|
+newDocument(VivyDocument_Option)
|
|
|
}
|
|
|
class CRTPStore~Document~ {
|
|
|
<<Interface>>
|
|
|
+SharedPtr~Document~ loadDocument()
|
|
|
+SharedPtr~Document~ getDocument()
|
|
|
+closeDocument(Uuid)
|
|
|
+bool isDocumentPresent(Uuid)
|
|
|
}
|
|
|
|
|
|
%% Here comes the different relations
|
|
|
VivyDocumentStore ..|> CRTPStore
|
|
|
ScriptStore ..|> CRTPStore
|
|
|
|
|
|
VivyDocument --|> AbstractDocument
|
|
|
ScriptDocument --|> AbstractDocument
|
|
|
|
|
|
VivyDocumentStore --> "*" VivyDocument
|
|
|
ScriptStore --> "*" ScriptDocument
|
|
|
|
|
|
VivyDocumentStore --* VivyApplication
|
|
|
ScriptStore --* VivyApplication
|
|
|
```
|
|
|
|
|
|
## UI UML Class Diagram
|
|
|
|
|
|
```mermaid
|
|
|
classDiagram
|
|
|
direction TB
|
|
|
|
|
|
class AbstractDocumentView {
|
|
|
+closeDocument()*
|
|
|
+openProperties()*
|
|
|
+String getDocumentTabName()*
|
|
|
+String getDocumentTabToolTip()*
|
|
|
+Icon getDocumentTabIcon()*
|
|
|
+Ptr~AbstractDocument~ getDocument()*
|
|
|
+List~QActionPtr~ getViewsActions()
|
|
|
+bool isType(Utils_DocumentType)
|
|
|
+Type getType()
|
|
|
#delDockWidget(PPtr~Dock~)
|
|
|
#addDockWidget(Qt_DockWidgetArea, Ptr~Dock~, Qt_Orientation)
|
|
|
#List~QActionPtr~ viewsActions
|
|
|
}
|
|
|
class VivyDocumentView {
|
|
|
-Ptr~AudioVisualizer~ visualizer
|
|
|
-Ptr~VideoView~ videoWidget
|
|
|
-Ptr~AssView~ assView
|
|
|
}
|
|
|
class ScriptDocumentView {
|
|
|
-Ptr~QTextEdit~ scriptEditor
|
|
|
}
|
|
|
class MainWindow {
|
|
|
-QTabWidget~AbstractDocumentView~ documents
|
|
|
}
|
|
|
|
|
|
VivyDocumentView --|> AbstractDocumentView
|
|
|
ScriptDocumentView --|> AbstractDocumentView
|
|
|
MainWindow --> AbstractDocumentView : documents
|
|
|
```
|
|
|
|
|
|
## Script Lua Bindings (script_object)
|
|
|
|
|
|
```
|
|
|
DeclareModule {
|
|
|
imports: DeclareModule*
|
|
|
jobs: DeclareJob | ImportJob
|
|
|
functions: DeclareFunction | ImportFunction
|
|
|
description: String
|
|
|
author: String
|
|
|
name: String
|
|
|
revision: String
|
|
|
}
|
|
|
|
|
|
OptionDeclaration {
|
|
|
options: List<ScriptOption>
|
|
|
}
|
|
|
|
|
|
ScriptOption {
|
|
|
name: String
|
|
|
type: LuaType | VivyType
|
|
|
default_value: type
|
|
|
}
|
|
|
|
|
|
DeclareJob | ImportJob {
|
|
|
name: String
|
|
|
origin_script: String
|
|
|
iterator_type: LINE | SYLLABE
|
|
|
function: LuaFunction (opt, LINE | SYLLABE) -> LINE | SYLLABE
|
|
|
options: List<OptionDeclaration> => flatted into OptionDeclaration
|
|
|
}
|
|
|
|
|
|
DeclareFunction | ImportFunction {
|
|
|
name: String
|
|
|
origin_script: String
|
|
|
function: LuaFunction (Args...) -> Return
|
|
|
}
|
|
|
```
|
|
|
|
|
|
---
|
|
|
*[Home](../home)* |
|
|
\ No newline at end of file |