Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
total_control_app
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Martin Drechsler
total_control_app
Commits
c3350f58
Commit
c3350f58
authored
Feb 11, 2019
by
Martin Drechsler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
blink function
parent
e364e2b5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
myGUI.py
myGUI.py
+2
-0
myWidgets.py
myWidgets.py
+24
-0
No files found.
myGUI.py
View file @
c3350f58
...
...
@@ -173,6 +173,8 @@ class GuiMainWindow(QMainWindow):
self
.
layout866
.
addWidget
(
QtGui
.
QLabel
(
self
.
piezoA866
.
name
),
1
,
0
),
self
.
layout866
.
addWidget
(
self
.
piezoA866
.
sb
,
1
,
1
)
self
.
layout866
.
addWidget
(
QtGui
.
QLabel
(
self
.
piezoB866
.
name
),
2
,
0
),
self
.
layout866
.
addWidget
(
self
.
piezoB866
.
sb
,
2
,
1
)
self
.
layout866
.
addWidget
(
QtGui
.
QLabel
(
self
.
shutter866
.
name
),
3
,
0
),
self
.
layout866
.
addWidget
(
self
.
shutter866
.
cb
,
3
,
1
)
self
.
layout866
.
addWidget
(
QtGui
.
QLabel
(
"Blink"
),
3
,
2
),
self
.
layout866
.
addWidget
(
self
.
shutter866
.
blink_cb
,
3
,
3
)
self
.
layout866_scan
.
addWidget
(
QtGui
.
QLabel
(
'866 Scan piezo B'
),
0
,
0
)
self
.
layout866_scan
.
addWidget
(
QtGui
.
QLabel
(
'start'
),
1
,
0
),
self
.
layout866_scan
.
addWidget
(
self
.
piezoB866
.
scan_sb_start
,
1
,
1
)
...
...
myWidgets.py
View file @
c3350f58
...
...
@@ -193,6 +193,13 @@ class digital_control_signal(QWidget):
self
.
cb
=
QtGui
.
QCheckBox
()
self
.
cb
.
stateChanged
.
connect
(
self
.
whenChangeDigital
)
self
.
blink_cb
=
QtGui
.
QCheckBox
()
self
.
blink_cb
.
stateChanged
.
connect
(
self
.
blink
)
self
.
blink_timer
=
QTimer
()
self
.
blink_timer
.
timeout
.
connect
(
self
.
_blinkEvent
)
self
.
blink_variable
=
True
def
set_name
(
self
,
name
):
self
.
name
=
name
...
...
@@ -202,6 +209,23 @@ class digital_control_signal(QWidget):
def
whenChangeDigital
(
self
):
self
.
DO
.
set_out
(
not
self
.
cb
.
isChecked
())
def
blink
(
self
):
if
self
.
blink_cb
.
isChecked
():
self
.
blink_variable
=
self
.
cb
.
isChecked
()
self
.
blink_timer
.
start
(
1000
)
print
(
"starting blinkin"
)
else
:
self
.
blink_timer
.
stop
()
self
.
DO
.
set_out
(
self
.
cb
.
isChecked
()
)
print
(
"finishing blink"
)
def
_blinkEvent
(
self
):
self
.
blink_variable
=
not
self
.
blink_variable
self
.
DO
.
set_out
(
self
.
blink_variable
)
class
activation_button
(
QWidget
):
...
...
Write
Preview
Markdown
is supported
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