-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #132 from Integration-Automation/dev
Dev
- Loading branch information
Showing
20 changed files
with
301 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
# Rename to build stable version | ||
# This is stable version | ||
# Rename to build dev version | ||
# This is dev version | ||
[build-system] | ||
requires = ["setuptools>=61.0"] | ||
requires = ["setuptools"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "je_editor" | ||
version = "0.0.158" | ||
name = "je_editor_dev" | ||
version = "0.0.167" | ||
authors = [ | ||
{ name = "JE-Chen", email = "[email protected]" }, | ||
] | ||
|
@@ -26,7 +26,6 @@ classifiers = [ | |
"Operating System :: OS Independent" | ||
] | ||
|
||
|
||
[project.urls] | ||
Homepage = "https://github.com/JE-Chen/je_editor" | ||
Documentation = "https://je-editor.readthedocs.io/en/latest/" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
from __future__ import annotations | ||
|
||
from typing import TYPE_CHECKING | ||
|
||
from PySide6.QtCore import Qt | ||
from PySide6.QtWidgets import QWidget, QLineEdit, QBoxLayout, QPushButton, QHBoxLayout | ||
|
||
if TYPE_CHECKING: | ||
from je_editor.pyside_ui.main_ui.main_editor import EditorWidget | ||
|
||
from je_editor.utils.multi_language.multi_language_wrapper import language_wrapper | ||
|
||
|
||
class ProcessInput(QWidget): | ||
|
||
def __init__(self, main_window: EditorWidget, process_type: str = "debugger"): | ||
super().__init__() | ||
self.setAttribute(Qt.WidgetAttribute.WA_DeleteOnClose) | ||
self.main_window = main_window | ||
self.box_layout = QBoxLayout(QBoxLayout.Direction.TopToBottom) | ||
self.command_input = QLineEdit() | ||
self.send_command_button = QPushButton() | ||
self.send_command_button.setText(language_wrapper.language_word_dict.get("process_input_send_command")) | ||
self.box_h_layout = QHBoxLayout() | ||
self.box_h_layout.addWidget(self.send_command_button) | ||
self.box_layout.addWidget(self.command_input) | ||
self.box_layout.addLayout(self.box_h_layout) | ||
if process_type == "program": | ||
self.setWindowTitle(language_wrapper.language_word_dict.get("editor_program_input_title_label")) | ||
self.send_command_button.clicked.connect(self.program_send_command) | ||
elif process_type == "shell": | ||
self.setWindowTitle(language_wrapper.language_word_dict.get("editor_shell_input_title_label")) | ||
self.send_command_button.clicked.connect(self.shell_send_command) | ||
else: | ||
self.setWindowTitle(language_wrapper.language_word_dict.get("editor_debugger_input_title_label")) | ||
self.send_command_button.clicked.connect(self.debugger_send_command) | ||
self.main_window.code_difference_result.setCurrentWidget(self.main_window.debugger_result) | ||
self.setLayout(self.box_layout) | ||
|
||
def debugger_send_command(self): | ||
if self.main_window.exec_python_debugger is not None: | ||
process_stdin = self.main_window.exec_python_debugger.process.stdin | ||
if process_stdin is not None: | ||
process_stdin.write(self.command_input.text().encode() + b"\n") | ||
process_stdin.flush() | ||
|
||
def shell_send_command(self): | ||
if self.main_window.exec_shell is not None: | ||
process_stdin = self.main_window.exec_shell.process.stdin | ||
if process_stdin is not None: | ||
process_stdin.write(self.command_input.text().encode() + b"\n") | ||
process_stdin.flush() | ||
|
||
def program_send_command(self): | ||
if self.main_window.exec_program is not None: | ||
process_stdin = self.main_window.exec_program.process.stdin | ||
if process_stdin is not None: | ||
process_stdin.write(self.command_input.text().encode() + b"\n") | ||
process_stdin.flush() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Oops, something went wrong.