-
Notifications
You must be signed in to change notification settings - Fork 2
/
classDG.puml
319 lines (265 loc) · 10.2 KB
/
classDG.puml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
@startuml
set namespaceSeparator ::
class "negate::analyser::sentiment_analysis.dart::SentimentAnalysis" {
-String _modelFile
-String _vocabFile
-int _sentenceLen
+String start
+String pad
+String unk
+Map<String, int> dictionary
+Interpreter sInterpreter
+Future<void> init()
-Future<void> _loadModel()
-Future<void> _loadDictionary()
+double classify()
+List<List<double>> tokenizeInputText()
}
"negate::analyser::sentiment_analysis.dart::SentimentAnalysis" o-- "tflite_flutter::src::interpreter.dart::Interpreter"
class "negate::analyser::sentiment_analysis_mlkit.dart::SentimentAnalysisMLKit" {
-LanguageIdentifier _languageIdentifier
+Future<double> classifyMobile()
}
"negate::analyser::sentiment_analysis_mlkit.dart::SentimentAnalysisMLKit" o-- "google_mlkit_language_id::src::language_identifier.dart::LanguageIdentifier"
"negate::analyser::sentiment_analysis.dart::SentimentAnalysis" <|-- "negate::analyser::sentiment_analysis_mlkit.dart::SentimentAnalysisMLKit"
class "negate::logger::android_logger.dart::AndroidLogger" {
{static} -AndroidLogger _instance
+Future<void> startLogger()
+Future<void> startAccessibility()
{static} -void _accessibilityListener()
}
"negate::logger::android_logger.dart::AndroidLogger" o-- "negate::logger::android_logger.dart::AndroidLogger"
"negate::logger::logger.dart::SentenceLogger" <|-- "negate::logger::android_logger.dart::AndroidLogger"
class "negate::logger::logger.dart::SentenceLogger" {
{static} -SentenceLogger _instance
{static} -StringBuffer _sentence
{static} -HashMap<String, AppList> _appMap
{static} -HashSet<String> _appIcons
{static} -TfParams _tfp
{static} -int _updateFreq
+RegExp blacklist
-String _lastUsedApp
-bool _dbUpdated
+void logToDB()
{static} -void _startBackground()
+Future<void> startLogger()
+String getSentence()
+void writeToSentence()
+void clearSentence()
-void _setAppValues()
+void addAppEntry()
+void updateFGApp()
+bool hasAppIcon()
+void addAppIcon()
}
"negate::logger::logger.dart::SentenceLogger" o-- "negate::logger::logger.dart::SentenceLogger"
"negate::logger::logger.dart::SentenceLogger" o-- "dart::collection::HashMap<String, AppList>"
"negate::logger::logger.dart::SentenceLogger" o-- "dart::collection::HashSet<String>"
"negate::logger::logger.dart::SentenceLogger" o-- "negate::sentiment_db.dart::TfParams"
class "negate::logger::logger_factory.dart::LoggerFactory" {
{static} +Future<void> startLoggerFactory()
{static} +RegExp getLoggerRegex()
{static} +Widget getDisclosureText()
}
class "negate::logger::win_logger.dart::WinLogger" {
{static} -WinLogger _instance
{static} -int _keyHook
{static} -int _mouseHook
{static} -DateTime _lastLogged
+Future<void> startLogger()
{static} -int _hookCallback()
{static} -int _mouseCallback()
-Future<void> _saveKey()
-void _setHook()
-String _getFGAppName()
-String _formatName()
+Uint8List? findAppIcon()
}
"negate::logger::win_logger.dart::WinLogger" o-- "negate::logger::win_logger.dart::WinLogger"
"negate::logger::logger.dart::SentenceLogger" <|-- "negate::logger::win_logger.dart::WinLogger"
class "negate::main.dart::ThemedHourlyUI" {
+Future<void> initSystemTray()
+Widget build()
}
"flutter::src::widgets::framework.dart::StatelessWidget" <|-- "negate::main.dart::ThemedHourlyUI"
class "negate::main.dart::HourlyDashboard" {
-bool _requested
-BuildContext _context
+Widget build()
+Widget bottomTitles()
+BarTouchData barTouchData()
+Future<List<BarChartGroupData>> getHourBars()
+void handleMenu()
}
"negate::main.dart::HourlyDashboard" o-- "flutter::src::widgets::framework.dart::BuildContext"
"flutter_riverpod::src::consumer.dart::ConsumerWidget" <|-- "negate::main.dart::HourlyDashboard"
class "negate::sentiment_db.dart::SentimentLogs" {
+Set<Column<dynamic>> primaryKey
}
class "negate::sentiment_db.dart::AppIcons" {
+Set<Column<dynamic>> primaryKey
}
class "negate::sentiment_db.dart::SentimentDB" {
+int schemaVersion
+Future<Uint8List> getAppIcon()
+Future<HashSet<String>> getListOfIcons()
+dynamic encoder()
+dynamic reviver()
+Future<String> jsonLogs()
+Future<bool> jsonImport()
-Future<List<MapEntry<String, List<double>>>> _getSentimentsByName()
+Future<List<List<MapEntry<String, List<double>>>>> getRecommendations()
+Future<List<MapEntry<String, List<double>>>> getDailyBreakdown()
+Future<List<double>> getAvgHourlySentiment()
+Future<List<SentimentLog>> getDaySentiment()
{static} +Future<void> addAppIcon()
{static} +Future<void> addSentiments()
}
"negate::sentiment_db.dart::_$SentimentDB" <|-- "negate::sentiment_db.dart::SentimentDB"
class "negate::sentiment_db.dart::IsolateStartRequest" {
+SendPort sendDriftIsolate
+String targetPath
}
"negate::sentiment_db.dart::IsolateStartRequest" o-- "dart::isolate::SendPort"
class "negate::sentiment_db.dart::TfParams" {
+int iAddress
+Map<String, int> dict
+bool translate
}
class "negate::sentiment_db.dart::AppList" {
+DateTime lastTimeUsed
+double totalTimeUsed
+int numPositive
+int numNegative
}
class "negate::sentiment_db.dart::TfliteRequest" {
+TfParams tfp
+SharedPreferences prefs
}
"negate::sentiment_db.dart::TfliteRequest" o-- "negate::sentiment_db.dart::TfParams"
"negate::sentiment_db.dart::TfliteRequest" o-- "shared_preferences::shared_preferences.dart::SharedPreferences"
"negate::sentiment_db.dart::IsolateStartRequest" <|-- "negate::sentiment_db.dart::TfliteRequest"
class "negate::sentiment_db.dart::AddSentimentRequest" {
+HashMap<String, AppList> sentiments
+SendPort iPort
}
"negate::sentiment_db.dart::AddSentimentRequest" o-- "dart::collection::HashMap<String, AppList>"
"negate::sentiment_db.dart::AddSentimentRequest" o-- "dart::isolate::SendPort"
class "negate::sentiment_db.dart::AddAppIconRequest" {
+String name
+Uint8List icon
+SendPort iPort
}
"negate::sentiment_db.dart::AddAppIconRequest" o-- "dart::typed_data::Uint8List"
"negate::sentiment_db.dart::AddAppIconRequest" o-- "dart::isolate::SendPort"
class "negate::sentiment_db.dart::$SentimentLogsTable" {
-String? _alias
+List<GeneratedColumn<dynamic>> $columns
+String aliasedName
+String actualTableName
+Set<GeneratedColumn<dynamic>> $primaryKey
+VerificationContext validateIntegrity()
+SentimentLog map()
+$SentimentLogsTable createAlias()
}
"negate::sentiment_db.dart::SentimentLogs" <|-- "negate::sentiment_db.dart::$SentimentLogsTable"
"drift::src::runtime::query_builder::query_builder.dart::TableInfo" <|-- "negate::sentiment_db.dart::$SentimentLogsTable"
class "negate::sentiment_db.dart::SentimentLog" {
+String name
+DateTime hour
+int timeUsed
+double avgScore
+int hashCode
+Map<String, Expression<dynamic>> toColumns()
+SentimentLogsCompanion toCompanion()
+Map<String, dynamic> toJson()
+SentimentLog copyWith()
+String toString()
+bool ==()
}
"drift::src::runtime::data_class.dart::Insertable" <|-- "negate::sentiment_db.dart::SentimentLog"
class "negate::sentiment_db.dart::SentimentLogsCompanion" {
{static} +Insertable<SentimentLog> custom()
+SentimentLogsCompanion copyWith()
+Map<String, Expression<dynamic>> toColumns()
+String toString()
}
class "negate::sentiment_db.dart::$AppIconsTable" {
-String? _alias
+List<GeneratedColumn<dynamic>> $columns
+String aliasedName
+String actualTableName
+Set<GeneratedColumn<dynamic>> $primaryKey
+VerificationContext validateIntegrity()
+AppIcon map()
+$AppIconsTable createAlias()
}
"negate::sentiment_db.dart::AppIcons" <|-- "negate::sentiment_db.dart::$AppIconsTable"
"drift::src::runtime::query_builder::query_builder.dart::TableInfo" <|-- "negate::sentiment_db.dart::$AppIconsTable"
class "negate::sentiment_db.dart::AppIcon" {
+String name
+Uint8List icon
+int hashCode
+Map<String, Expression<dynamic>> toColumns()
+AppIconsCompanion toCompanion()
+Map<String, dynamic> toJson()
+AppIcon copyWith()
+String toString()
+bool ==()
}
"negate::sentiment_db.dart::AppIcon" o-- "dart::typed_data::Uint8List"
"drift::src::runtime::data_class.dart::Insertable" <|-- "negate::sentiment_db.dart::AppIcon"
class "negate::sentiment_db.dart::AppIconsCompanion" {
{static} +Insertable<AppIcon> custom()
+AppIconsCompanion copyWith()
+Map<String, Expression<dynamic>> toColumns()
+String toString()
}
abstract class "negate::sentiment_db.dart::_$SentimentDB" {
+$SentimentLogsTable sentimentLogs
+$AppIconsTable appIcons
+Iterable<TableInfo<Table, dynamic>> allTables
+List<DatabaseSchemaEntity> allSchemaEntities
}
"negate::sentiment_db.dart::_$SentimentDB" o-- "negate::sentiment_db.dart::$SentimentLogsTable"
"negate::sentiment_db.dart::_$SentimentDB" o-- "negate::sentiment_db.dart::$AppIconsTable"
class "negate::ui::common_ui.dart::CommonUI" {
{static} -bool _firstPage
{static} +Widget infoPage()
{static} +Future<void> showDisclosure()
{static} +ButtonBar dateChanger()
{static} +Color getBarColour()
{static} +Widget appListView()
}
class "negate::ui::daily_breakdown.dart::DailyBreakdown" {
{static} +Widget dashboard()
{static} +List<PieChartSectionData> showingSections()
}
class "negate::ui::daily_breakdown.dart::_Badge" {
+String appName
+double size
+Color borderColor
+SentimentDB sdb
+Widget build()
}
"negate::ui::daily_breakdown.dart::_Badge" o-- "dart::ui::Color"
"negate::ui::daily_breakdown.dart::_Badge" o-- "negate::sentiment_db.dart::SentimentDB"
"flutter::src::widgets::framework.dart::StatelessWidget" <|-- "negate::ui::daily_breakdown.dart::_Badge"
class "negate::ui::globals.dart::DBMonitor" {
+void set()
}
"state_notifier::state_notifier.dart::StateNotifier" <|-- "negate::ui::globals.dart::DBMonitor"
class "negate::ui::recommendations.dart::RecommendationsPage" {
+Widget build()
}
"flutter::src::widgets::framework.dart::StatelessWidget" <|-- "negate::ui::recommendations.dart::RecommendationsPage"
class "negate::ui::settings.dart::SettingsPage" {
{static} +Widget build()
}
class "negate::ui::window_decorations.dart::WindowButtons" {
+WindowButtonColors closeButtonColors
+Widget build()
}
"negate::ui::window_decorations.dart::WindowButtons" o-- "bitsdojo_window::src::widgets::window_button.dart::WindowButtonColors"
"flutter::src::widgets::framework.dart::StatelessWidget" <|-- "negate::ui::window_decorations.dart::WindowButtons"
@enduml