Skip to content

Commit

Permalink
Add ReEdgeGPT menu
Browse files Browse the repository at this point in the history
Add ReEdgeGPT menu
  • Loading branch information
JE-Chen committed Sep 9, 2023
1 parent 5e26dee commit 610ea2b
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 8 deletions.
2 changes: 2 additions & 0 deletions automation_editor/automation_editor_ui/menu/build_menubar.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
build_automation_install_menu
from automation_editor.automation_editor_ui.menu.install_menu.tools_menu.build_tool_install_menu import \
build_tool_install_menu
from automation_editor.automation_editor_ui.menu.tools_menu.bing_gpt_menu.build_bing_gpt_menu import set_bing_gpt_menu

if TYPE_CHECKING:
from automation_editor.automation_editor_ui.editor_main.main_ui import AutomationEditor
Expand All @@ -34,3 +35,4 @@ def add_menu_to_menubar(ui_we_want_to_set: AutomationEditor):
set_web_runner_menu(ui_we_want_to_set)
build_automation_install_menu(ui_we_want_to_set)
build_tool_install_menu(ui_we_want_to_set)
set_bing_gpt_menu(ui_we_want_to_set)
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
from __future__ import annotations

from typing import TYPE_CHECKING

from PySide6.QtGui import QAction

from automation_editor.automation_editor_ui.menu.menu_utils import open_web_browser

if TYPE_CHECKING:
from automation_editor.automation_editor_ui.editor_main.main_ui import AutomationEditor


def set_bing_gpt_menu(ui_we_want_to_set: AutomationEditor):
ui_we_want_to_set.bing_gpt_menu = ui_we_want_to_set.menu.addMenu("ReEdgeGPT")
ui_we_want_to_set.bing_gpt_menu.help_menu = ui_we_want_to_set.bing_gpt_menu.addMenu("HELP")
# Open Doc
ui_we_want_to_set.bing_gpt_menu.help_menu.open_bing_gpt_menu_doc_action = QAction("Open ReEdgeGPT Doc")
ui_we_want_to_set.bing_gpt_menu.help_menu.open_bing_gpt_menu_doc_action.triggered.connect(
lambda: open_web_browser(
ui_we_want_to_set,
"https://reedgegpt.readthedocs.io/en/latest/",
"ReEdgeGPT Doc"
)
)
ui_we_want_to_set.bing_gpt_menu.help_menu.addAction(
ui_we_want_to_set.bing_gpt_menu.help_menu.open_bing_gpt_menu_doc_action
)
# Open Github
ui_we_want_to_set.bing_gpt_menu.help_menu.open_re_edge_gpt_github_action = QAction("Open ReEdgeGPT GitHub")
ui_we_want_to_set.bing_gpt_menu.help_menu.open_re_edge_gpt_github_action.triggered.connect(
lambda: open_web_browser(
ui_we_want_to_set,
"https://github.com/Integration-Automation/ReEdgeGPT",
"ReEdgeGPT GitHub"
)
)
ui_we_want_to_set.bing_gpt_menu.help_menu.addAction(
ui_we_want_to_set.bing_gpt_menu.help_menu.open_re_edge_gpt_github_action
)
8 changes: 4 additions & 4 deletions pyproject.toml
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 dev version
# This is dev version
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "automation_editor"
version = "0.0.26"
name = "automation_editor_dev"
version = "0.0.27"
authors = [
{ name = "JE-Chen", email = "jechenmailman@gmail.com" },
]
Expand Down
8 changes: 4 additions & 4 deletions dev.toml → stable.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Rename to dev version
# This is dev version
# Rename to build stable version
# This is stable version
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "automation_editor_dev"
version = "0.0.26"
name = "automation_editor"
version = "0.0.27"
authors = [
{ name = "JE-Chen", email = "jechenmailman@gmail.com" },
]
Expand Down

0 comments on commit 610ea2b

Please sign in to comment.