je-editor 0.0.142__py3-none-any.whl → 0.0.144__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- je_editor/__init__.py +23 -23
- je_editor/pyside_ui/code/{code_editor → plaintext_code_edit}/code_edit_plaintext.py +2 -2
- je_editor/pyside_ui/code/syntax/python_syntax.py +1 -2
- je_editor/pyside_ui/code/syntax/syntax_setting.py +1 -1
- je_editor/pyside_ui/dialog/file_dialog/open_file_dialog.py +3 -3
- je_editor/pyside_ui/dialog/file_dialog/save_file_dialog.py +1 -1
- je_editor/pyside_ui/main_ui/dock/destroy_dock.py +14 -0
- je_editor/pyside_ui/main_ui/editor/editor_widget.py +2 -2
- je_editor/pyside_ui/main_ui/editor/editor_widget_full.py +31 -0
- je_editor/pyside_ui/main_ui/main_editor.py +2 -3
- je_editor/pyside_ui/main_ui/menu/dock_menu/__init__.py +0 -0
- je_editor/pyside_ui/main_ui/menu/dock_menu/build_dock_menu.py +74 -0
- je_editor/pyside_ui/main_ui/menu/help_menu/build_help_menu.py +22 -14
- je_editor/pyside_ui/main_ui/menu/set_menu_bar.py +2 -0
- je_editor/pyside_ui/main_ui/menu/tab_menu/build_tab_menu.py +15 -0
- je_editor/pyside_ui/main_ui/menu/venv_menu/build_venv_menu.py +1 -1
- je_editor/start_editor.py +1 -1
- je_editor/utils/file/open/open_file.py +0 -3
- je_editor/utils/file/save/save_file.py +0 -1
- {je_editor-0.0.142.dist-info → je_editor-0.0.144.dist-info}/METADATA +1 -1
- {je_editor-0.0.142.dist-info → je_editor-0.0.144.dist-info}/RECORD +28 -25
- je_editor/pyside_ui/main_ui/main_ui_setting/ui_setting.py +0 -11
- /je_editor/pyside_ui/code/{code_editor → plaintext_code_edit}/__init__.py +0 -0
- /je_editor/pyside_ui/code/{code_result → textedit_code_result}/__init__.py +0 -0
- /je_editor/pyside_ui/code/{code_result → textedit_code_result}/code_record.py +0 -0
- /je_editor/pyside_ui/main_ui/{main_ui_setting → dock}/__init__.py +0 -0
- {je_editor-0.0.142.dist-info → je_editor-0.0.144.dist-info}/LICENSE +0 -0
- {je_editor-0.0.142.dist-info → je_editor-0.0.144.dist-info}/WHEEL +0 -0
- {je_editor-0.0.142.dist-info → je_editor-0.0.144.dist-info}/top_level.txt +0 -0
je_editor/__init__.py
CHANGED
@@ -1,37 +1,37 @@
|
|
1
1
|
# start editor
|
2
|
-
|
2
|
+
# Browser
|
3
|
+
from je_editor.pyside_ui.browser.je_broser import JEBrowser
|
4
|
+
from je_editor.pyside_ui.code.code_process.code_exec import ExecManager
|
5
|
+
# Exec and shell
|
6
|
+
from je_editor.pyside_ui.code.code_process.code_exec import exec_manage
|
7
|
+
# Highlight
|
8
|
+
from je_editor.pyside_ui.code.complete_list.total_complete_list import complete_list
|
9
|
+
from je_editor.pyside_ui.code.shell_process.shell_exec import ShellManager
|
10
|
+
from je_editor.pyside_ui.code.shell_process.shell_exec import default_shell_manager
|
11
|
+
from je_editor.pyside_ui.code.syntax.python_syntax import PythonHighlighter
|
12
|
+
from je_editor.pyside_ui.code.syntax.syntax_setting import syntax_word_setting_dict, syntax_rule_setting_dict
|
13
|
+
# Color
|
14
|
+
from je_editor.pyside_ui.colors.global_color import error_color
|
15
|
+
from je_editor.pyside_ui.colors.global_color import output_color
|
16
|
+
from je_editor.pyside_ui.main_ui.editor.editor_widget import EditorWidget
|
17
|
+
from je_editor.pyside_ui.main_ui.editor.editor_widget_full import FullEditorWidget
|
18
|
+
from je_editor.pyside_ui.main_ui.main_editor import EDITOR_EXTEND_TAB
|
3
19
|
# Editor
|
4
20
|
from je_editor.pyside_ui.main_ui.main_editor import EditorMain
|
5
|
-
from je_editor.
|
6
|
-
from je_editor.
|
21
|
+
from je_editor.start_editor import start_editor
|
22
|
+
from je_editor.utils.exception.exceptions import JEditorCantFindLanguageException
|
23
|
+
from je_editor.utils.exception.exceptions import JEditorContentFileException
|
7
24
|
# Exceptions
|
8
25
|
from je_editor.utils.exception.exceptions import JEditorException
|
9
26
|
from je_editor.utils.exception.exceptions import JEditorExecException
|
27
|
+
from je_editor.utils.exception.exceptions import JEditorJsonException
|
28
|
+
from je_editor.utils.exception.exceptions import JEditorOpenFileException
|
10
29
|
from je_editor.utils.exception.exceptions import JEditorRunOnShellException
|
11
30
|
from je_editor.utils.exception.exceptions import JEditorSaveFileException
|
12
|
-
from je_editor.utils.exception.exceptions import JEditorOpenFileException
|
13
|
-
from je_editor.utils.exception.exceptions import JEditorContentFileException
|
14
|
-
from je_editor.utils.exception.exceptions import JEditorCantFindLanguageException
|
15
|
-
from je_editor.utils.exception.exceptions import JEditorJsonException
|
16
|
-
# Color
|
17
|
-
from je_editor.pyside_ui.colors.global_color import error_color
|
18
|
-
from je_editor.pyside_ui.colors.global_color import output_color
|
19
|
-
# Exec and shell
|
20
|
-
from je_editor.pyside_ui.code.code_process.code_exec import exec_manage
|
21
|
-
from je_editor.pyside_ui.code.code_process.code_exec import ExecManager
|
22
|
-
from je_editor.pyside_ui.code.shell_process.shell_exec import default_shell_manager
|
23
|
-
from je_editor.pyside_ui.code.shell_process.shell_exec import ShellManager
|
24
|
-
# Browser
|
25
|
-
from je_editor.pyside_ui.browser.je_broser import JEBrowser
|
26
|
-
# Highlight
|
27
|
-
from je_editor.pyside_ui.code.complete_list.total_complete_list import complete_list
|
28
|
-
from je_editor.pyside_ui.code.syntax.python_syntax import PythonHighlighter
|
29
|
-
from je_editor.pyside_ui.code.syntax.syntax_setting import syntax_word_setting_dict, syntax_rule_setting_dict
|
30
|
-
|
31
31
|
|
32
32
|
__all__ = [
|
33
33
|
"start_editor", "EditorMain", "EDITOR_EXTEND_TAB",
|
34
|
-
"JEditorException", "JEditorExecException",
|
34
|
+
"JEditorException", "JEditorExecException", "FullEditorWidget",
|
35
35
|
"JEditorRunOnShellException", "JEditorSaveFileException", "syntax_rule_setting_dict",
|
36
36
|
"JEditorOpenFileException", "JEditorContentFileException", "syntax_word_setting_dict",
|
37
37
|
"JEditorCantFindLanguageException", "JEditorJsonException", "PythonHighlighter",
|
@@ -6,8 +6,8 @@ from PySide6.QtGui import QPainter, QColor, QTextCharFormat, QTextFormat, QKeyEv
|
|
6
6
|
from PySide6.QtWidgets import QPlainTextEdit, QWidget, QTextEdit, QCompleter
|
7
7
|
|
8
8
|
from je_editor.pyside_ui.code.complete_list.total_complete_list import complete_list
|
9
|
-
from je_editor.pyside_ui.dialog.search_ui.search_text_box import SearchBox
|
10
9
|
from je_editor.pyside_ui.code.syntax.python_syntax import PythonHighlighter
|
10
|
+
from je_editor.pyside_ui.dialog.search_ui.search_text_box import SearchBox
|
11
11
|
|
12
12
|
|
13
13
|
class CodeEditor(QPlainTextEdit):
|
@@ -131,7 +131,7 @@ class CodeEditor(QPlainTextEdit):
|
|
131
131
|
|
132
132
|
def line_number_paint(self, event) -> None:
|
133
133
|
painter = QPainter(self.line_number)
|
134
|
-
painter.fillRect(event.rect(),
|
134
|
+
painter.fillRect(event.rect(), Qt.GlobalColor.gray)
|
135
135
|
block = self.firstVisibleBlock()
|
136
136
|
block_number = block.blockNumber()
|
137
137
|
top = self.blockBoundingGeometry(block).translated(self.contentOffset()).top()
|
@@ -17,7 +17,7 @@ class PythonHighlighter(QSyntaxHighlighter):
|
|
17
17
|
text_char_format = QTextCharFormat()
|
18
18
|
text_char_format.setForeground(color)
|
19
19
|
for word in rule_variable_dict.get("words"):
|
20
|
-
pattern = QRegularExpression(rf"{word}")
|
20
|
+
pattern = QRegularExpression(rf"\b{word}\b")
|
21
21
|
self.highlight_rules.append((pattern, text_char_format))
|
22
22
|
|
23
23
|
for rule_variable_dict in syntax_rule_setting_dict.values():
|
@@ -34,4 +34,3 @@ class PythonHighlighter(QSyntaxHighlighter):
|
|
34
34
|
while match_iterator.hasNext():
|
35
35
|
match = match_iterator.next()
|
36
36
|
self.setFormat(match.capturedStart(), match.capturedLength(), pattern_format)
|
37
|
-
|
@@ -1,10 +1,10 @@
|
|
1
1
|
from __future__ import annotations
|
2
2
|
|
3
|
+
from pathlib import Path
|
3
4
|
from typing import TYPE_CHECKING
|
4
5
|
|
5
6
|
if TYPE_CHECKING:
|
6
7
|
from je_editor.pyside_ui.main_ui.main_editor import EditorMain
|
7
|
-
import os
|
8
8
|
|
9
9
|
from PySide6.QtWidgets import QFileDialog
|
10
10
|
|
@@ -20,10 +20,10 @@ def choose_file_get_open_file_path(parent_qt_instance: EditorMain) -> None:
|
|
20
20
|
:return: None
|
21
21
|
"""
|
22
22
|
widget = parent_qt_instance.tab_widget.currentWidget()
|
23
|
-
if
|
23
|
+
if isinstance(widget, EditorWidget):
|
24
24
|
file_path = QFileDialog().getOpenFileName(
|
25
25
|
parent=parent_qt_instance,
|
26
|
-
dir=
|
26
|
+
dir=str(Path.cwd())
|
27
27
|
)[0]
|
28
28
|
if file_path is not None and file_path != "":
|
29
29
|
widget.current_file = file_path
|
@@ -18,7 +18,7 @@ def choose_file_get_save_file_path(parent_qt_instance: EditorMain) -> bool:
|
|
18
18
|
:return: save code edit content to file
|
19
19
|
"""
|
20
20
|
widget = parent_qt_instance.tab_widget.currentWidget()
|
21
|
-
if
|
21
|
+
if isinstance(widget, EditorWidget):
|
22
22
|
file_path = QFileDialog().getSaveFileName(
|
23
23
|
parent=parent_qt_instance,
|
24
24
|
dir=os.getcwd()
|
@@ -0,0 +1,14 @@
|
|
1
|
+
from PySide6.QtCore import Qt
|
2
|
+
from PySide6.QtWidgets import QDockWidget
|
3
|
+
|
4
|
+
|
5
|
+
class DestroyDock(QDockWidget):
|
6
|
+
|
7
|
+
def __init__(self):
|
8
|
+
super().__init__()
|
9
|
+
self.setAllowedAreas(Qt.DockWidgetArea.AllDockWidgetAreas)
|
10
|
+
self.setAttribute(Qt.WidgetAttribute.WA_DeleteOnClose)
|
11
|
+
|
12
|
+
def closeEvent(self, event) -> None:
|
13
|
+
self.widget().closeEvent(event)
|
14
|
+
super().closeEvent(event)
|
@@ -6,8 +6,8 @@ from PySide6.QtCore import Qt, QFileInfo, QDir
|
|
6
6
|
from PySide6.QtWidgets import QWidget, QGridLayout, QSplitter, QScrollArea, QFileSystemModel, QTreeView
|
7
7
|
|
8
8
|
from je_editor.pyside_ui.code.auto_save.auto_save_thread import SaveThread
|
9
|
-
from je_editor.pyside_ui.code.
|
10
|
-
from je_editor.pyside_ui.code.
|
9
|
+
from je_editor.pyside_ui.code.plaintext_code_edit.code_edit_plaintext import CodeEditor
|
10
|
+
from je_editor.pyside_ui.code.textedit_code_result.code_record import CodeRecord
|
11
11
|
from je_editor.pyside_ui.main_ui.save_user_setting.user_setting_file import user_setting_dict, \
|
12
12
|
write_user_setting
|
13
13
|
from je_editor.utils.file.open.open_file import read_file
|
@@ -0,0 +1,31 @@
|
|
1
|
+
from pathlib import Path
|
2
|
+
|
3
|
+
from PySide6.QtWidgets import QWidget, QGridLayout, QScrollArea
|
4
|
+
|
5
|
+
from je_editor.pyside_ui.code.plaintext_code_edit.code_edit_plaintext import CodeEditor
|
6
|
+
from je_editor.utils.file.save.save_file import write_file
|
7
|
+
|
8
|
+
|
9
|
+
class FullEditorWidget(QWidget):
|
10
|
+
|
11
|
+
def __init__(self, current_file: str):
|
12
|
+
super().__init__()
|
13
|
+
# Init variable
|
14
|
+
self.auto_save_thread = None
|
15
|
+
self.current_file = current_file
|
16
|
+
# UI
|
17
|
+
self.grid_layout = QGridLayout(self)
|
18
|
+
self.setWindowTitle("JEditor")
|
19
|
+
# code edit and code result plaintext
|
20
|
+
self.code_edit = CodeEditor()
|
21
|
+
self.code_edit_scroll_area = QScrollArea()
|
22
|
+
self.code_edit_scroll_area.setWidgetResizable(True)
|
23
|
+
self.code_edit_scroll_area.setViewportMargins(0, 0, 0, 0)
|
24
|
+
self.code_edit_scroll_area.setWidget(self.code_edit)
|
25
|
+
self.grid_layout.addWidget(self.code_edit_scroll_area, 0, 0)
|
26
|
+
|
27
|
+
def closeEvent(self, event) -> None:
|
28
|
+
path = Path(self.current_file)
|
29
|
+
if path.exists() and path.is_file():
|
30
|
+
write_file(self.current_file, self.code_edit.toPlainText())
|
31
|
+
super().closeEvent(event)
|
@@ -8,20 +8,19 @@ from PySide6.QtCore import QTimer
|
|
8
8
|
from PySide6.QtGui import QFontDatabase, QAction, QIcon
|
9
9
|
from PySide6.QtWidgets import QMainWindow, QWidget, QTabWidget
|
10
10
|
from frontengine import FrontEngineMainUI
|
11
|
+
from frontengine import RedirectManager
|
11
12
|
from qt_material import QtStyleTools
|
12
13
|
|
13
14
|
from je_editor.pyside_ui.browser.je_broser import JEBrowser
|
14
15
|
from je_editor.pyside_ui.code.shell_process.shell_exec import default_shell_manager
|
15
16
|
from je_editor.pyside_ui.colors.global_color import error_color, output_color
|
16
17
|
from je_editor.pyside_ui.main_ui.editor.editor_widget import EditorWidget
|
17
|
-
from je_editor.pyside_ui.main_ui.main_ui_setting.ui_setting import set_ui
|
18
18
|
from je_editor.pyside_ui.main_ui.menu.set_menu_bar import set_menu_bar
|
19
19
|
from je_editor.pyside_ui.main_ui.save_user_setting.user_setting_file import user_setting_dict, read_user_setting
|
20
20
|
from je_editor.pyside_ui.main_ui.system_tray.extend_system_tray import ExtendSystemTray
|
21
21
|
from je_editor.utils.encodings.python_encodings import python_encodings_list
|
22
22
|
from je_editor.utils.file.open.open_file import read_file
|
23
23
|
from je_editor.utils.redirect_manager.redirect_manager_class import redirect_manager_instance
|
24
|
-
from frontengine import RedirectManager
|
25
24
|
|
26
25
|
EDITOR_EXTEND_TAB: Dict[str, Type[QWidget]] = {}
|
27
26
|
|
@@ -64,7 +63,7 @@ class EditorMain(QMainWindow, QtStyleTools):
|
|
64
63
|
self.redirect_timer = QTimer(self)
|
65
64
|
self.redirect_timer.setInterval(1)
|
66
65
|
self.redirect_timer.start()
|
67
|
-
|
66
|
+
self.setWindowTitle("JEditor")
|
68
67
|
set_menu_bar(self)
|
69
68
|
# Set font and font size menu
|
70
69
|
self.add_font_menu()
|
File without changes
|
@@ -0,0 +1,74 @@
|
|
1
|
+
from __future__ import annotations
|
2
|
+
|
3
|
+
from pathlib import Path
|
4
|
+
from typing import TYPE_CHECKING
|
5
|
+
|
6
|
+
from PySide6.QtCore import Qt
|
7
|
+
from PySide6.QtGui import QAction
|
8
|
+
from PySide6.QtWidgets import QFileDialog
|
9
|
+
from frontengine import FrontEngineMainUI
|
10
|
+
|
11
|
+
from je_editor.pyside_ui.browser.je_broser import JEBrowser
|
12
|
+
from je_editor.pyside_ui.main_ui.dock.destroy_dock import DestroyDock
|
13
|
+
from je_editor.pyside_ui.main_ui.editor.editor_widget_full import FullEditorWidget
|
14
|
+
from je_editor.utils.file.open.open_file import read_file
|
15
|
+
|
16
|
+
if TYPE_CHECKING:
|
17
|
+
from je_editor.pyside_ui.main_ui.main_editor import EditorMain
|
18
|
+
|
19
|
+
|
20
|
+
def set_dock_menu(ui_we_want_to_set: EditorMain) -> None:
|
21
|
+
# Browser
|
22
|
+
ui_we_want_to_set.dock_menu = ui_we_want_to_set.menu.addMenu("Dock")
|
23
|
+
ui_we_want_to_set.dock_menu.new_dock_browser_action = QAction("New Dock Browser")
|
24
|
+
ui_we_want_to_set.dock_menu.new_dock_browser_action.triggered.connect(
|
25
|
+
lambda: add_dock_widget(ui_we_want_to_set)
|
26
|
+
)
|
27
|
+
ui_we_want_to_set.dock_menu.addAction(ui_we_want_to_set.dock_menu.new_dock_browser_action)
|
28
|
+
# Stackoverflow
|
29
|
+
ui_we_want_to_set.dock_menu.new_dock_stackoverflow_action = QAction("New Dock Stackoverflow")
|
30
|
+
ui_we_want_to_set.dock_menu.new_dock_stackoverflow_action.triggered.connect(
|
31
|
+
lambda: add_dock_widget(ui_we_want_to_set, "stackoverflow")
|
32
|
+
)
|
33
|
+
ui_we_want_to_set.dock_menu.addAction(ui_we_want_to_set.dock_menu.new_dock_stackoverflow_action)
|
34
|
+
# Editor
|
35
|
+
ui_we_want_to_set.dock_menu.new_tab_dock_editor_action = QAction("New Dock Editor")
|
36
|
+
ui_we_want_to_set.dock_menu.new_tab_dock_editor_action.triggered.connect(
|
37
|
+
lambda: add_dock_widget(ui_we_want_to_set, "editor")
|
38
|
+
)
|
39
|
+
ui_we_want_to_set.dock_menu.addAction(ui_we_want_to_set.dock_menu.new_tab_dock_editor_action)
|
40
|
+
# FrontEngine
|
41
|
+
ui_we_want_to_set.dock_menu.new_frontengine = QAction("New Dock FrontEngine")
|
42
|
+
ui_we_want_to_set.dock_menu.new_frontengine.triggered.connect(
|
43
|
+
lambda: add_dock_widget(ui_we_want_to_set, "frontengine")
|
44
|
+
)
|
45
|
+
ui_we_want_to_set.dock_menu.addAction(ui_we_want_to_set.dock_menu.new_frontengine)
|
46
|
+
|
47
|
+
|
48
|
+
def add_dock_widget(ui_we_want_to_set: EditorMain, widget_type: str = None):
|
49
|
+
# Dock widget
|
50
|
+
dock_widget = DestroyDock()
|
51
|
+
if widget_type == "stackoverflow":
|
52
|
+
dock_widget.setWindowTitle("stackoverflow")
|
53
|
+
dock_widget.setWidget(JEBrowser(
|
54
|
+
start_url="https://stackoverflow.com/", search_prefix="https://stackoverflow.com/search?q="))
|
55
|
+
elif widget_type == "editor":
|
56
|
+
file_path = QFileDialog().getOpenFileName(
|
57
|
+
parent=ui_we_want_to_set,
|
58
|
+
dir=str(Path.cwd())
|
59
|
+
)[0]
|
60
|
+
if file_path is not None and file_path != "":
|
61
|
+
widget = FullEditorWidget(current_file=file_path)
|
62
|
+
file_content = read_file(file_path)[1]
|
63
|
+
widget.code_edit.setPlainText(
|
64
|
+
file_content
|
65
|
+
)
|
66
|
+
dock_widget.setWindowTitle("editor")
|
67
|
+
dock_widget.setWidget(widget)
|
68
|
+
elif widget_type == "frontengine":
|
69
|
+
dock_widget.setWindowTitle("frontengine")
|
70
|
+
dock_widget.setWidget(FrontEngineMainUI())
|
71
|
+
else:
|
72
|
+
dock_widget.setWindowTitle("browser")
|
73
|
+
dock_widget.setWidget(JEBrowser())
|
74
|
+
ui_we_want_to_set.addDockWidget(Qt.DockWidgetArea.RightDockWidgetArea, dock_widget)
|
@@ -2,9 +2,10 @@ from __future__ import annotations
|
|
2
2
|
|
3
3
|
from typing import TYPE_CHECKING
|
4
4
|
|
5
|
+
from je_editor.pyside_ui.browser.je_broser import JEBrowser
|
6
|
+
|
5
7
|
if TYPE_CHECKING:
|
6
8
|
from je_editor.pyside_ui.main_ui.main_editor import EditorMain
|
7
|
-
import webbrowser
|
8
9
|
|
9
10
|
from PySide6.QtGui import QAction
|
10
11
|
from PySide6.QtWidgets import QMessageBox
|
@@ -12,27 +13,34 @@ from PySide6.QtWidgets import QMessageBox
|
|
12
13
|
|
13
14
|
def set_help_menu(ui_we_want_to_set: EditorMain) -> None:
|
14
15
|
ui_we_want_to_set.help_menu = ui_we_want_to_set.menu.addMenu("Help")
|
15
|
-
ui_we_want_to_set.help_menu
|
16
|
-
ui_we_want_to_set.help_menu
|
17
|
-
lambda: open_web_browser(
|
16
|
+
ui_we_want_to_set.help_menu.help_github_action = QAction("GitHub")
|
17
|
+
ui_we_want_to_set.help_menu.help_github_action.triggered.connect(
|
18
|
+
lambda: open_web_browser(
|
19
|
+
ui_we_want_to_set,
|
20
|
+
"https://github.com/Integrated-Testing-Environment/je_editor", "GitHub")
|
18
21
|
)
|
19
|
-
ui_we_want_to_set.help_menu.addAction(ui_we_want_to_set.help_menu
|
22
|
+
ui_we_want_to_set.help_menu.addAction(ui_we_want_to_set.help_menu.help_github_action)
|
20
23
|
|
21
|
-
ui_we_want_to_set.help_menu
|
22
|
-
ui_we_want_to_set.help_menu
|
23
|
-
lambda: open_web_browser(
|
24
|
+
ui_we_want_to_set.help_menu.help_doc_action = QAction("Doc")
|
25
|
+
ui_we_want_to_set.help_menu.help_doc_action.triggered.connect(
|
26
|
+
lambda: open_web_browser(
|
27
|
+
ui_we_want_to_set,
|
28
|
+
"https://je-editor.readthedocs.io/en/latest/", "Doc")
|
24
29
|
)
|
25
|
-
ui_we_want_to_set.help_menu.addAction(ui_we_want_to_set.help_menu
|
30
|
+
ui_we_want_to_set.help_menu.addAction(ui_we_want_to_set.help_menu.help_doc_action)
|
26
31
|
|
27
|
-
ui_we_want_to_set.help_menu
|
28
|
-
ui_we_want_to_set.help_menu
|
32
|
+
ui_we_want_to_set.help_menu.help_about_action = QAction("About")
|
33
|
+
ui_we_want_to_set.help_menu.help_about_action.triggered.connect(
|
29
34
|
show_about
|
30
35
|
)
|
31
36
|
ui_we_want_to_set.help_menu.addAction(ui_we_want_to_set.help_menu.help_about_action)
|
32
37
|
|
33
38
|
|
34
|
-
def open_web_browser(url: str):
|
35
|
-
|
39
|
+
def open_web_browser(ui_we_want_to_set: EditorMain, url: str, tab_name: str):
|
40
|
+
ui_we_want_to_set.tab_widget.addTab(
|
41
|
+
JEBrowser(start_url=url),
|
42
|
+
f"{tab_name}{ui_we_want_to_set.tab_widget.count()}"
|
43
|
+
)
|
36
44
|
|
37
45
|
|
38
46
|
def show_about():
|
@@ -40,7 +48,7 @@ def show_about():
|
|
40
48
|
message_box.setText(
|
41
49
|
"""
|
42
50
|
JEditor
|
43
|
-
Create by JE-Chen
|
51
|
+
Create by JE-Chen 2020 ~ Now
|
44
52
|
"""
|
45
53
|
)
|
46
54
|
message_box.exec()
|
@@ -2,6 +2,7 @@ from __future__ import annotations
|
|
2
2
|
|
3
3
|
from typing import TYPE_CHECKING
|
4
4
|
|
5
|
+
from je_editor.pyside_ui.main_ui.menu.dock_menu.build_dock_menu import set_dock_menu
|
5
6
|
from je_editor.pyside_ui.main_ui.menu.tab_menu.build_tab_menu import set_tab_menu
|
6
7
|
|
7
8
|
if TYPE_CHECKING:
|
@@ -25,4 +26,5 @@ def set_menu_bar(ui_we_want_to_set: EditorMain) -> None:
|
|
25
26
|
set_help_menu(ui_we_want_to_set)
|
26
27
|
set_venv_menu(ui_we_want_to_set)
|
27
28
|
set_tab_menu(ui_we_want_to_set)
|
29
|
+
set_dock_menu(ui_we_want_to_set)
|
28
30
|
ui_we_want_to_set.setMenuBar(ui_we_want_to_set.menu)
|
@@ -13,22 +13,31 @@ from PySide6.QtGui import QAction
|
|
13
13
|
|
14
14
|
|
15
15
|
def set_tab_menu(ui_we_want_to_set: EditorMain) -> None:
|
16
|
+
# Editor
|
16
17
|
ui_we_want_to_set.tab_menu = ui_we_want_to_set.menu.addMenu("Tab")
|
17
18
|
ui_we_want_to_set.tab_menu.add_editor_action = QAction("Add Editor Tab")
|
18
19
|
ui_we_want_to_set.tab_menu.add_editor_action.triggered.connect(
|
19
20
|
lambda: add_editor_tab(ui_we_want_to_set)
|
20
21
|
)
|
22
|
+
# Front Engine
|
21
23
|
ui_we_want_to_set.tab_menu.addAction(ui_we_want_to_set.tab_menu.add_editor_action)
|
22
24
|
ui_we_want_to_set.tab_menu.add_frontengine_action = QAction("Add FrontEngine Tab")
|
23
25
|
ui_we_want_to_set.tab_menu.add_frontengine_action.triggered.connect(
|
24
26
|
lambda: add_frontengine_tab(ui_we_want_to_set)
|
25
27
|
)
|
28
|
+
# Web
|
26
29
|
ui_we_want_to_set.tab_menu.addAction(ui_we_want_to_set.tab_menu.add_frontengine_action)
|
27
30
|
ui_we_want_to_set.tab_menu.add_web_action = QAction("Add WEB Tab")
|
28
31
|
ui_we_want_to_set.tab_menu.add_web_action.triggered.connect(
|
29
32
|
lambda: add_web_tab(ui_we_want_to_set)
|
30
33
|
)
|
31
34
|
ui_we_want_to_set.tab_menu.addAction(ui_we_want_to_set.tab_menu.add_web_action)
|
35
|
+
# Stackoverflow
|
36
|
+
ui_we_want_to_set.tab_menu.add_stackoverflow_action = QAction("Add Stackoverflow Tab")
|
37
|
+
ui_we_want_to_set.tab_menu.add_stackoverflow_action.triggered.connect(
|
38
|
+
lambda: add_stackoverflow(ui_we_want_to_set)
|
39
|
+
)
|
40
|
+
ui_we_want_to_set.tab_menu.addAction(ui_we_want_to_set.tab_menu.add_stackoverflow_action)
|
32
41
|
|
33
42
|
|
34
43
|
def add_editor_tab(ui_we_want_to_set: EditorMain):
|
@@ -44,3 +53,9 @@ def add_frontengine_tab(ui_we_want_to_set: EditorMain):
|
|
44
53
|
def add_web_tab(ui_we_want_to_set: EditorMain):
|
45
54
|
ui_we_want_to_set.tab_widget.addTab(
|
46
55
|
JEBrowser(), f"Web Browser {ui_we_want_to_set.tab_widget.count()}")
|
56
|
+
|
57
|
+
|
58
|
+
def add_stackoverflow(ui_we_want_to_set: EditorMain):
|
59
|
+
ui_we_want_to_set.tab_widget.addTab(
|
60
|
+
JEBrowser(start_url="https://stackoverflow.com/", search_prefix="https://stackoverflow.com/search?q="),
|
61
|
+
f"Stackoverflow {ui_we_want_to_set.tab_widget.count()}")
|
je_editor/start_editor.py
CHANGED
@@ -6,7 +6,7 @@ from qt_material import apply_stylesheet
|
|
6
6
|
from je_editor.pyside_ui.main_ui.main_editor import EditorMain
|
7
7
|
|
8
8
|
|
9
|
-
def start_editor(debug_mode: bool = False,) -> None:
|
9
|
+
def start_editor(debug_mode: bool = False, ) -> None:
|
10
10
|
new_editor = QApplication(sys.argv)
|
11
11
|
window = EditorMain(debug_mode)
|
12
12
|
apply_stylesheet(new_editor, theme='dark_amber.xml')
|
@@ -1,55 +1,58 @@
|
|
1
|
-
je_editor/__init__.py,sha256=
|
1
|
+
je_editor/__init__.py,sha256=MRYb2B_58aMbHFS1a7rl5hvnIo6ep4ZfqyZIbkm0Y38,2373
|
2
2
|
je_editor/__main__.py,sha256=tv19PbVG_8bg4HhRWINNYL_Zu6VtkJR00U_0v56GsK8,598
|
3
|
-
je_editor/start_editor.py,sha256=
|
3
|
+
je_editor/start_editor.py,sha256=0vm9fMVtmS_2jXN9etLwzlRbYQwVNa3NbOz8W0bhTS4,526
|
4
4
|
je_editor/pyside_ui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
5
|
je_editor/pyside_ui/browser/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
6
|
je_editor/pyside_ui/browser/je_broser.py,sha256=Py2ndQdk6y4HG6WDWU0hgSp-NkpT3ldS45IJwfPsuI8,2118
|
7
7
|
je_editor/pyside_ui/code/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
8
|
je_editor/pyside_ui/code/auto_save/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
9
9
|
je_editor/pyside_ui/code/auto_save/auto_save_thread.py,sha256=fta94JKI9siw4zNSTo_JVydDmKa5Y4Tn4AIoqOhUPS8,1159
|
10
|
-
je_editor/pyside_ui/code/code_editor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
11
|
-
je_editor/pyside_ui/code/code_editor/code_edit_plaintext.py,sha256=XEp5molPQp3Wa0pm0rNdsEjRdLgRreuYrQi6c5xhbTU,9851
|
12
10
|
je_editor/pyside_ui/code/code_process/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
13
11
|
je_editor/pyside_ui/code/code_process/code_exec.py,sha256=tnh7hufKotGasBMlDhiaMUc1PNyCLgmaj5bqR3y8uk0,7919
|
14
|
-
je_editor/pyside_ui/code/code_result/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
15
|
-
je_editor/pyside_ui/code/code_result/code_record.py,sha256=PLFK4NoEu_cehIWknUOZGVfq1JXV71klL2p-0plUSiY,1476
|
16
12
|
je_editor/pyside_ui/code/complete_list/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
17
13
|
je_editor/pyside_ui/code/complete_list/total_complete_list.py,sha256=u5Bop4WGv2WPQg2m5BJps5jIKTOTW6o7HvU2Dl4BhLE,1110
|
14
|
+
je_editor/pyside_ui/code/plaintext_code_edit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
15
|
+
je_editor/pyside_ui/code/plaintext_code_edit/code_edit_plaintext.py,sha256=4PGpmns2_4Cf9u2ZY3HW0ZQ9yapP-7GYOebVIQxftIk,9852
|
18
16
|
je_editor/pyside_ui/code/shell_process/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
19
17
|
je_editor/pyside_ui/code/shell_process/shell_exec.py,sha256=4DyHzsGqAJyF-BuUPa04CjRWehw4zyW8dSAYHzTX8ao,7155
|
20
18
|
je_editor/pyside_ui/code/syntax/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
21
|
-
je_editor/pyside_ui/code/syntax/python_syntax.py,sha256=
|
22
|
-
je_editor/pyside_ui/code/syntax/syntax_setting.py,sha256=
|
19
|
+
je_editor/pyside_ui/code/syntax/python_syntax.py,sha256=4xsm6z0hEkh8fZ_I72eXBfkgV9hQ6FjSwJNVeYMfiEg,1611
|
20
|
+
je_editor/pyside_ui/code/syntax/syntax_setting.py,sha256=SNnOW6ioJgLF_JAVNw9yNaEKChgbFSsLkXTt-hVI8DA,2243
|
21
|
+
je_editor/pyside_ui/code/textedit_code_result/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
22
|
+
je_editor/pyside_ui/code/textedit_code_result/code_record.py,sha256=PLFK4NoEu_cehIWknUOZGVfq1JXV71klL2p-0plUSiY,1476
|
23
23
|
je_editor/pyside_ui/colors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
24
24
|
je_editor/pyside_ui/colors/global_color.py,sha256=So7yrBceSWeurhmE5ezcOxan7aNTrMs5U8Vya6vNrr8,155
|
25
25
|
je_editor/pyside_ui/dialog/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
26
26
|
je_editor/pyside_ui/dialog/file_dialog/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
27
27
|
je_editor/pyside_ui/dialog/file_dialog/create_file_dialog.py,sha256=-zTqhs0PWOYEDMwzI4GsxWEXeTdPbfLONX2gMZz_26s,1240
|
28
|
-
je_editor/pyside_ui/dialog/file_dialog/open_file_dialog.py,sha256=
|
29
|
-
je_editor/pyside_ui/dialog/file_dialog/save_file_dialog.py,sha256
|
28
|
+
je_editor/pyside_ui/dialog/file_dialog/open_file_dialog.py,sha256=_MePCPN5cly_HVj_Fvq6hmP5wbL29bo7-G92ZjPFGoU,1518
|
29
|
+
je_editor/pyside_ui/dialog/file_dialog/save_file_dialog.py,sha256=-rUva0Bvo6C_i4hsZc2A2ela362z11oykjIGuYhgchw,1470
|
30
30
|
je_editor/pyside_ui/dialog/search_ui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
31
31
|
je_editor/pyside_ui/dialog/search_ui/search_error_box.py,sha256=ost5tDwCJp6izbJNDb4jPJrrOpoNAuDkhpROW9R02NQ,865
|
32
32
|
je_editor/pyside_ui/dialog/search_ui/search_text_box.py,sha256=DRtJ3QHu-QzvGwIRLebzCgpVV17apNB2-4Q3tsBwnSM,857
|
33
33
|
je_editor/pyside_ui/main_ui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
34
|
-
je_editor/pyside_ui/main_ui/main_editor.py,sha256=
|
34
|
+
je_editor/pyside_ui/main_ui/main_editor.py,sha256=FLeMXibq9mdgX9VwmDIDMFFY37p1Sz4XgLkDKuWg0Ro,10856
|
35
|
+
je_editor/pyside_ui/main_ui/dock/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
36
|
+
je_editor/pyside_ui/main_ui/dock/destroy_dock.py,sha256=nyXCE-wAKN1kuOOs-ClQIH8NU0fXlJKbjOZWuDojvhw,418
|
35
37
|
je_editor/pyside_ui/main_ui/editor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
36
|
-
je_editor/pyside_ui/main_ui/editor/editor_widget.py,sha256=
|
37
|
-
je_editor/pyside_ui/main_ui/
|
38
|
-
je_editor/pyside_ui/main_ui/main_ui_setting/ui_setting.py,sha256=6uUHHImkasyr-6-XKLL4kiWlUoA-_PvCyXURohPiCAY,279
|
38
|
+
je_editor/pyside_ui/main_ui/editor/editor_widget.py,sha256=8UluGyZtBnY36SedXuucr46mFmMG-gfayixud6t402M,4491
|
39
|
+
je_editor/pyside_ui/main_ui/editor/editor_widget_full.py,sha256=4Btmz8R5Nc0kKR7Bk3ZX3XG1vy3x-khx-afpLRa9tGA,1197
|
39
40
|
je_editor/pyside_ui/main_ui/menu/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
40
|
-
je_editor/pyside_ui/main_ui/menu/set_menu_bar.py,sha256=
|
41
|
+
je_editor/pyside_ui/main_ui/menu/set_menu_bar.py,sha256=ksV5WNKdv2bmZWvPqUkKWYshsl-dPy3IZ0i-o59P3Ww,1332
|
41
42
|
je_editor/pyside_ui/main_ui/menu/check_style_menu/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
42
43
|
je_editor/pyside_ui/main_ui/menu/check_style_menu/build_check_style_menu.py,sha256=GXaN7wWrL8UUQYZgXUyPQeoyAsLnKEc1YC58x_-GVmo,2239
|
44
|
+
je_editor/pyside_ui/main_ui/menu/dock_menu/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
45
|
+
je_editor/pyside_ui/main_ui/menu/dock_menu/build_dock_menu.py,sha256=mzgmQX3iiBLyTAoAo_FMkVNu9kUNa5rHBmMFMIAeWJ8,3385
|
43
46
|
je_editor/pyside_ui/main_ui/menu/file_menu/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
44
47
|
je_editor/pyside_ui/main_ui/menu/file_menu/build_file_menu.py,sha256=HPNz764mhzodlWJL9OQf4xy0y0QdT8RdbFSMQxBFl4E,2005
|
45
48
|
je_editor/pyside_ui/main_ui/menu/help_menu/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
46
|
-
je_editor/pyside_ui/main_ui/menu/help_menu/build_help_menu.py,sha256=
|
49
|
+
je_editor/pyside_ui/main_ui/menu/help_menu/build_help_menu.py,sha256=OBNa9K_gQ5OESje6MgtRfC9IwJqiRChFQO2LgcO63P4,1865
|
47
50
|
je_editor/pyside_ui/main_ui/menu/run_menu/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
48
51
|
je_editor/pyside_ui/main_ui/menu/run_menu/build_run_menu.py,sha256=_eO_Mxv22yRiBwBISlPsbdg1-PGCI3sOvQw5z0nxPdQ,4932
|
49
52
|
je_editor/pyside_ui/main_ui/menu/tab_menu/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
50
|
-
je_editor/pyside_ui/main_ui/menu/tab_menu/build_tab_menu.py,sha256=
|
53
|
+
je_editor/pyside_ui/main_ui/menu/tab_menu/build_tab_menu.py,sha256=ti4ATejgjfcHf9bmTWMW4KZb0EjWMxZXWuMS9Ylk2rI,2631
|
51
54
|
je_editor/pyside_ui/main_ui/menu/venv_menu/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
52
|
-
je_editor/pyside_ui/main_ui/menu/venv_menu/build_venv_menu.py,sha256
|
55
|
+
je_editor/pyside_ui/main_ui/menu/venv_menu/build_venv_menu.py,sha256=-kboawnD8T4Wh2RUfWsP6hWdv-jnKJge3757_1fvXw0,5227
|
53
56
|
je_editor/pyside_ui/main_ui/save_user_setting/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
54
57
|
je_editor/pyside_ui/main_ui/save_user_setting/user_setting_file.py,sha256=yLEnSbZfU4tn_LuBYvCJ4UW86ec-GnNM17ZE8zy7Mbw,680
|
55
58
|
je_editor/pyside_ui/main_ui/system_tray/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -62,9 +65,9 @@ je_editor/utils/exception/exception_tags.py,sha256=js-3dZgCo_EteNRCAv2DE-dU9_Byv
|
|
62
65
|
je_editor/utils/exception/exceptions.py,sha256=4e2ivqFWgBq4L_8QgRjd79xdOAgR_tyW_hpBlQeePpw,506
|
63
66
|
je_editor/utils/file/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
64
67
|
je_editor/utils/file/open/__init__.py,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
|
65
|
-
je_editor/utils/file/open/open_file.py,sha256=
|
68
|
+
je_editor/utils/file/open/open_file.py,sha256=AHYPLjjJnnGbYvtK3_xC0UOtTO1tQT7X5gjcfYx8AyY,1050
|
66
69
|
je_editor/utils/file/save/__init__.py,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
|
67
|
-
je_editor/utils/file/save/save_file.py,sha256=
|
70
|
+
je_editor/utils/file/save/save_file.py,sha256=NQk6iuf0uG27RgA7tb1fRARbW1sU9kLmwVwIWIRfhQM,760
|
68
71
|
je_editor/utils/json/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
69
72
|
je_editor/utils/json/json_file.py,sha256=pr_4K_xjz7nKG1Yd-2dhwLZzxXCeE4C7n52NgATm_5c,1370
|
70
73
|
je_editor/utils/json_format/__init__.py,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
|
@@ -73,8 +76,8 @@ je_editor/utils/redirect_manager/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRk
|
|
73
76
|
je_editor/utils/redirect_manager/redirect_manager_class.py,sha256=izziweWPARG9TjvZWNgRYMnZblfHLkSyAaEW4ku9SuE,2057
|
74
77
|
je_editor/utils/venv_check/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
75
78
|
je_editor/utils/venv_check/check_venv.py,sha256=3HjMwqJzqY8Ir6auniyZMlL0h0TAvP3nZkOI-bR4_jA,798
|
76
|
-
je_editor-0.0.
|
77
|
-
je_editor-0.0.
|
78
|
-
je_editor-0.0.
|
79
|
-
je_editor-0.0.
|
80
|
-
je_editor-0.0.
|
79
|
+
je_editor-0.0.144.dist-info/LICENSE,sha256=YcSMBs2sED35BtlErMkfIDye9Oo-3SYmUJiZJOpa34g,1085
|
80
|
+
je_editor-0.0.144.dist-info/METADATA,sha256=eDJGswXOrxR5fBHVz2vXVI5H1MXK7a7t2SivFyMg5fs,3223
|
81
|
+
je_editor-0.0.144.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
|
82
|
+
je_editor-0.0.144.dist-info/top_level.txt,sha256=_9YA7BgxpkmdLs-5V_UQILxClcMRgPyG1a3qaE-Bkcs,10
|
83
|
+
je_editor-0.0.144.dist-info/RECORD,,
|
@@ -1,11 +0,0 @@
|
|
1
|
-
from __future__ import annotations
|
2
|
-
|
3
|
-
from typing import TYPE_CHECKING
|
4
|
-
|
5
|
-
if TYPE_CHECKING:
|
6
|
-
from je_editor.pyside_ui.main_ui.main_editor import EditorMain
|
7
|
-
|
8
|
-
|
9
|
-
def set_ui(ui_we_want_to_set: EditorMain):
|
10
|
-
# set qt window
|
11
|
-
ui_we_want_to_set.setWindowTitle("JEditor")
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|