Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B-ASIC - Better ASIC Toolbox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Computer Engineering
B-ASIC - Better ASIC Toolbox
Commits
ead2a5c1
Commit
ead2a5c1
authored
1 year ago
by
Oscar Gustafsson
Browse files
Options
Downloads
Patches
Plain Diff
Add documentation entry to GUI help menu
parent
4c3c5dbe
No related branches found
No related tags found
1 merge request
!314
Add documentation entry to GUI help menu
Pipeline
#95953
failed
1 year ago
Stage: test
Stage: deploy
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
b_asic/GUI/gui_interface.py
+4
-0
4 additions, 0 deletions
b_asic/GUI/gui_interface.py
b_asic/GUI/main_window.py
+12
-1
12 additions, 1 deletion
b_asic/GUI/main_window.py
with
16 additions
and
1 deletion
b_asic/GUI/gui_interface.py
+
4
−
0
View file @
ead2a5c1
...
...
@@ -121,6 +121,8 @@ class Ui_main_window(object):
self
.
keybindsBASIC
.
setObjectName
(
"
keybindsBASIC
"
)
self
.
aboutBASIC
=
QtWidgets
.
QAction
(
main_window
)
self
.
aboutBASIC
.
setObjectName
(
"
aboutBASIC
"
)
self
.
documentationBASIC
=
QtWidgets
.
QAction
(
main_window
)
self
.
documentationBASIC
.
setObjectName
(
"
documentationBASIC
"
)
self
.
file_menu
.
addAction
(
self
.
load_menu
)
self
.
file_menu
.
addAction
(
self
.
save_menu
)
self
.
file_menu
.
addAction
(
self
.
load_operations
)
...
...
@@ -132,6 +134,7 @@ class Ui_main_window(object):
self
.
edit_menu
.
addAction
(
self
.
unselect_all
)
self
.
run_menu
.
addAction
(
self
.
actionShowPC
)
self
.
run_menu
.
addAction
(
self
.
actionSimulateSFG
)
self
.
help_menu
.
addAction
(
self
.
documentationBASIC
)
self
.
help_menu
.
addAction
(
self
.
faqBASIC
)
self
.
help_menu
.
addAction
(
self
.
keybindsBASIC
)
self
.
help_menu
.
addSeparator
()
...
...
@@ -185,6 +188,7 @@ class Ui_main_window(object):
self
.
aboutBASIC
.
setText
(
_translate
(
"
main_window
"
,
"
&About B-ASIC
"
))
self
.
faqBASIC
.
setText
(
_translate
(
"
main_window
"
,
"
&FAQ
"
))
self
.
keybindsBASIC
.
setText
(
_translate
(
"
main_window
"
,
"
&Keybinds
"
))
self
.
documentationBASIC
.
setText
(
_translate
(
"
main_window
"
,
"
&Documentation
"
))
self
.
load_menu
.
setText
(
_translate
(
"
main_window
"
,
"
&Load SFG
"
))
self
.
save_menu
.
setText
(
_translate
(
"
main_window
"
,
"
&Save SFG
"
))
self
.
load_operations
.
setText
(
_translate
(
"
main_window
"
,
"
Load &operations
"
))
...
...
This diff is collapsed.
Click to expand it.
b_asic/GUI/main_window.py
+
12
−
1
View file @
ead2a5c1
...
...
@@ -9,10 +9,11 @@ import importlib.util
import
logging
import
os
import
sys
import
webbrowser
from
collections
import
deque
from
typing
import
TYPE_CHECKING
,
Deque
,
Dict
,
List
,
Optional
,
Sequence
,
Tuple
,
cast
from
qtpy.QtCore
import
QCoreApplication
,
QFileInfo
,
QSettings
,
QSize
,
Qt
,
QThread
from
qtpy.QtCore
import
QCoreApplication
,
QFileInfo
,
QSettings
,
QSize
,
Qt
,
QThread
,
Slot
from
qtpy.QtGui
import
QCursor
,
QIcon
,
QKeySequence
,
QPainter
from
qtpy.QtWidgets
import
(
QAction
,
...
...
@@ -139,10 +140,15 @@ class SFGMainWindow(QMainWindow):
self
.
_ui
.
actionShowPC
.
triggered
.
connect
(
self
.
_show_precedence_graph
)
self
.
_ui
.
actionSimulateSFG
.
triggered
.
connect
(
self
.
simulate_sfg
)
# About menu
self
.
_ui
.
faqBASIC
.
triggered
.
connect
(
self
.
display_faq_page
)
self
.
_ui
.
faqBASIC
.
setShortcut
(
QKeySequence
(
"
Ctrl+?
"
))
self
.
_ui
.
aboutBASIC
.
triggered
.
connect
(
self
.
display_about_page
)
self
.
_ui
.
keybindsBASIC
.
triggered
.
connect
(
self
.
display_keybindings_page
)
self
.
_ui
.
documentationBASIC
.
triggered
.
connect
(
self
.
_open_documentation
)
# Operation lists
self
.
_ui
.
core_operations_list
.
itemClicked
.
connect
(
self
.
_on_list_widget_item_clicked
)
...
...
@@ -857,6 +863,11 @@ class SFGMainWindow(QMainWindow):
# Kinda buggy because of the separate window in the same thread.
self
.
_simulation_dialog
.
simulate
.
connect
(
self
.
_simulate_sfg
)
@Slot
()
def
_open_documentation
(
self
,
event
=
None
)
->
None
:
"""
Callback to open documentation web page.
"""
webbrowser
.
open_new_tab
(
"
https://da.gitlab-pages.liu.se/B-ASIC/
"
)
def
display_faq_page
(
self
,
event
=
None
)
->
None
:
if
self
.
_faq_page
is
None
:
self
.
_faq_page
=
FaqWindow
(
self
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment