frontengine-dev 0.0.55__py3-none-any.whl → 0.0.57__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- frontengine/__init__.py +13 -14
- frontengine/show/gif/paint_gif.py +4 -2
- frontengine/show/image/paint_image.py +4 -2
- frontengine/show/sound_player/sound_effect.py +1 -2
- frontengine/show/sound_player/sound_player.py +1 -2
- frontengine/show/text/draw_text.py +4 -2
- frontengine/show/video/video_player.py +1 -2
- frontengine/show/web/webview.py +1 -3
- frontengine/{ui/main/system_tray → system_tray}/extend_system_tray.py +1 -3
- frontengine/ui/dialog/choose_file_dialog.py +21 -36
- frontengine/ui/{main/main_ui.py → main_ui.py} +37 -44
- frontengine/ui/menu/help_menu.py +25 -0
- frontengine/ui/menu/how_to_menu.py +14 -0
- frontengine/ui/{main → menu}/language_menu.py +10 -10
- frontengine/ui/{setting → page}/control_center/control_center_ui.py +9 -12
- frontengine/ui/{setting → page}/gif/gif_setting_ui.py +6 -6
- frontengine/ui/{setting → page}/image/image_setting_ui.py +6 -6
- frontengine/ui/{setting → page}/scene_setting/scene_setting_ui.py +8 -8
- frontengine/ui/{setting → page}/scene_setting/scene_tabs/Image.py +1 -1
- frontengine/ui/{setting → page}/scene_setting/scene_tabs/gif.py +1 -1
- frontengine/ui/{setting → page}/scene_setting/scene_tabs/scene_control.py +3 -2
- frontengine/ui/{setting → page}/scene_setting/scene_tabs/sound.py +1 -1
- frontengine/ui/{setting → page}/scene_setting/scene_tabs/text.py +1 -1
- frontengine/ui/{setting → page}/scene_setting/scene_tabs/ui.py +1 -1
- frontengine/ui/{setting → page}/scene_setting/scene_tabs/video.py +1 -1
- frontengine/ui/{setting → page}/scene_setting/scene_tabs/web.py +1 -1
- frontengine/ui/{setting → page}/text/text_setting_ui.py +6 -6
- frontengine/ui/{setting → page}/video/video_setting_ui.py +10 -6
- frontengine/ui/{setting → page}/web/web_setting_ui.py +5 -5
- frontengine/user_setting/user_setting_file.py +2 -1
- frontengine/utils/browser/browser.py +5 -0
- frontengine/utils/multi_language/english.py +6 -0
- frontengine/utils/multi_language/traditional_chinese.py +6 -0
- {frontengine_dev-0.0.55.dist-info → frontengine_dev-0.0.57.dist-info}/METADATA +4 -51
- frontengine_dev-0.0.57.dist-info/RECORD +103 -0
- {frontengine_dev-0.0.55.dist-info → frontengine_dev-0.0.57.dist-info}/WHEEL +1 -1
- frontengine/show/chat/chat_toast.py +0 -55
- frontengine/show/image_generation/image_generation_show.py +0 -43
- frontengine/ui/setting/chat/chat_model.py +0 -65
- frontengine/ui/setting/chat/chat_scene_input.py +0 -69
- frontengine/ui/setting/chat/chat_scene_setting.py +0 -180
- frontengine/ui/setting/chat/chatthread.py +0 -78
- frontengine/ui/setting/chat/speech_to_text.py +0 -70
- frontengine/ui/setting/image_generation/generation_image_thread.py +0 -32
- frontengine/ui/setting/image_generation/image_generation_input.py +0 -63
- frontengine/ui/setting/text/__init__.py +0 -0
- frontengine/ui/setting/video/__init__.py +0 -0
- frontengine/ui/setting/web/__init__.py +0 -0
- frontengine_dev-0.0.55.dist-info/RECORD +0 -112
- /frontengine/{show/chat → system_tray}/__init__.py +0 -0
- /frontengine/{show/image_generation → ui/menu}/__init__.py +0 -0
- /frontengine/ui/{main → page}/__init__.py +0 -0
- /frontengine/ui/{main/system_tray → page/control_center}/__init__.py +0 -0
- /frontengine/ui/{setting → page/gif}/__init__.py +0 -0
- /frontengine/ui/{setting/chat → page/image}/__init__.py +0 -0
- /frontengine/ui/{setting/control_center → page/scene_setting}/__init__.py +0 -0
- /frontengine/ui/{setting/gif → page/scene_setting/scene_tabs}/__init__.py +0 -0
- /frontengine/ui/{setting → page}/scene_setting/scene_tabs/tableview_model.py +0 -0
- /frontengine/ui/{setting/image → page/sound_player}/__init__.py +0 -0
- /frontengine/ui/{setting → page}/sound_player/sound_player_setting_ui.py +0 -0
- /frontengine/ui/{setting/image_generation → page/text}/__init__.py +0 -0
- /frontengine/ui/{setting/scene_setting → page/video}/__init__.py +0 -0
- /frontengine/ui/{setting/scene_setting/scene_tabs → page/web}/__init__.py +0 -0
- /frontengine/{ui/setting/sound_player → utils/browser}/__init__.py +0 -0
- {frontengine_dev-0.0.55.dist-info → frontengine_dev-0.0.57.dist-info}/LICENSE +0 -0
- {frontengine_dev-0.0.55.dist-info → frontengine_dev-0.0.57.dist-info}/top_level.txt +0 -0
@@ -4,14 +4,14 @@ from PySide6.QtCore import Qt
|
|
4
4
|
from PySide6.QtWidgets import QWidget, QGridLayout, QTabWidget
|
5
5
|
|
6
6
|
from frontengine.show.scene.scene import SceneManager
|
7
|
-
from frontengine.ui.
|
8
|
-
from frontengine.ui.
|
9
|
-
from frontengine.ui.
|
10
|
-
from frontengine.ui.
|
11
|
-
from frontengine.ui.
|
12
|
-
from frontengine.ui.
|
13
|
-
from frontengine.ui.
|
14
|
-
from frontengine.ui.
|
7
|
+
from frontengine.ui.page.scene_setting.scene_tabs.Image import ImageSceneSettingUI
|
8
|
+
from frontengine.ui.page.scene_setting.scene_tabs.gif import GIFSceneSettingUI
|
9
|
+
from frontengine.ui.page.scene_setting.scene_tabs.scene_control import SceneControlSettingUI
|
10
|
+
from frontengine.ui.page.scene_setting.scene_tabs.sound import SoundSceneSettingUI
|
11
|
+
from frontengine.ui.page.scene_setting.scene_tabs.text import TextSceneSettingUI
|
12
|
+
from frontengine.ui.page.scene_setting.scene_tabs.ui import UISceneSettingUI
|
13
|
+
from frontengine.ui.page.scene_setting.scene_tabs.video import VideoSceneSettingUI
|
14
|
+
from frontengine.ui.page.scene_setting.scene_tabs.web import WEBSceneSettingUI
|
15
15
|
from frontengine.utils.multi_language.language_wrapper import language_wrapper
|
16
16
|
|
17
17
|
|
@@ -4,7 +4,7 @@ from PySide6.QtWidgets import QWidget, QBoxLayout, QPushButton, QSlider, QLabel,
|
|
4
4
|
from frontengine.utils.multi_language.language_wrapper import language_wrapper
|
5
5
|
|
6
6
|
from frontengine.ui.dialog.choose_file_dialog import choose_image
|
7
|
-
from frontengine.ui.
|
7
|
+
from frontengine.ui.page.scene_setting.scene_tabs.tableview_model import add_row_data
|
8
8
|
from frontengine.utils.logging.loggin_instance import front_engine_logger
|
9
9
|
|
10
10
|
|
@@ -4,7 +4,7 @@ from PySide6.QtWidgets import QWidget, QBoxLayout, QPushButton, QSlider, QLabel,
|
|
4
4
|
from frontengine.utils.multi_language.language_wrapper import language_wrapper
|
5
5
|
|
6
6
|
from frontengine.ui.dialog.choose_file_dialog import choose_gif
|
7
|
-
from frontengine.ui.
|
7
|
+
from frontengine.ui.page.scene_setting.scene_tabs.tableview_model import add_row_data
|
8
8
|
from frontengine.utils.logging.loggin_instance import front_engine_logger
|
9
9
|
|
10
10
|
|
@@ -4,7 +4,7 @@ from PySide6.QtCore import Qt
|
|
4
4
|
from PySide6.QtWidgets import QWidget, QGridLayout, QPushButton, QHeaderView, QTableView, QScrollArea
|
5
5
|
|
6
6
|
from frontengine.show.scene.scene import SceneManager
|
7
|
-
from frontengine.ui.
|
7
|
+
from frontengine.ui.page.scene_setting.scene_tabs.tableview_model import tableview_model, output_scene_as_json, \
|
8
8
|
load_scene_json
|
9
9
|
from frontengine.utils.logging.loggin_instance import front_engine_logger
|
10
10
|
from frontengine.utils.multi_language.language_wrapper import language_wrapper
|
@@ -60,7 +60,8 @@ class SceneControlSettingUI(QWidget):
|
|
60
60
|
|
61
61
|
def close_scene(self) -> None:
|
62
62
|
self.scene.widget_list.clear()
|
63
|
-
self.scene.graphic_view.
|
63
|
+
if self.scene.graphic_view.isEnabled() and self.scene.graphic_view.isVisible():
|
64
|
+
self.scene.graphic_view.close()
|
64
65
|
|
65
66
|
def start_scene(self) -> None:
|
66
67
|
front_engine_logger.info("start_scene")
|
@@ -2,7 +2,7 @@ from PySide6.QtCore import Qt
|
|
2
2
|
from PySide6.QtWidgets import QWidget, QBoxLayout, QSlider, QLabel, QHBoxLayout, QPushButton
|
3
3
|
|
4
4
|
from frontengine.ui.dialog.choose_file_dialog import choose_player_sound
|
5
|
-
from frontengine.ui.
|
5
|
+
from frontengine.ui.page.scene_setting.scene_tabs.tableview_model import add_row_data
|
6
6
|
from frontengine.utils.logging.loggin_instance import front_engine_logger
|
7
7
|
from frontengine.utils.multi_language.language_wrapper import language_wrapper
|
8
8
|
|
@@ -3,7 +3,7 @@ from PySide6.QtGui import QIntValidator
|
|
3
3
|
from PySide6.QtWidgets import QWidget, QBoxLayout, QLineEdit, QPushButton, QSlider, QLabel, QHBoxLayout
|
4
4
|
from frontengine.utils.multi_language.language_wrapper import language_wrapper
|
5
5
|
|
6
|
-
from frontengine.ui.
|
6
|
+
from frontengine.ui.page.scene_setting.scene_tabs.tableview_model import add_row_data
|
7
7
|
from frontengine.utils.logging.loggin_instance import front_engine_logger
|
8
8
|
|
9
9
|
|
@@ -2,7 +2,7 @@ from PySide6.QtGui import QIntValidator, Qt
|
|
2
2
|
from PySide6.QtWidgets import QWidget, QBoxLayout, QMessageBox, QPushButton, QLineEdit, QLabel, QHBoxLayout
|
3
3
|
|
4
4
|
from frontengine import load_ui_file
|
5
|
-
from frontengine.ui.
|
5
|
+
from frontengine.ui.page.scene_setting.scene_tabs.tableview_model import add_row_data
|
6
6
|
from frontengine.utils.logging.loggin_instance import front_engine_logger
|
7
7
|
from frontengine.utils.multi_language.language_wrapper import language_wrapper
|
8
8
|
|
@@ -4,7 +4,7 @@ from PySide6.QtWidgets import QWidget, QBoxLayout, QPushButton, QSlider, QLabel,
|
|
4
4
|
from frontengine.utils.multi_language.language_wrapper import language_wrapper
|
5
5
|
|
6
6
|
from frontengine.ui.dialog.choose_file_dialog import choose_video
|
7
|
-
from frontengine.ui.
|
7
|
+
from frontengine.ui.page.scene_setting.scene_tabs.tableview_model import add_row_data
|
8
8
|
from frontengine.utils.logging.loggin_instance import front_engine_logger
|
9
9
|
|
10
10
|
|
@@ -3,7 +3,7 @@ from PySide6.QtGui import QIntValidator
|
|
3
3
|
from PySide6.QtWidgets import QWidget, QBoxLayout, QPushButton, QLineEdit, QSlider, QLabel, QCheckBox, QHBoxLayout
|
4
4
|
from frontengine.utils.multi_language.language_wrapper import language_wrapper
|
5
5
|
|
6
|
-
from frontengine.ui.
|
6
|
+
from frontengine.ui.page.scene_setting.scene_tabs.tableview_model import add_row_data
|
7
7
|
from frontengine.utils.logging.loggin_instance import front_engine_logger
|
8
8
|
|
9
9
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
from PySide6.QtCore import Qt
|
2
|
-
from PySide6.QtGui import QScreen
|
2
|
+
from PySide6.QtGui import QScreen, QGuiApplication
|
3
3
|
from PySide6.QtWidgets import QWidget, QGridLayout, QSlider, QLabel, QLineEdit, QPushButton, QCheckBox
|
4
4
|
|
5
5
|
from frontengine.show.text.draw_text import TextWidget
|
@@ -89,13 +89,13 @@ class TextSettingUI(QWidget):
|
|
89
89
|
|
90
90
|
def start_draw_text_on_screen(self) -> None:
|
91
91
|
front_engine_logger.info("start_draw_text_on_screen")
|
92
|
-
if self.show_all_screen:
|
92
|
+
if not self.show_all_screen:
|
93
93
|
text_widget = self._create_text_widget()
|
94
94
|
text_widget.showFullScreen()
|
95
95
|
else:
|
96
|
-
monitors =
|
97
|
-
for
|
98
|
-
monitor = screen.availableGeometry()
|
96
|
+
monitors = QGuiApplication.screens()
|
97
|
+
for monitor in monitors:
|
99
98
|
text_widget = self._create_text_widget()
|
100
|
-
text_widget.
|
99
|
+
text_widget.setScreen(monitor)
|
100
|
+
text_widget.move(monitor.availableGeometry().topLeft())
|
101
101
|
text_widget.showFullScreen()
|
@@ -1,5 +1,5 @@
|
|
1
1
|
from PySide6.QtCore import Qt
|
2
|
-
from PySide6.QtGui import QScreen
|
2
|
+
from PySide6.QtGui import QScreen, QGuiApplication
|
3
3
|
from PySide6.QtWidgets import QWidget, QGridLayout, QSlider, QLabel, QPushButton, QMessageBox, QCheckBox
|
4
4
|
|
5
5
|
from frontengine.show.video.video_player import VideoWidget
|
@@ -119,17 +119,21 @@ class VideoSettingUI(QWidget):
|
|
119
119
|
message_box.show()
|
120
120
|
else:
|
121
121
|
front_engine_logger.info("start_play_gif")
|
122
|
-
if self.show_all_screen:
|
122
|
+
if not self.show_all_screen:
|
123
123
|
video_widget = self._create_video_widget()
|
124
124
|
video_widget.set_ui_window_flag(self.show_on_bottom_checkbox.isChecked())
|
125
125
|
video_widget.showMaximized()
|
126
126
|
else:
|
127
|
-
|
128
|
-
|
129
|
-
|
127
|
+
count = 0
|
128
|
+
monitors = QGuiApplication.screens()
|
129
|
+
for monitor in monitors:
|
130
130
|
video_widget = self._create_video_widget()
|
131
|
-
|
131
|
+
if count >= 1:
|
132
|
+
video_widget.media_player.audioOutput().setVolume(0)
|
133
|
+
video_widget.setScreen(monitor)
|
134
|
+
video_widget.move(monitor.availableGeometry().topLeft())
|
132
135
|
video_widget.showMaximized()
|
136
|
+
count = count + 1
|
133
137
|
|
134
138
|
def choose_and_copy_file_to_cwd_gif_dir_then_play(self) -> None:
|
135
139
|
self.ready_label.setText(
|
@@ -93,14 +93,14 @@ class WEBSettingUI(QWidget):
|
|
93
93
|
self.opacity_slider_value_label.setText(str(self.opacity_slider.value()))
|
94
94
|
|
95
95
|
def start_open_web_with_url(self) -> None:
|
96
|
-
if self.show_all_screen:
|
96
|
+
if not self.show_all_screen:
|
97
97
|
web_widget = self._create_web_widget()
|
98
98
|
web_widget.showMaximized()
|
99
99
|
else:
|
100
100
|
front_engine_logger.info("start_open_web_with_url")
|
101
101
|
monitors = QScreen.virtualSiblings(self.screen())
|
102
|
-
for
|
103
|
-
monitor = screen.availableGeometry()
|
102
|
+
for monitor in monitors:
|
104
103
|
web_widget = self._create_web_widget()
|
105
|
-
web_widget.
|
106
|
-
web_widget.
|
104
|
+
web_widget.setScreen(monitor)
|
105
|
+
web_widget.move(monitor.availableGeometry().topLeft())
|
106
|
+
web_widget.showFullScreen()
|
@@ -107,6 +107,7 @@ english_word_dict = {
|
|
107
107
|
"chat_scene_precise": "precise",
|
108
108
|
"chat_scene_balanced": "balanced",
|
109
109
|
"chat_gpt_exception": "GPT error, pls retry or new topic",
|
110
|
+
"should_we_show_toast": "Show Toast?",
|
110
111
|
# Chat voice input
|
111
112
|
"start_chat_voice_input_ui": "Open voice input ui",
|
112
113
|
"chat_recognizer_voice_button": "Start listen voice",
|
@@ -115,4 +116,9 @@ english_word_dict = {
|
|
115
116
|
"start_generate_image": "Star generate",
|
116
117
|
"input_error": "Please input something",
|
117
118
|
"save_generation_image": "Save Image",
|
119
|
+
# Help Menu
|
120
|
+
"help_menu_label": "Help menu",
|
121
|
+
"help_menu_open_issue": "Open issue tracker",
|
122
|
+
# HowTo Menu
|
123
|
+
"how_to_menu_label": "How to menu",
|
118
124
|
}
|
@@ -107,6 +107,7 @@ traditional_chinese_word_dict = {
|
|
107
107
|
"chat_scene_precise": "精準",
|
108
108
|
"chat_scene_balanced": "平衡",
|
109
109
|
"chat_gpt_exception": "GPT 錯誤,請重試或開始一個新話題",
|
110
|
+
"should_we_show_toast": "顯示對話?",
|
110
111
|
# Chat voice input
|
111
112
|
"start_chat_voice_input_ui": "開啟聲音輸入介面",
|
112
113
|
"chat_recognizer_voice_button": "開始錄製聲音",
|
@@ -115,4 +116,9 @@ traditional_chinese_word_dict = {
|
|
115
116
|
"start_generate_image": "開始產生圖片",
|
116
117
|
"input_error": "請勿無輸入或空格",
|
117
118
|
"save_generation_image": "儲存圖片",
|
119
|
+
# Help Menu
|
120
|
+
"help_menu_label": "幫助選單",
|
121
|
+
"help_menu_open_issue": "開啟問題回報",
|
122
|
+
# HowTo Menu
|
123
|
+
"how_to_menu_label": "問題選單",
|
118
124
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
|
-
Name:
|
3
|
-
Version: 0.0.
|
2
|
+
Name: frontengine_dev
|
3
|
+
Version: 0.0.57
|
4
4
|
Summary: FrontEngine is BingGPT that can use-define front end or only use like screen saver
|
5
5
|
Author-email: JE-Chen <jechenmailman@gmail.com>
|
6
6
|
License: MIT
|
@@ -44,54 +44,14 @@ Requires-Dist: PyAudio
|
|
44
44
|
|
45
45
|
## About
|
46
46
|
|
47
|
-
<details open>
|
48
|
-
|
49
47
|
---
|
50
|
-
|
51
|
-
> * Save cookie to bing_cookies.json and put json in program current-working-dir
|
52
|
-
> - Open bing.com/chat
|
53
|
-
> - If you see a chat feature, you are good to continue...
|
54
|
-
> - Install the cookie editor extension for Chrome or Firefox
|
55
|
-
> - Go to bing.com
|
56
|
-
> - Open the extension
|
57
|
-
> - Click "Export" on the bottom right, then "Export as JSON" (This saves your cookies to clipboard)
|
58
|
-
> - Paste your cookies into a file bing_cookies.json.
|
59
|
-
> - NOTE: The cookies file name MUST follow the regex pattern bing_cookies.json, so that they could be recognized by
|
60
|
-
internal cookie processing mechanisms
|
61
|
-
|
62
|
-
* Smart automation assistant.
|
63
|
-
* Chat based automation.
|
64
|
-
* User-defined front ground.
|
65
|
-
* User-defined virtual assistant.
|
66
|
-
* Assistant can open website.
|
67
|
-
* Assistant can draw text on your screen.
|
68
|
-
* Assistant can play video on your screen.
|
69
|
-
* Assistant can play sound.
|
70
|
-
* Cowork with another automation components.
|
71
|
-
* Extendable.
|
72
|
-
* Remote automation support.
|
48
|
+
|
73
49
|
|
74
50
|

|
75
51
|
|
76
|
-
* Language Menu (Choose ui language)
|
77
|
-
* UI Style (Choose ui style)
|
78
|
-
* Tab Menu
|
79
|
-
* VIDEO (Setting and show video on front)
|
80
|
-
* IMAGE (Setting and show image on front)
|
81
|
-
* WEB (Setting and show web on front)
|
82
|
-
* GIF AND WEBP (Setting and show gif or webp on front)
|
83
|
-
* SOUND (Setting and play sound)
|
84
|
-
* TEXT (Setting and show text on front)
|
85
|
-
* SCENE (Add multi component on scene and show multi widget, can save setting as file)
|
86
|
-
* CHAT (Chat with bing on front)
|
87
|
-
* CONTROL CENTER (Control all another widget)
|
88
|
-
|
89
|
-
</details>
|
90
52
|
|
91
53
|
## Features
|
92
54
|
|
93
|
-
<details open>
|
94
|
-
|
95
55
|
---
|
96
56
|
|
97
57
|
* GIFs need time to load please, wait.
|
@@ -111,13 +71,11 @@ Requires-Dist: PyAudio
|
|
111
71
|
|
112
72
|
- [Youtube](https://youtu.be/fewogcb3b8Y)
|
113
73
|
|
114
|
-
</details>
|
115
74
|
|
116
75
|
## Download
|
117
76
|
|
118
|
-
<details open>
|
119
|
-
|
120
77
|
---
|
78
|
+
|
121
79
|
> Require Windows 10 or 11. \
|
122
80
|
> If you want to use this on a Unix-like system, you need to compile the source code.
|
123
81
|
|
@@ -125,12 +83,7 @@ Requires-Dist: PyAudio
|
|
125
83
|
|
126
84
|
> PYPI package: pip install frontengine
|
127
85
|
|
128
|
-
</details>
|
129
|
-
|
130
86
|
## Dev
|
131
87
|
|
132
|
-
<details open>
|
133
|
-
|
134
88
|
> Require Python 3.9 or later version
|
135
89
|
|
136
|
-
</details>
|
@@ -0,0 +1,103 @@
|
|
1
|
+
frontengine/__init__.py,sha256=bfPIO2Y3oRwkh7NaTch9vZ9780VWTvqmPQBcWZpG6H8,2049
|
2
|
+
frontengine/show/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
|
+
frontengine/show/gif/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
|
+
frontengine/show/gif/paint_gif.py,sha256=N_jj4wf5sPYj1vEjFFqlBDcjCD8hxF45ipRJ5yO6XOs,3024
|
5
|
+
frontengine/show/image/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
|
+
frontengine/show/image/paint_image.py,sha256=BtKyFJP7UdOLMBsCoQ1fnT8ft-cUxDaufFzURgbwpJU,2467
|
7
|
+
frontengine/show/load/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
|
+
frontengine/show/load/load_someone_make_ui.py,sha256=yjMrkA76VEYkKXygwKmoKaADymjjDlebI-7PNa6DrEo,1010
|
9
|
+
frontengine/show/scene/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
10
|
+
frontengine/show/scene/extend_graphic_scene.py,sha256=YfxAvMllAOS67XtyEoTiVWultD_NamWdH2plV75QcQ0,150
|
11
|
+
frontengine/show/scene/extend_graphic_view.py,sha256=RHchIGI3UWjmrpAo9aIfyTvCV_ENGIbn_FOrq-nZ46w,1935
|
12
|
+
frontengine/show/scene/scene.py,sha256=BZVNgeXR46p6hfHusUEX7dVCoxk9eUA0vksuWafLr8c,5337
|
13
|
+
frontengine/show/sound_player/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
14
|
+
frontengine/show/sound_player/sound_effect.py,sha256=pHsf0DC1cHwo66neudKzIUqiuWihlXR1a34-_AQrbo0,2032
|
15
|
+
frontengine/show/sound_player/sound_player.py,sha256=VOXwKI6-VdMH18u__atCay3wVJFu3TTHiygnQ8MNCTE,2135
|
16
|
+
frontengine/show/text/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
17
|
+
frontengine/show/text/draw_text.py,sha256=YPTSbz8c2dTDD-qZ6kT-HpfmF5d_1prxSA2Dv9HuHCw,2320
|
18
|
+
frontengine/show/video/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
19
|
+
frontengine/show/video/video_player.py,sha256=Gp1LErz7-xdPYajgEcpnLC_qOZ78NcgDI8AHG8TIF6c,3321
|
20
|
+
frontengine/show/web/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
21
|
+
frontengine/show/web/webview.py,sha256=ScRoJ43ftjUoU-qdrtsPv4QIywEtdseAPpj1Seqk_xY,2450
|
22
|
+
frontengine/system_tray/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
23
|
+
frontengine/system_tray/extend_system_tray.py,sha256=k4u2lEox-fCwmQKy1qnek9SGoqUkMFv8Av_DcNanwcE,1595
|
24
|
+
frontengine/ui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
25
|
+
frontengine/ui/main_ui.py,sha256=LP99Hbh48YMmw9z0BbKCilXhSCyjq0npzzk8kqVBtxo,7488
|
26
|
+
frontengine/ui/color/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
27
|
+
frontengine/ui/color/global_color.py,sha256=Rh-R-X2BHVjcK5MTBZ1nEMVHgLj1rP4nk-wTQKbiwFA,125
|
28
|
+
frontengine/ui/dialog/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
29
|
+
frontengine/ui/dialog/choose_file_dialog.py,sha256=2axmBspnOgiKIoEkc7XICPc40HQeZbqEQ6TltNovMFI,3456
|
30
|
+
frontengine/ui/dialog/save_file_dialog.py,sha256=e-sgUsmEAU1JSvzzmTmc2pf9rnW61alOgd48ESTYG1I,373
|
31
|
+
frontengine/ui/menu/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
32
|
+
frontengine/ui/menu/help_menu.py,sha256=_eNm60mrilBCVXumxnFuWDR48IONDjN5CDMAAgcyhAY,965
|
33
|
+
frontengine/ui/menu/how_to_menu.py,sha256=kBhfAeFM2GK61OO5kqWlxFo8Pz2LUoSaNfkwsbneF1Y,499
|
34
|
+
frontengine/ui/menu/language_menu.py,sha256=--9_RxoeefPlCx8i9q7PoRDCmQp9715hpWyMaegJWGE,1953
|
35
|
+
frontengine/ui/page/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
36
|
+
frontengine/ui/page/control_center/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
37
|
+
frontengine/ui/page/control_center/control_center_ui.py,sha256=kkzoaFsjLuYMExgNITuWk1n5iwY5RZnPKWkOoKUrWwY,8157
|
38
|
+
frontengine/ui/page/gif/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
39
|
+
frontengine/ui/page/gif/gif_setting_ui.py,sha256=Sr8lJk2lq5kOhATP9Cz2fgFzjXgWqbV2zLuwSVDttng,6103
|
40
|
+
frontengine/ui/page/image/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
41
|
+
frontengine/ui/page/image/image_setting_ui.py,sha256=4lPtOwx15ZWhxu9fI-k55AFWXZoZC4FDC8h_LiK1PNM,5232
|
42
|
+
frontengine/ui/page/scene_setting/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
43
|
+
frontengine/ui/page/scene_setting/scene_setting_ui.py,sha256=ikmicNQ3zwvn-L_NIuNQ6xScPamFQF_O4b3Ds8Wj764,2540
|
44
|
+
frontengine/ui/page/scene_setting/scene_tabs/Image.py,sha256=qMJ4y8wg_xJ6jMJe_1xGqz6Yo8fJDFR37-mRFNku9-U,3131
|
45
|
+
frontengine/ui/page/scene_setting/scene_tabs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
46
|
+
frontengine/ui/page/scene_setting/scene_tabs/gif.py,sha256=SFOWlwV_Z5izG7X5UrYOhK-t14AOyVSkU28yThfY3ec,3785
|
47
|
+
frontengine/ui/page/scene_setting/scene_tabs/scene_control.py,sha256=jG7EXU5S2YyViPQy9fyn68SQkYs-2cAds3FBn8j8E00,4019
|
48
|
+
frontengine/ui/page/scene_setting/scene_tabs/sound.py,sha256=FFi58AvQ6BbDAT1WxujMpHznSIpqX0GYze3rCpYJbPc,2032
|
49
|
+
frontengine/ui/page/scene_setting/scene_tabs/tableview_model.py,sha256=vt3sNwWs7w05wjDadU0pupmsP7S5qnCYWZQ_ppkU27k,2810
|
50
|
+
frontengine/ui/page/scene_setting/scene_tabs/text.py,sha256=Tj6Dqa-p1siHWihz4G-6e5SN037KRcpKJ6c08q16EFg,3937
|
51
|
+
frontengine/ui/page/scene_setting/scene_tabs/ui.py,sha256=457znYe0QyzjwkdWHr19i1vRF5IMT_i__a4fv_-Pr9c,2849
|
52
|
+
frontengine/ui/page/scene_setting/scene_tabs/video.py,sha256=5KW1s4O3n6_NJyOdlIm8HXpEVaeOhl5isUMPatYH6Rc,4586
|
53
|
+
frontengine/ui/page/scene_setting/scene_tabs/web.py,sha256=PyKQaZrgurQ0OG8OOMgrePm_xU2MY7jVssXh4iD0tFA,3875
|
54
|
+
frontengine/ui/page/sound_player/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
55
|
+
frontengine/ui/page/sound_player/sound_player_setting_ui.py,sha256=mu7c0DtkKrvGgH2VTDY-W5N1BAK6oJewT-_5qYgeZFM,6038
|
56
|
+
frontengine/ui/page/text/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
57
|
+
frontengine/ui/page/text/text_setting_ui.py,sha256=vuvag85AAfPJ5vYulv923ggcFWTunf6SLOkiqK5l6ho,4778
|
58
|
+
frontengine/ui/page/video/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
59
|
+
frontengine/ui/page/video/video_setting_ui.py,sha256=QIIQR-uXxha3Eeb5JtV6SqdbrY7iopszgNcJNGMt2g4,7404
|
60
|
+
frontengine/ui/page/web/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
61
|
+
frontengine/ui/page/web/web_setting_ui.py,sha256=y1Wr33YDX6Xe_robfSi_2b6p4aIowbS_Z2pw8ySB9kI,4823
|
62
|
+
frontengine/user_setting/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
63
|
+
frontengine/user_setting/user_setting_file.py,sha256=yMAPFfzNpYv6qBcFqNoFoxc68bgo1tmaZJWP9txh_ng,635
|
64
|
+
frontengine/user_setting/gif/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
65
|
+
frontengine/user_setting/gif/gif_setting.py,sha256=PcZWWl2ik0cD7fXoJ3KBD-g0GDaubi-JsmyxaCGYQ64,89
|
66
|
+
frontengine/user_setting/image/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
67
|
+
frontengine/user_setting/image/image_setting.py,sha256=GkEbR2ZJCpwYAqRBfrVQbGJoTQsIhAlgqHm9RNMJkAQ,79
|
68
|
+
frontengine/user_setting/sound/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
69
|
+
frontengine/user_setting/sound/sound_setting.py,sha256=VWFNDTT2uSXjs1bxUGnOAMNWdqHT_0vgV8OAWd2E3Nc,72
|
70
|
+
frontengine/user_setting/text/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
71
|
+
frontengine/user_setting/text/text_setting.py,sha256=AxCajm83JfL-TBpVgAaDvJlpV1FsfNCKBTVUsC8Zk98,98
|
72
|
+
frontengine/user_setting/video/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
73
|
+
frontengine/user_setting/video/video_setting.py,sha256=LIPZpUBNMTPhW_gbH3g8rUqZ1rsqXcUZu5BFmhrCB-o,118
|
74
|
+
frontengine/user_setting/web/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
75
|
+
frontengine/user_setting/web/web_setting.py,sha256=9Nn0AXvYtOvucWB0DtsM_DTYyxUuFMarmKT0VODMETI,72
|
76
|
+
frontengine/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
77
|
+
frontengine/utils/browser/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
78
|
+
frontengine/utils/browser/browser.py,sha256=BQBjJpbTubqruUvg75O21SUhawFdVhDmuYxtd_FN1Gs,85
|
79
|
+
frontengine/utils/exception/__init__.py,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
|
80
|
+
frontengine/utils/exception/exception_tags.py,sha256=V4R_RlNYX_zgAKU9I7NLimYic--oF-2qHDHCwpVYHcc,325
|
81
|
+
frontengine/utils/exception/exceptions.py,sha256=ZGY8HPvx3PGQkH_5VKF3IQMmkkUbBKJILTGn4o2Y4-g,296
|
82
|
+
frontengine/utils/file/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
83
|
+
frontengine/utils/file/open/__init__.py,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
|
84
|
+
frontengine/utils/file/open/open_file.py,sha256=YpxoGqhT_yuyMR0fu0UW8jBBvlKH-9G8AGJlN7u3L4Q,976
|
85
|
+
frontengine/utils/file/save/__init__.py,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
|
86
|
+
frontengine/utils/file/save/save_file.py,sha256=KF6IG3fX8RK2BAakwKdxTRC9HFpz3fEe90lqUBfAchk,733
|
87
|
+
frontengine/utils/json/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
88
|
+
frontengine/utils/json/json_file.py,sha256=vFZDM0SDxlVcwN-2iGCGM24pl5ldO0a0SVNm7EG8Nk8,1421
|
89
|
+
frontengine/utils/json_format/__init__.py,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
|
90
|
+
frontengine/utils/json_format/json_process.py,sha256=xJt_4Hm_o3sNDoeGtRW9Q7fsRj3DLiTbW-W8IqB8vt8,1021
|
91
|
+
frontengine/utils/logging/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
92
|
+
frontengine/utils/logging/loggin_instance.py,sha256=Zjr384o2q8x0QWv_hNoHIM_zCp5-HFgW14t-d30GUcQ,598
|
93
|
+
frontengine/utils/multi_language/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
94
|
+
frontengine/utils/multi_language/english.py,sha256=RQjFPbw_gGtrecjqWOB2fvbGrxen9IzbQZOn3LA9BIg,5249
|
95
|
+
frontengine/utils/multi_language/language_wrapper.py,sha256=KBqsG6ng5LSJkGqmu_YDxI8yAjXwgHM12DOzVgh_HXI,848
|
96
|
+
frontengine/utils/multi_language/traditional_chinese.py,sha256=UsxnYM22Q1HQ5pPs5gsR69VVLK6N6zdrAbOE7JYTjpM,5411
|
97
|
+
frontengine/utils/redirect_manager/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
98
|
+
frontengine/utils/redirect_manager/redirect_manager_class.py,sha256=zGJeVpjRU12MCnhVAdksAIhK_IhddI4cNKVb7DMgOZA,1888
|
99
|
+
frontengine_dev-0.0.57.dist-info/LICENSE,sha256=b3VlPBXnrDylKGffOEOLWMgOX-yfd65XC7PA1_sox2o,1085
|
100
|
+
frontengine_dev-0.0.57.dist-info/METADATA,sha256=Tey1Y8hDW8E61BOMrvZ287r96WVPe9l9lUpFfzGp5KQ,2165
|
101
|
+
frontengine_dev-0.0.57.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
102
|
+
frontengine_dev-0.0.57.dist-info/top_level.txt,sha256=btCybScN_ubeQ8phsSDBB0T-HyHjqt7b-WPy61uTox0,12
|
103
|
+
frontengine_dev-0.0.57.dist-info/RECORD,,
|
@@ -1,55 +0,0 @@
|
|
1
|
-
from PySide6.QtCore import Qt, QRect, QTimer, QRectF
|
2
|
-
from PySide6.QtGui import QPainter, QFontDatabase, QTextDocument, QTextOption, QBrush, QColor, QFontMetrics
|
3
|
-
from PySide6.QtWidgets import QWidget
|
4
|
-
|
5
|
-
|
6
|
-
class ChatToast(QWidget):
|
7
|
-
|
8
|
-
def __init__(self, text: str, close_time: int = 10000, font_size: int = 16):
|
9
|
-
super().__init__()
|
10
|
-
self.setAttribute(Qt.WidgetAttribute.WA_TranslucentBackground)
|
11
|
-
self.setAttribute(Qt.WidgetAttribute.WA_DeleteOnClose)
|
12
|
-
self.setWindowFlag(
|
13
|
-
Qt.WindowType.WindowTransparentForInput |
|
14
|
-
Qt.WindowType.FramelessWindowHint |
|
15
|
-
Qt.WindowType.Tool |
|
16
|
-
Qt.WindowType.WindowStaysOnTopHint
|
17
|
-
)
|
18
|
-
self.text = text
|
19
|
-
self.font_size = font_size
|
20
|
-
self.draw_font = QFontDatabase.font(self.font().family(), "", self.font_size)
|
21
|
-
self.draw_font.setBold(True)
|
22
|
-
self.close_timer = QTimer()
|
23
|
-
self.close_timer.setInterval(close_time)
|
24
|
-
self.close_timer.timeout.connect(self.close)
|
25
|
-
self.close_timer.start()
|
26
|
-
|
27
|
-
def paintEvent(self, event) -> None:
|
28
|
-
painter = QPainter(self)
|
29
|
-
painter.save()
|
30
|
-
painter.setFont(
|
31
|
-
self.draw_font
|
32
|
-
)
|
33
|
-
painter.setPen(QColor(0, 255, 0))
|
34
|
-
painter.drawText(
|
35
|
-
QRect(self.x(), self.y(), self.width(), self.height()),
|
36
|
-
Qt.AlignmentFlag.AlignCenter | Qt.TextFlag.TextWordWrap,
|
37
|
-
self.text
|
38
|
-
)
|
39
|
-
if not self.close_timer.isActive():
|
40
|
-
self.close_timer.start()
|
41
|
-
painter.restore()
|
42
|
-
|
43
|
-
def mousePressEvent(self, event) -> None:
|
44
|
-
super().mousePressEvent(event)
|
45
|
-
|
46
|
-
def mouseDoubleClickEvent(self, event) -> None:
|
47
|
-
super().mouseDoubleClickEvent(event)
|
48
|
-
|
49
|
-
def mouseGrabber(self) -> None:
|
50
|
-
super().mouseGrabber()
|
51
|
-
|
52
|
-
def close(self) -> bool:
|
53
|
-
self.close_timer.stop()
|
54
|
-
self.deleteLater()
|
55
|
-
return super().close()
|
@@ -1,43 +0,0 @@
|
|
1
|
-
from pathlib import Path
|
2
|
-
|
3
|
-
import PySide6
|
4
|
-
from PySide6.QtGui import QPixmap, QAction, Qt
|
5
|
-
from PySide6.QtWidgets import QWidget, QLabel, QGridLayout, QFileDialog, QMenu
|
6
|
-
|
7
|
-
from frontengine.utils.multi_language.language_wrapper import language_wrapper
|
8
|
-
|
9
|
-
|
10
|
-
class ImageGenerateShow(QWidget):
|
11
|
-
|
12
|
-
def __init__(self, pixmap: QPixmap, title: str):
|
13
|
-
super().__init__()
|
14
|
-
self.setWindowTitle(title)
|
15
|
-
self.setAttribute(Qt.WidgetAttribute.WA_DeleteOnClose)
|
16
|
-
self.pixmap = pixmap
|
17
|
-
self.label = QLabel()
|
18
|
-
self.label.setPixmap(pixmap)
|
19
|
-
self.grid_layout = QGridLayout(self)
|
20
|
-
self.grid_layout.setContentsMargins(0, 0, 0, 0)
|
21
|
-
self.grid_layout.addWidget(self.label)
|
22
|
-
self.setLayout(self.grid_layout)
|
23
|
-
|
24
|
-
# Menubar
|
25
|
-
self.menu = QMenu(self)
|
26
|
-
self.save_image_action = QAction(language_wrapper.language_word_dict.get("save_generation_image"))
|
27
|
-
self.save_image_action.triggered.connect(self.save_image)
|
28
|
-
self.menu.addAction(self.save_image_action)
|
29
|
-
|
30
|
-
def save_image(self):
|
31
|
-
file_path = QFileDialog().getSaveFileName(
|
32
|
-
parent=self,
|
33
|
-
dir=str(Path.cwd()),
|
34
|
-
filter="Images (*.png;*.jpg;*.webp)"
|
35
|
-
)[0]
|
36
|
-
file_path = Path(file_path)
|
37
|
-
self.pixmap.save(str(file_path))
|
38
|
-
|
39
|
-
def mousePressEvent(self, event: PySide6.QtGui.QMouseEvent) -> None:
|
40
|
-
if event.button() == Qt.MouseButton.RightButton:
|
41
|
-
self.menu.move(self.x() + event.x(), self.y() + event.y())
|
42
|
-
self.menu.show()
|
43
|
-
super().mousePressEvent(event)
|
@@ -1,65 +0,0 @@
|
|
1
|
-
from pathlib import Path
|
2
|
-
from typing import List
|
3
|
-
|
4
|
-
from PySide6.QtGui import QStandardItemModel, QStandardItem
|
5
|
-
from PySide6.QtWidgets import QMessageBox
|
6
|
-
|
7
|
-
from frontengine.ui.dialog.choose_file_dialog import choose_scene_json
|
8
|
-
from frontengine.ui.dialog.save_file_dialog import choose_file_get_save_filename
|
9
|
-
from frontengine.utils.json.json_file import write_json, read_json
|
10
|
-
from frontengine.utils.multi_language.language_wrapper import language_wrapper
|
11
|
-
|
12
|
-
chat_model = QStandardItemModel()
|
13
|
-
|
14
|
-
# Set horizontal label
|
15
|
-
label_list = [
|
16
|
-
language_wrapper.language_word_dict.get("scene_table_view_type"),
|
17
|
-
language_wrapper.language_word_dict.get("scene_file_path"),
|
18
|
-
language_wrapper.language_word_dict.get("url"),
|
19
|
-
language_wrapper.language_word_dict.get("text"),
|
20
|
-
language_wrapper.language_word_dict.get("Opacity"),
|
21
|
-
language_wrapper.language_word_dict.get("Speed"),
|
22
|
-
language_wrapper.language_word_dict.get("Volume"),
|
23
|
-
language_wrapper.language_word_dict.get("Font size"),
|
24
|
-
language_wrapper.language_word_dict.get("Play rate"),
|
25
|
-
language_wrapper.language_word_dict.get("web_setting_open_local_file"),
|
26
|
-
language_wrapper.language_word_dict.get("web_setting_open_enable_input"),
|
27
|
-
language_wrapper.language_word_dict.get("position_x"),
|
28
|
-
language_wrapper.language_word_dict.get("position_y"),
|
29
|
-
]
|
30
|
-
chat_model.setHorizontalHeaderLabels(label_list)
|
31
|
-
|
32
|
-
|
33
|
-
def add_row_data(data_list: List):
|
34
|
-
row = chat_model.rowCount()
|
35
|
-
for index, data in enumerate(data_list):
|
36
|
-
chat_model.setItem(row, index, QStandardItem(str(data)))
|
37
|
-
|
38
|
-
|
39
|
-
def output_scene_as_json(parent_qt_widget):
|
40
|
-
output_dict = dict()
|
41
|
-
output_setting = list()
|
42
|
-
for row in range(chat_model.rowCount()):
|
43
|
-
settings = list()
|
44
|
-
for column in range(chat_model.columnCount()):
|
45
|
-
settings.append(chat_model.item(row, column).text())
|
46
|
-
output_setting.append(settings)
|
47
|
-
output_dict.update({"settings": output_setting})
|
48
|
-
file_path = choose_file_get_save_filename(parent_qt_widget)
|
49
|
-
if file_path is not None and file_path != "":
|
50
|
-
file_path = Path(file_path)
|
51
|
-
file_path = file_path.with_suffix(".json")
|
52
|
-
write_json(str(file_path), output_dict)
|
53
|
-
else:
|
54
|
-
choose_path_to_output_message_box = QMessageBox(parent_qt_widget)
|
55
|
-
choose_path_to_output_message_box.setText(
|
56
|
-
language_wrapper.language_word_dict.get("scene_choose_output_path_message_box"))
|
57
|
-
|
58
|
-
|
59
|
-
def load_scene_json(parent_qt_widget):
|
60
|
-
scene_file = choose_scene_json(parent_qt_widget)
|
61
|
-
if scene_file is not None:
|
62
|
-
scene_setting: dict = read_json(scene_file)
|
63
|
-
scene_setting = scene_setting.get("settings")
|
64
|
-
for setting in scene_setting:
|
65
|
-
add_row_data(setting)
|