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
b1d3c9ef
Commit
b1d3c9ef
authored
2 years ago
by
Andreas Bolin
Browse files
Options
Downloads
Patches
Plain Diff
added menu option to hide exit dialog
parent
d2b76693
No related branches found
No related tags found
1 merge request
!78
Add scheduler GUI
Pipeline
#72853
passed
2 years ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
b_asic/scheduler-gui/main_window.py
+14
-5
14 additions, 5 deletions
b_asic/scheduler-gui/main_window.py
b_asic/scheduler-gui/main_window.ui
+27
-6
27 additions, 6 deletions
b_asic/scheduler-gui/main_window.ui
with
41 additions
and
11 deletions
b_asic/scheduler-gui/main_window.py
+
14
−
5
View file @
b1d3c9ef
...
...
@@ -138,6 +138,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self
.
menu_save_as
.
triggered
.
connect
(
self
.
save_as
)
self
.
menu_quit
.
triggered
.
connect
(
self
.
close
)
self
.
menu_node_info
.
triggered
.
connect
(
self
.
toggle_component_info
)
self
.
menu_exit_dialog
.
triggered
.
connect
(
self
.
toggle_exit_dialog
)
self
.
splitter_center
.
splitterMoved
.
connect
(
self
.
_splitter_center_moved
)
# Setup event member functions
...
...
@@ -226,6 +227,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
#TODO: self.open(schedule_obj_list[ret_tuple[0])
self
.
_schedules
[
self
.
_schedule_id
]
=
schedule
self
.
_schedule_id
+=
1
print
(
self
.
_schedule_id
)
pprint
(
self
.
_schedules
)
self
.
printButtonPressed
(
'
load_sfg()
'
)
...
...
@@ -258,6 +260,12 @@ class MainWindow(QMainWindow, Ui_MainWindow):
else
:
settings
.
setValue
(
"
mainwindow/splitter_center/last_state
"
,
self
.
splitter_center
.
saveState
())
self
.
splitter_center
.
moveSplitter
(
range
[
1
],
1
)
@Slot
(
bool
)
def
toggle_exit_dialog
(
self
,
checked
:
bool
):
s
=
QSettings
()
s
.
setValue
(
"
mainwindow/hide_exit_dialog
"
,
checked
)
@Slot
(
int
,
int
)
def
_splitter_center_moved
(
self
,
pos
:
int
,
index
:
int
)
->
None
:
...
...
@@ -344,11 +352,12 @@ class MainWindow(QMainWindow, Ui_MainWindow):
if
s
.
value
(
'
mainwindow/maximized
'
,
defaultValue
=
False
,
type
=
bool
):
self
.
showMaximized
()
else
:
self
.
move
(
s
.
value
(
'
mainwindow/pos
'
,
defaultValue
=
self
.
pos
()))
self
.
resize
(
s
.
value
(
'
mainwindow/size
'
,
defaultValue
=
self
.
size
()))
self
.
restoreState
(
s
.
value
(
'
mainwindow/state
'
,
defaultValue
=
QByteArray
()))
self
.
menu_node_info
.
setChecked
(
s
.
value
(
'
mainwindow/menu/node_info
'
,
defaultValue
=
True
,
type
=
bool
))
self
.
splitter_center
.
restoreState
(
s
.
value
(
'
mainwindow/splitter/state
'
,
defaultValue
=
QByteArray
()))
self
.
move
(
s
.
value
(
'
mainwindow/pos
'
,
self
.
pos
()))
self
.
resize
(
s
.
value
(
'
mainwindow/size
'
,
self
.
size
()))
self
.
restoreState
(
s
.
value
(
'
mainwindow/state
'
,
QByteArray
()))
self
.
menu_node_info
.
setChecked
(
s
.
value
(
'
mainwindow/menu/node_info
'
,
True
,
bool
))
self
.
splitter_center
.
restoreState
(
s
.
value
(
'
mainwindow/splitter/state
'
,
QByteArray
()))
self
.
menu_exit_dialog
.
setChecked
(
s
.
value
(
'
mainwindow/hide_exit_dialog
'
,
False
,
bool
))
log
.
debug
(
'
Settings read from
\'
{}
\'
.
'
.
format
(
s
.
fileName
()))
...
...
This diff is collapsed.
Click to expand it.
b_asic/scheduler-gui/main_window.ui
+
27
−
6
View file @
b1d3c9ef
...
...
@@ -100,9 +100,16 @@
<string>
&
Edit
</string>
</property>
</widget>
<widget
class=
"QMenu"
name=
"menuWindow"
>
<property
name=
"title"
>
<string>
&
Window
</string>
</property>
<addaction
name=
"menu_exit_dialog"
/>
</widget>
<addaction
name=
"menuFile"
/>
<addaction
name=
"menu_Edit"
/>
<addaction
name=
"menuView"
/>
<addaction
name=
"menuWindow"
/>
</widget>
<widget
class=
"QStatusBar"
name=
"statusbar"
/>
<widget
class=
"QDockWidget"
name=
"dockWidget_2"
>
...
...
@@ -166,8 +173,7 @@
</widget>
<action
name=
"menu_load_from_file"
>
<property
name=
"icon"
>
<iconset
theme=
"document-open-folder"
>
<normaloff>
.
</normaloff>
.
</iconset>
<iconset
theme=
"document-open-folder"
/>
</property>
<property
name=
"text"
>
<string>
&
Load Schedule From File...
</string>
...
...
@@ -184,8 +190,7 @@
</action>
<action
name=
"menu_save"
>
<property
name=
"icon"
>
<iconset
theme=
"document-save"
>
<normaloff>
.
</normaloff>
.
</iconset>
<iconset
theme=
"document-save"
/>
</property>
<property
name=
"text"
>
<string>
&
Save
</string>
...
...
@@ -204,6 +209,9 @@
<property
name=
"checked"
>
<bool>
true
</bool>
</property>
<property
name=
"icon"
>
<iconset
theme=
"application-menu"
/>
</property>
<property
name=
"text"
>
<string>
&
Node Info
</string>
</property>
...
...
@@ -213,6 +221,9 @@
<property
name=
"shortcut"
>
<string>
Ctrl+I
</string>
</property>
<property
name=
"iconVisibleInMenu"
>
<bool>
false
</bool>
</property>
</action>
<action
name=
"menu_quit"
>
<property
name=
"icon"
>
...
...
@@ -228,13 +239,23 @@
</action>
<action
name=
"menu_save_as"
>
<property
name=
"icon"
>
<iconset
theme=
"document-save-as"
>
<normaloff>
.
</normaloff>
.
</iconset>
<iconset
theme=
"document-save-as"
/>
</property>
<property
name=
"text"
>
<string>
Save
&
As...
</string>
</property>
</action>
<action
name=
"menu_exit_dialog"
>
<property
name=
"checkable"
>
<bool>
true
</bool>
</property>
<property
name=
"text"
>
<string>
&
Hide exit dialog
</string>
</property>
<property
name=
"toolTip"
>
<string>
Hide exit dialog
</string>
</property>
</action>
</widget>
<resources>
<include
location=
"resources.qrc"
/>
...
...
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