Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
labcode
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CST
labcode
Commits
3933eb88
Commit
3933eb88
authored
2 months ago
by
Alexandros Asonitis
Browse files
Options
Downloads
Patches
Plain Diff
Simple mockup exe programm
parent
a733c6be
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
hp4194/cv_qt_inteface.py
+91
-2
91 additions, 2 deletions
hp4194/cv_qt_inteface.py
with
91 additions
and
2 deletions
hp4194/cv_qt_inteface.py
+
91
−
2
View file @
3933eb88
import
os
import
sys
import
sys
os
.
environ
[
"
QT_API
"
]
=
"
PyQt6
"
from
PyQt6.QtWidgets
import
*
from
PyQt6.QtWidgets
import
*
from
matplotlib.backends.backend_qtagg
import
FigureCanvasQTAgg
from
matplotlib.figure
import
Figure
class
MplCanvas
(
FigureCanvasQTAgg
):
def
__init__
(
self
,
parent
=
None
,
width
=
5
,
height
=
4
,
dpi
=
100
):
fig
=
Figure
(
figsize
=
(
width
,
height
),
dpi
=
dpi
)
self
.
axes
=
fig
.
add_subplot
(
111
)
super
().
__init__
(
fig
)
class
MainWinow
(
QMainWindow
):
class
MainWinow
(
QMainWindow
):
def
__init__
(
self
):
def
__init__
(
self
):
super
().
__init__
()
super
().
__init__
()
sample_information
=
QGroupBox
(
parent
=
self
,
title
=
"
Sample Information
"
)
widget
=
QWidget
()
# Abstarct main widget
self
.
setCentralWidget
(
sample_information
)
app_grid
=
QGridLayout
()
# App Layout
sample_information
=
QGroupBox
(
"
Sample Information
"
)
sample_grid
=
QGridLayout
()
sample_grid
.
addWidget
(
QLabel
(
"
Wafer
"
),
0
,
0
)
sample_grid
.
addWidget
(
QLineEdit
(),
1
,
0
)
sample_grid
.
addWidget
(
QLabel
(
"
Sample
"
),
2
,
0
)
sample_grid
.
addWidget
(
QLineEdit
(),
3
,
0
)
sample_grid
.
addWidget
(
QLabel
(
"
Field
"
),
4
,
0
)
sample_grid
.
addWidget
(
QLineEdit
(),
5
,
0
)
sample_grid
.
addWidget
(
QLabel
(
"
Comment
"
),
0
,
1
)
sample_grid
.
addWidget
(
QLineEdit
(),
1
,
1
)
sample_grid
.
addWidget
(
QLabel
(
"
Temperature (K)
"
),
4
,
1
)
sample_grid
.
addWidget
(
QSpinBox
(),
5
,
1
)
sample_information
.
setLayout
(
sample_grid
)
app_grid
.
addWidget
(
sample_information
,
0
,
0
)
# Measuring parameters
parameters
=
QGroupBox
(
"
Measurement Parameters
"
)
parameters_grid
=
QVBoxLayout
()
parameters_grid
.
addWidget
(
QLabel
(
"
U_start
"
))
parameters_grid
.
addWidget
(
QDoubleSpinBox
())
parameters_grid
.
addWidget
(
QLabel
(
"
U_stop
"
))
parameters_grid
.
addWidget
(
QDoubleSpinBox
())
parameters_grid
.
addWidget
(
QLabel
(
"
U_step
"
))
parameters_grid
.
addWidget
(
QDoubleSpinBox
())
parameters_grid
.
addWidget
(
QLabel
(
"
Wait in voltage point
"
))
parameters_grid
.
addWidget
(
QDoubleSpinBox
())
parameters_grid
.
addWidget
(
QLabel
(
"
Area of the test structure
"
))
parameters_grid
.
addWidget
(
QDoubleSpinBox
())
parameters_grid
.
addWidget
(
QLabel
(
"
Observed frequency point
"
))
parameters_grid
.
addWidget
(
QSpinBox
())
parameters_grid
.
addWidget
(
QLabel
(
"
Observed voltage point
"
))
parameters_grid
.
addWidget
(
QSpinBox
())
parameters
.
setLayout
(
parameters_grid
)
app_grid
.
addWidget
(
parameters
,
1
,
0
)
# Sweep Parameters
sweep
=
QGroupBox
(
"
Sweep Parameters
"
)
sweep_grid
=
QGridLayout
()
sweep_grid
.
addWidget
(
QLabel
(
"
Number of frequency points
"
),
0
,
0
)
sweep_grid
.
addWidget
(
QSpinBox
(),
1
,
0
)
sweep_grid
.
addWidget
(
QLabel
(
"
f_start (Hz)
"
),
2
,
0
)
sweep_grid
.
addWidget
(
QDoubleSpinBox
(),
3
,
0
)
sweep_grid
.
addWidget
(
QLabel
(
"
f_stop (Hz)
"
),
4
,
0
)
sweep_grid
.
addWidget
(
QDoubleSpinBox
(),
5
,
0
)
sweep_grid
.
addWidget
(
QLabel
(
"
Sweep Type
"
),
6
,
0
)
# here sweep direction
sweep_grid
.
addWidget
(
QComboBox
(),
7
,
0
)
sweep_grid
.
addWidget
(
QLabel
(
"
Integration Time
"
),
8
,
0
)
sweep_grid
.
addWidget
(
QComboBox
(),
9
,
0
)
sweep_grid
.
addWidget
(
QLabel
(
"
Delay(ms)
"
),
0
,
1
)
sweep_grid
.
addWidget
(
QDoubleSpinBox
(),
1
,
1
)
sweep_grid
.
addWidget
(
QLabel
(
"
Delay Apperture
"
),
2
,
1
)
sweep_grid
.
addWidget
(
QDoubleSpinBox
(),
3
,
1
)
sweep_grid
.
addWidget
(
QLabel
(
"
Sweep direction
"
),
6
,
1
)
sweep_grid
.
addWidget
(
QComboBox
(),
7
,
1
)
sweep_grid
.
addWidget
(
QLabel
(
"
Averaging Number
"
),
8
,
1
)
sweep_grid
.
addWidget
(
QComboBox
(),
9
,
1
)
sweep
.
setLayout
(
sweep_grid
)
app_grid
.
addWidget
(
sweep
,
2
,
0
)
# add the plot below
sc
=
MplCanvas
(
self
,
width
=
10
,
height
=
8
,
dpi
=
100
)
sc
.
axes
.
plot
([
0
,
1
,
2
,
3
,
4
],[
10
,
1
,
20
,
3
,
40
])
app_grid
.
addWidget
(
sc
,
0
,
1
,
3
,
1
)
widget
.
setLayout
(
app_grid
)
self
.
setCentralWidget
(
widget
)
self
.
show
()
self
.
show
()
app
=
QApplication
(
sys
.
argv
)
app
=
QApplication
(
sys
.
argv
)
...
...
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