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
68c3923d
Commit
68c3923d
authored
1 year ago
by
Oscar Gustafsson
Browse files
Options
Downloads
Patches
Plain Diff
Add zoom to fit for SFG GUI
parent
45e05dfa
No related branches found
Branches containing commit
No related tags found
1 merge request
!320
Add zoom to fit
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
b_asic/GUI/main_window.py
+11
-0
11 additions, 0 deletions
b_asic/GUI/main_window.py
with
11 additions
and
0 deletions
b_asic/GUI/main_window.py
+
11
−
0
View file @
68c3923d
...
...
@@ -202,6 +202,11 @@ class SFGMainWindow(QMainWindow):
self
.
_statusbar_visible
.
triggered
.
connect
(
self
.
_toggle_statusbar
)
self
.
_ui
.
view_menu
.
addAction
(
self
.
_statusbar_visible
)
self
.
_ui
.
view_menu
.
addSeparator
()
self
.
_zoom_to_fit_action
=
QAction
(
"
Zoom to &fit
"
)
self
.
_zoom_to_fit_action
.
triggered
.
connect
(
self
.
_zoom_to_fit
)
self
.
_ui
.
view_menu
.
addAction
(
self
.
_zoom_to_fit_action
)
# Non-modal dialogs
self
.
_keybindings_page
=
None
self
.
_about_page
=
None
...
...
@@ -869,6 +874,12 @@ class SFGMainWindow(QMainWindow):
operation
.
_toggle_button
(
pressed
=
True
)
self
.
update_statusbar
(
"
Unselected all operations
"
)
def
_zoom_to_fit
(
self
,
event
=
None
):
"""
Callback for zoom to fit SFGs in window.
"""
self
.
_graphics_view
.
fitInView
(
self
.
_scene
.
sceneRect
(),
Qt
.
AspectRatioMode
.
KeepAspectRatio
)
def
_simulate_sfg
(
self
)
->
None
:
"""
Callback for simulating SFGs in separate threads.
"""
self
.
_thread
=
dict
()
...
...
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