je-editor 0.0.85__py3-none-any.whl → 0.0.87__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.
- je_editor/pyside_ui/main_ui_setting/ui_setting.py +3 -3
- je_editor/pyside_ui/menu/menu_bar/check_style_menu/build_check_style_menu.py +8 -8
- je_editor/pyside_ui/menu/menu_bar/file_menu/build_file_menu.py +13 -9
- je_editor/pyside_ui/menu/menu_bar/help_menu/build_help_menu.py +10 -10
- je_editor/pyside_ui/menu/menu_bar/run_menu/build_run_menu.py +66 -18
- {je_editor-0.0.85.dist-info → je_editor-0.0.87.dist-info}/METADATA +1 -1
- {je_editor-0.0.85.dist-info → je_editor-0.0.87.dist-info}/RECORD +10 -10
- {je_editor-0.0.85.dist-info → je_editor-0.0.87.dist-info}/LICENSE +0 -0
- {je_editor-0.0.85.dist-info → je_editor-0.0.87.dist-info}/WHEEL +0 -0
- {je_editor-0.0.85.dist-info → je_editor-0.0.87.dist-info}/top_level.txt +0 -0
@@ -6,10 +6,10 @@ from je_editor.pyside_ui.code_result.code_record import CodeRecord
|
|
6
6
|
|
7
7
|
def set_ui(ui_we_want_to_set: QMainWindow):
|
8
8
|
# set qt window
|
9
|
-
ui_we_want_to_set.
|
10
|
-
ui_we_want_to_set.grid_layout = QGridLayout(ui_we_want_to_set.
|
9
|
+
ui_we_want_to_set.main_widget = QWidget()
|
10
|
+
ui_we_want_to_set.grid_layout = QGridLayout(ui_we_want_to_set.main_widget)
|
11
11
|
ui_we_want_to_set.grid_layout.setContentsMargins(0, 0, 0, 0)
|
12
|
-
ui_we_want_to_set.setCentralWidget(ui_we_want_to_set.
|
12
|
+
ui_we_want_to_set.setCentralWidget(ui_we_want_to_set.main_widget)
|
13
13
|
ui_we_want_to_set.setWindowTitle("JEditor")
|
14
14
|
# code edit and code result plaintext
|
15
15
|
ui_we_want_to_set.code_edit = CodeEditor()
|
@@ -7,23 +7,23 @@ from je_editor.utils.json_format.json_process import reformat_json
|
|
7
7
|
|
8
8
|
def set_check_menu(ui_we_want_to_set: QMainWindow):
|
9
9
|
# Yapf code check
|
10
|
-
ui_we_want_to_set.check_python_action = QAction("yapf")
|
11
|
-
ui_we_want_to_set.check_python_action.setShortcut("Ctrl+y")
|
12
|
-
ui_we_want_to_set.check_python_action.triggered.connect(
|
10
|
+
ui_we_want_to_set.check_menu.check_python_action = QAction("yapf")
|
11
|
+
ui_we_want_to_set.check_menu.check_python_action.setShortcut("Ctrl+y")
|
12
|
+
ui_we_want_to_set.check_menu.check_python_action.triggered.connect(
|
13
13
|
lambda: check_python_code(
|
14
14
|
ui_we_want_to_set
|
15
15
|
)
|
16
16
|
)
|
17
|
-
ui_we_want_to_set.check_menu.addAction(ui_we_want_to_set.check_python_action)
|
17
|
+
ui_we_want_to_set.check_menu.addAction(ui_we_want_to_set.check_menu.check_python_action)
|
18
18
|
# Reformat JSON
|
19
|
-
ui_we_want_to_set.reformat_json_action = QAction("Reformat JSON")
|
20
|
-
ui_we_want_to_set.reformat_json_action.setShortcut("Ctrl+j")
|
21
|
-
ui_we_want_to_set.reformat_json_action.triggered.connect(
|
19
|
+
ui_we_want_to_set.check_menu.reformat_json_action = QAction("Reformat JSON")
|
20
|
+
ui_we_want_to_set.check_menu.reformat_json_action.setShortcut("Ctrl+j")
|
21
|
+
ui_we_want_to_set.check_menu.reformat_json_action.triggered.connect(
|
22
22
|
lambda: reformat_json_text(
|
23
23
|
ui_we_want_to_set
|
24
24
|
)
|
25
25
|
)
|
26
|
-
ui_we_want_to_set.check_menu.addAction(ui_we_want_to_set.reformat_json_action)
|
26
|
+
ui_we_want_to_set.check_menu.addAction(ui_we_want_to_set.check_menu.reformat_json_action)
|
27
27
|
|
28
28
|
|
29
29
|
def check_python_code(ui_we_want_to_set):
|
@@ -1,4 +1,4 @@
|
|
1
|
-
from PySide6.QtGui import QAction
|
1
|
+
from PySide6.QtGui import QAction, QKeySequence, Qt
|
2
2
|
from PySide6.QtWidgets import QMainWindow
|
3
3
|
|
4
4
|
from je_editor.pyside_ui.file_dialog.open_file_dialog import choose_file_get_open_filename
|
@@ -6,17 +6,21 @@ from je_editor.pyside_ui.file_dialog.save_file_dialog import choose_file_get_sav
|
|
6
6
|
|
7
7
|
|
8
8
|
def set_file_menu(ui_we_want_to_set: QMainWindow):
|
9
|
-
ui_we_want_to_set.open_file_action = QAction("Open File")
|
10
|
-
ui_we_want_to_set.open_file_action.setShortcut(
|
11
|
-
|
9
|
+
ui_we_want_to_set.file_menu.open_file_action = QAction("Open File")
|
10
|
+
ui_we_want_to_set.file_menu.open_file_action.setShortcut(
|
11
|
+
QKeySequence(Qt.Key.Key_F, Qt.Key.Key_O)
|
12
|
+
)
|
13
|
+
ui_we_want_to_set.file_menu.open_file_action.triggered.connect(
|
12
14
|
lambda: choose_file_get_open_filename(parent_qt_instance=ui_we_want_to_set)
|
13
15
|
)
|
14
|
-
ui_we_want_to_set.file_menu.addAction(ui_we_want_to_set.open_file_action)
|
15
|
-
ui_we_want_to_set.save_file_action = QAction("Save File")
|
16
|
-
ui_we_want_to_set.save_file_action.setShortcut(
|
17
|
-
|
16
|
+
ui_we_want_to_set.file_menu.addAction(ui_we_want_to_set.file_menu.open_file_action)
|
17
|
+
ui_we_want_to_set.file_menu.save_file_action = QAction("Save File")
|
18
|
+
ui_we_want_to_set.file_menu.save_file_action.setShortcut(
|
19
|
+
QKeySequence(Qt.Key.Key_F, Qt.Key.Key_S)
|
20
|
+
)
|
21
|
+
ui_we_want_to_set.file_menu.save_file_action.triggered.connect(
|
18
22
|
lambda: choose_file_get_save_filename(parent_qt_instance=ui_we_want_to_set)
|
19
23
|
)
|
20
|
-
ui_we_want_to_set.file_menu.addAction(ui_we_want_to_set.save_file_action)
|
24
|
+
ui_we_want_to_set.file_menu.addAction(ui_we_want_to_set.file_menu.save_file_action)
|
21
25
|
|
22
26
|
|
@@ -5,23 +5,23 @@ from PySide6.QtWidgets import QMainWindow, QMessageBox
|
|
5
5
|
|
6
6
|
|
7
7
|
def set_help_menu(ui_we_want_to_set: QMainWindow):
|
8
|
-
ui_we_want_to_set.help_github_action = QAction("GitHub")
|
9
|
-
ui_we_want_to_set.help_github_action.triggered.connect(
|
8
|
+
ui_we_want_to_set.help_menu .help_github_action = QAction("GitHub")
|
9
|
+
ui_we_want_to_set.help_menu .help_github_action.triggered.connect(
|
10
10
|
lambda: open_web_browser("https://github.com/Integrated-Testing-Environment/je_editor")
|
11
11
|
)
|
12
|
-
ui_we_want_to_set.help_menu.addAction(ui_we_want_to_set.help_github_action)
|
12
|
+
ui_we_want_to_set.help_menu.addAction(ui_we_want_to_set.help_menu .help_github_action)
|
13
13
|
|
14
|
-
ui_we_want_to_set.help_doc_action = QAction("Doc")
|
15
|
-
ui_we_want_to_set.help_doc_action.triggered.connect(
|
14
|
+
ui_we_want_to_set.help_menu .help_doc_action = QAction("Doc")
|
15
|
+
ui_we_want_to_set.help_menu .help_doc_action.triggered.connect(
|
16
16
|
lambda: open_web_browser("https://je-editor.readthedocs.io/en/latest/")
|
17
17
|
)
|
18
|
-
ui_we_want_to_set.help_menu.addAction(ui_we_want_to_set.help_doc_action)
|
18
|
+
ui_we_want_to_set.help_menu.addAction(ui_we_want_to_set.help_menu .help_doc_action)
|
19
19
|
|
20
|
-
ui_we_want_to_set.help_about_action = QAction("About")
|
21
|
-
ui_we_want_to_set.help_about_action.triggered.connect(
|
20
|
+
ui_we_want_to_set.help_menu .help_about_action = QAction("About")
|
21
|
+
ui_we_want_to_set.help_menu .help_about_action.triggered.connect(
|
22
22
|
show_about
|
23
23
|
)
|
24
|
-
ui_we_want_to_set.help_menu.addAction(ui_we_want_to_set.help_about_action)
|
24
|
+
ui_we_want_to_set.help_menu.addAction(ui_we_want_to_set.help_menu.help_about_action)
|
25
25
|
|
26
26
|
|
27
27
|
def open_web_browser(url: str):
|
@@ -32,7 +32,7 @@ def show_about():
|
|
32
32
|
message_box = QMessageBox()
|
33
33
|
message_box.setText(
|
34
34
|
"""
|
35
|
-
JEditor
|
35
|
+
JEditor
|
36
36
|
Create by JE-Chen
|
37
37
|
"""
|
38
38
|
)
|
@@ -1,5 +1,5 @@
|
|
1
|
-
from PySide6.QtGui import QAction
|
2
|
-
from PySide6.QtWidgets import QMainWindow
|
1
|
+
from PySide6.QtGui import QAction, QKeySequence, Qt
|
2
|
+
from PySide6.QtWidgets import QMainWindow, QMessageBox
|
3
3
|
|
4
4
|
from je_editor.pyside_ui.code_process.code_exec import exec_manage
|
5
5
|
from je_editor.pyside_ui.file_dialog.save_file_dialog import choose_file_get_save_filename
|
@@ -7,31 +7,56 @@ from je_editor.pyside_ui.shell_process.shell_exec import shell_manager
|
|
7
7
|
|
8
8
|
|
9
9
|
def set_run_menu(ui_we_want_to_set: QMainWindow):
|
10
|
-
|
11
|
-
ui_we_want_to_set.run_program_action
|
12
|
-
ui_we_want_to_set.run_program_action.triggered.connect(
|
10
|
+
ui_we_want_to_set.run_menu.run_program_action = QAction("Run Program")
|
11
|
+
ui_we_want_to_set.run_menu.run_program_action.triggered.connect(
|
13
12
|
lambda: run_program(ui_we_want_to_set)
|
14
13
|
)
|
15
|
-
ui_we_want_to_set.run_menu.
|
16
|
-
|
17
|
-
|
14
|
+
ui_we_want_to_set.run_menu.run_program_action.setShortcut(
|
15
|
+
QKeySequence(Qt.Key.Key_R, Qt.Key.Key_F1)
|
16
|
+
)
|
17
|
+
ui_we_want_to_set.run_menu.addAction(ui_we_want_to_set.run_menu.run_program_action)
|
18
|
+
ui_we_want_to_set.run_menu.run_on_shell_action = QAction("Run On Shell")
|
19
|
+
ui_we_want_to_set.run_menu.run_on_shell_action.triggered.connect(
|
18
20
|
lambda: shell_exec(ui_we_want_to_set)
|
19
21
|
)
|
20
|
-
ui_we_want_to_set.run_menu.
|
21
|
-
|
22
|
-
|
22
|
+
ui_we_want_to_set.run_menu.run_on_shell_action.setShortcut(
|
23
|
+
QKeySequence(Qt.Key.Key_R, Qt.Key.Key_F2)
|
24
|
+
)
|
25
|
+
ui_we_want_to_set.run_menu.addAction(ui_we_want_to_set.run_menu.run_on_shell_action)
|
26
|
+
ui_we_want_to_set.run_menu.clean_result_action = QAction("Clean Result")
|
27
|
+
ui_we_want_to_set.run_menu.clean_result_action.triggered.connect(
|
23
28
|
lambda: clean_result(ui_we_want_to_set)
|
24
29
|
)
|
25
|
-
ui_we_want_to_set.run_menu.
|
30
|
+
ui_we_want_to_set.run_menu.clean_result_action.setShortcut(
|
31
|
+
QKeySequence(Qt.Key.Key_R, Qt.Key.Key_F3)
|
32
|
+
)
|
33
|
+
ui_we_want_to_set.run_menu.addAction(ui_we_want_to_set.run_menu.clean_result_action)
|
26
34
|
|
27
|
-
ui_we_want_to_set.stop_program_action = QAction("Stop Program")
|
28
|
-
ui_we_want_to_set.stop_program_action.triggered.connect(
|
35
|
+
ui_we_want_to_set.run_menu.stop_program_action = QAction("Stop Program")
|
36
|
+
ui_we_want_to_set.run_menu.stop_program_action.triggered.connect(
|
29
37
|
stop_program
|
30
38
|
)
|
31
|
-
ui_we_want_to_set.run_menu.
|
39
|
+
ui_we_want_to_set.run_menu.stop_program_action.setShortcut(
|
40
|
+
QKeySequence(Qt.Key.Key_R, Qt.Key.Key_F4)
|
41
|
+
)
|
42
|
+
ui_we_want_to_set.run_menu.addAction(ui_we_want_to_set.run_menu.stop_program_action)
|
43
|
+
# Run help menu
|
44
|
+
ui_we_want_to_set.run_menu.run_help_menu = ui_we_want_to_set.run_menu.addMenu("Run Help")
|
45
|
+
# Run help action
|
46
|
+
ui_we_want_to_set.run_menu.run_help_menu.run_help_action = QAction("Run Help")
|
47
|
+
ui_we_want_to_set.run_menu.run_help_menu.run_help_action.triggered.connect(
|
48
|
+
show_run_help
|
49
|
+
)
|
50
|
+
ui_we_want_to_set.run_menu.run_help_menu.addAction(ui_we_want_to_set.run_menu.run_help_menu.run_help_action)
|
51
|
+
# Shell help action
|
52
|
+
ui_we_want_to_set.run_menu.run_help_menu.shell_help_action = QAction("Shell Help")
|
53
|
+
ui_we_want_to_set.run_menu.run_help_menu.shell_help_action.triggered.connect(
|
54
|
+
show_shell_help
|
55
|
+
)
|
56
|
+
ui_we_want_to_set.run_menu.run_help_menu.addAction(ui_we_want_to_set.run_menu.run_help_menu.shell_help_action)
|
32
57
|
|
33
58
|
|
34
|
-
def run_program(ui_we_want_to_set):
|
59
|
+
def run_program(ui_we_want_to_set: QMainWindow):
|
35
60
|
choose_file_get_save_filename(ui_we_want_to_set)
|
36
61
|
exec_manage.main_window = ui_we_want_to_set
|
37
62
|
exec_manage.later_init()
|
@@ -40,7 +65,7 @@ def run_program(ui_we_want_to_set):
|
|
40
65
|
)
|
41
66
|
|
42
67
|
|
43
|
-
def shell_exec(ui_we_want_to_set):
|
68
|
+
def shell_exec(ui_we_want_to_set: QMainWindow):
|
44
69
|
shell_manager.main_window = ui_we_want_to_set
|
45
70
|
shell_manager.later_init()
|
46
71
|
shell_manager.exec_shell(
|
@@ -52,5 +77,28 @@ def stop_program():
|
|
52
77
|
exec_manage.exit_program()
|
53
78
|
|
54
79
|
|
55
|
-
def clean_result(ui_we_want_to_set):
|
80
|
+
def clean_result(ui_we_want_to_set: QMainWindow):
|
56
81
|
ui_we_want_to_set.code_result.setPlainText("")
|
82
|
+
|
83
|
+
|
84
|
+
def show_run_help():
|
85
|
+
message_box = QMessageBox()
|
86
|
+
message_box.setText(
|
87
|
+
"""
|
88
|
+
If you are unable to run a Python program, please make sure you are not using the default system Python.
|
89
|
+
(For Windows, you can use the Windows Store or Venv.)
|
90
|
+
(For Linux & MacOS, you can use Venv.)
|
91
|
+
"""
|
92
|
+
)
|
93
|
+
message_box.exec()
|
94
|
+
|
95
|
+
|
96
|
+
def show_shell_help():
|
97
|
+
message_box = QMessageBox()
|
98
|
+
message_box.setText(
|
99
|
+
"""
|
100
|
+
When executing a shell command, if you encounter a decoding error,
|
101
|
+
please make sure that the current encoding is consistent with the default encoding of the system shell.
|
102
|
+
"""
|
103
|
+
)
|
104
|
+
message_box.exec()
|
@@ -19,18 +19,18 @@ je_editor/pyside_ui/main_ui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMp
|
|
19
19
|
je_editor/pyside_ui/main_ui/editor_main_ui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
20
20
|
je_editor/pyside_ui/main_ui/editor_main_ui/main_editor.py,sha256=xrOMI7p7xXjNovaBal-EtYa3NlDQRROsBtxMcNmXzs0,4835
|
21
21
|
je_editor/pyside_ui/main_ui_setting/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
22
|
-
je_editor/pyside_ui/main_ui_setting/ui_setting.py,sha256=
|
22
|
+
je_editor/pyside_ui/main_ui_setting/ui_setting.py,sha256=PqKiuepGRTLp_tlp52mk_M_q6GIjpvnT8cldMhs2X4E,1643
|
23
23
|
je_editor/pyside_ui/menu/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
24
24
|
je_editor/pyside_ui/menu/menu_bar/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
25
25
|
je_editor/pyside_ui/menu/menu_bar/set_menu_bar.py,sha256=nHTLYVl8-4LTp4XmK19q6H5UQQk9QK5Xf13WdWDch0Q,1118
|
26
26
|
je_editor/pyside_ui/menu/menu_bar/check_style_menu/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
27
|
-
je_editor/pyside_ui/menu/menu_bar/check_style_menu/build_check_style_menu.py,sha256=
|
27
|
+
je_editor/pyside_ui/menu/menu_bar/check_style_menu/build_check_style_menu.py,sha256=0lcjp1rz58_68SKZ3uiSuKibmw58kSQ1MGHX0KFUgSc,1734
|
28
28
|
je_editor/pyside_ui/menu/menu_bar/file_menu/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
29
|
-
je_editor/pyside_ui/menu/menu_bar/file_menu/build_file_menu.py,sha256=
|
29
|
+
je_editor/pyside_ui/menu/menu_bar/file_menu/build_file_menu.py,sha256=MnMcMEzB391RIs97GcNKuciG3GwjFtavZIdsXQSj5Go,1228
|
30
30
|
je_editor/pyside_ui/menu/menu_bar/help_menu/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
31
|
-
je_editor/pyside_ui/menu/menu_bar/help_menu/build_help_menu.py,sha256=
|
31
|
+
je_editor/pyside_ui/menu/menu_bar/help_menu/build_help_menu.py,sha256=17mk5RJ6rzsMCnCGP_HCJUQUIX-nrPuzP7ZMTed1VnE,1319
|
32
32
|
je_editor/pyside_ui/menu/menu_bar/run_menu/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
33
|
-
je_editor/pyside_ui/menu/menu_bar/run_menu/build_run_menu.py,sha256=
|
33
|
+
je_editor/pyside_ui/menu/menu_bar/run_menu/build_run_menu.py,sha256=43DmeB1ImQk3WMZAtL2rYV2rAAPgVfkT2eYHSZ2DxVk,4141
|
34
34
|
je_editor/pyside_ui/search_ui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
35
35
|
je_editor/pyside_ui/search_ui/search_error_box.py,sha256=ost5tDwCJp6izbJNDb4jPJrrOpoNAuDkhpROW9R02NQ,865
|
36
36
|
je_editor/pyside_ui/search_ui/search_text_box.py,sha256=DRtJ3QHu-QzvGwIRLebzCgpVV17apNB2-4Q3tsBwnSM,857
|
@@ -54,8 +54,8 @@ je_editor/utils/json_format/__init__.py,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_X
|
|
54
54
|
je_editor/utils/json_format/json_process.py,sha256=Ic-OpIueSYmtWgnHPP_RzM3dlSmKTsGdLm22pypLb5M,983
|
55
55
|
je_editor/utils/redirect_manager/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
56
56
|
je_editor/utils/redirect_manager/redirect_manager_class.py,sha256=0HX7XyFhN8cFaZefKUsE1MrpQIcnLozrvNTMOsfV5zU,1991
|
57
|
-
je_editor-0.0.
|
58
|
-
je_editor-0.0.
|
59
|
-
je_editor-0.0.
|
60
|
-
je_editor-0.0.
|
61
|
-
je_editor-0.0.
|
57
|
+
je_editor-0.0.87.dist-info/LICENSE,sha256=YcSMBs2sED35BtlErMkfIDye9Oo-3SYmUJiZJOpa34g,1085
|
58
|
+
je_editor-0.0.87.dist-info/METADATA,sha256=2_FxDz-1GUIIz3GVdTiik6bv2tLeNPwczRvWyXQzieg,2904
|
59
|
+
je_editor-0.0.87.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
|
60
|
+
je_editor-0.0.87.dist-info/top_level.txt,sha256=_9YA7BgxpkmdLs-5V_UQILxClcMRgPyG1a3qaE-Bkcs,10
|
61
|
+
je_editor-0.0.87.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|