Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BCU-Vercors
ID26
id26
Commits
cc2290e8
Commit
cc2290e8
authored
Feb 19, 2020
by
Marie Claire Lagier
Browse files
par26menu deleted
parent
38d0c246
Pipeline
#21771
failed
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
id26/scripts/par26menu.py
deleted
100644 → 0
View file @
38d0c246
#from bliss import setup_globals
from
bliss.config
import
static
from
bliss.shell.cli.user_dialog
import
UserMsg
,
UserYesNo
,
UserInput
,
UserCheckBox
,
UserChoice
from
bliss.shell.cli.user_dialog
import
BlissWizard
from
bliss.shell.cli.pt_widgets
import
BlissDialog
,
display
'''
dlg = UserYesNo(label="Do you want to save changes?")
response=display(dlg, title='Bliss manager')
if response is True:
dlg = UserMsg(label="Changes saved to disk.")
display(dlg, title='Bliss manager')
dlg1 = UserInput(label="User name")
dlg2 = UserCheckBox(label="Enable auto-save", defval=True)
dlg3 = UserChoice(label="File format", values=[('txt','.txt'), ('hdf5','.hdf5'), ('tiff','.tiff')])
BlissDialog( [ [dlg1], [dlg2, dlg3] ] , title='Bliss manager',paddings=(3,3)).show()
bdg1 = BlissDialog( ... )
bdg2 = BlissDialog( ... ) --> OK/Cancel
BlissWizard([bdg1, bdg2]).show()
'''
sc
=
static
.
get_config
()
sc
.
reload
()
par26
=
sc
.
get_config
(
'par26'
)
def
par26menu
():
dlg_exit
=
UserChoice
(
label
=
"on EXIT:"
,
values
=
[(
'mem'
,
'Save to memory'
),(
'beacon'
,
'Save to disk'
)]
)
dlg_id
=
UserCheckBox
(
label
=
"Gap tracking"
,
defval
=
False
)
rep
=
BlissDialog
([[
dlg_id
],[
dlg_exit
]],
title
=
'ID26 control parameters'
).
show
()
if
rep
not
False
:
if
rep
[
dlg_exit
]
is
'mem'
:
par26
[
'id_linked'
].
set
(
'on'
if
rep
[
dlg_id
]
is
True
else
'off'
)
if
rep
[
dlg_exit
]
is
'beacon'
:
par26
.
save
()
return
rep
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment