Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zhang, Tong
Online Model App
Commits
fe8cc442
Commit
fe8cc442
authored
Aug 02, 2021
by
Tong Zhang
Browse files
UI: Add menu item for lattice loading.
parent
48d3e342
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
src/myApp/ui/ui_app.py
View file @
fe8cc442
This diff is collapsed.
Click to expand it.
src/myApp/ui/ui_app.ui
View file @
fe8cc442
...
...
@@ -19,12 +19,112 @@
</property>
<widget
class=
"QWidget"
name=
"centralwidget"
>
<layout
class=
"QGridLayout"
name=
"gridLayout"
>
<item
row=
"1"
column=
"0"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<item>
<widget
class=
"QLabel"
name=
"label"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Fixed"
vsizetype=
"Preferred"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"text"
>
<string>
Select quadrupole
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QComboBox"
name=
"quad1_name_cbb"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"Fixed"
>
<horstretch>
1
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"font"
>
<font>
<family>
Monospace
</family>
</font>
</property>
</widget>
</item>
<item>
<widget
class=
"QToolButton"
name=
"quad_info_btn"
>
<property
name=
"toolTip"
>
<string>
Click to see the details of selected device.
</string>
</property>
<property
name=
"text"
>
<string>
info
</string>
</property>
<property
name=
"icon"
>
<iconset
resource=
"resources.qrc"
>
<normaloff>
:/icons/info.png
</normaloff>
:/icons/info.png
</iconset>
</property>
<property
name=
"iconSize"
>
<size>
<width>
30
</width>
<height>
30
</height>
</size>
</property>
<property
name=
"autoRaise"
>
<bool>
true
</bool>
</property>
</widget>
</item>
<item>
<spacer
name=
"horizontalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
40
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item>
<widget
class=
"QLabel"
name=
"label_2"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Fixed"
vsizetype=
"Preferred"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"text"
>
<string>
Gradient Setting
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QDoubleSpinBox"
name=
"quad1_grad_dsbox"
>
<property
name=
"suffix"
>
<string>
T/m
</string>
</property>
<property
name=
"decimals"
>
<number>
3
</number>
</property>
<property
name=
"minimum"
>
<double>
-100.000000000000000
</double>
</property>
<property
name=
"maximum"
>
<double>
100.000000000000000
</double>
</property>
<property
name=
"singleStep"
>
<double>
0.100000000000000
</double>
</property>
</widget>
</item>
</layout>
</item>
<item
row=
"0"
column=
"0"
>
<widget
class=
"QTabWidget"
name=
"tabWidget"
>
<property
name=
"currentIndex"
>
<number>
0
</number>
</property>
<widget
class=
"QWidget"
name=
"tab"
>
<widget
class=
"QWidget"
name=
"
ellipse_
tab"
>
<attribute
name=
"title"
>
<string>
Beam Ellipse
</string>
</attribute>
...
...
@@ -112,7 +212,7 @@
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<widget
class=
"QWidget"
name=
""
>
<widget
class=
"QWidget"
name=
"
layoutWidget
"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_4"
>
<item>
<widget
class=
"MatplotlibBaseWidget"
name=
"x_ellipse_plot"
>
...
...
@@ -380,98 +480,153 @@
</item>
</layout>
</widget>
<widget
class=
"QWidget"
name=
"tab
_2
"
>
<widget
class=
"QWidget"
name=
"
envelope_
tab"
>
<attribute
name=
"title"
>
<string>
Beam Envelope
</string>
</attribute>
<layout
class=
"Q
H
BoxLayout"
name=
"
horizont
alLayout_3"
>
<layout
class=
"Q
V
BoxLayout"
name=
"
vertic
alLayout_3"
>
<item>
<widget
class=
"MatplotlibCurveWidget"
name=
"envelope_plot"
>
<property
name=
"figureAutoScale"
>
<bool>
true
</bool>
</property>
<property
name=
"figureXlabel"
>
<string>
s [m]
</string>
</property>
<property
name=
"figureYlabel"
>
<string>
Envelope Size [mm]
</string>
</property>
<property
name=
"figureXYlabelFont"
>
<font>
<family>
sans-serif
</family>
<pointsize>
14
</pointsize>
<weight>
50
</weight>
<italic>
false
</italic>
<bold>
false
</bold>
</font>
</property>
<property
name=
"figureTitleFont"
>
<font>
<family>
sans-serif
</family>
<pointsize>
14
</pointsize>
<weight>
50
</weight>
<italic>
false
</italic>
<bold>
false
</bold>
</font>
</property>
<property
name=
"figureLegendToggle"
stdset=
"0"
>
<bool>
true
</bool>
</property>
<property
name=
"figureXYticksFont"
>
<font>
<family>
sans-serif
</family>
<pointsize>
12
</pointsize>
<weight>
50
</weight>
<italic>
false
</italic>
<bold>
false
</bold>
</font>
<widget
class=
"QSplitter"
name=
"envelope_plot_splitter"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<widget
class=
"MatplotlibCurveWidget"
name=
"envelope_plot"
>
<property
name=
"figureAutoScale"
>
<bool>
true
</bool>
</property>
<property
name=
"figureXlabel"
>
<string>
s [m]
</string>
</property>
<property
name=
"figureYlabel"
>
<string>
Envelope Size [mm]
</string>
</property>
<property
name=
"figureXYlabelFont"
>
<font>
<family>
sans-serif
</family>
<pointsize>
14
</pointsize>
<weight>
50
</weight>
<italic>
false
</italic>
<bold>
false
</bold>
</font>
</property>
<property
name=
"figureTitleFont"
>
<font>
<family>
sans-serif
</family>
<pointsize>
14
</pointsize>
<weight>
50
</weight>
<italic>
false
</italic>
<bold>
false
</bold>
</font>
</property>
<property
name=
"figureLegendToggle"
stdset=
"0"
>
<bool>
true
</bool>
</property>
<property
name=
"figureXYticksFont"
>
<font>
<family>
sans-serif
</family>
<pointsize>
12
</pointsize>
<weight>
50
</weight>
<italic>
false
</italic>
<bold>
false
</bold>
</font>
</property>
</widget>
<widget
class=
"MatplotlibBaseWidget"
name=
"envelope_layout_plot"
>
<property
name=
"figureAutoScale"
>
<bool>
true
</bool>
</property>
<property
name=
"figureXTicksVisible"
>
<bool>
false
</bool>
</property>
<property
name=
"figureToolbarToggle"
stdset=
"0"
>
<bool>
false
</bool>
</property>
</widget>
</widget>
</item>
</layout>
</widget>
<widget
class=
"QWidget"
name=
"ta
b_3
"
>
<widget
class=
"QWidget"
name=
"ta
jectory_tab
"
>
<attribute
name=
"title"
>
<string>
Beam Trajectory
</string>
</attribute>
<layout
class=
"Q
Grid
Layout"
name=
"
grid
Layout_
3
"
>
<item
row=
"0"
column=
"0"
>
<widget
class=
"
MatplotlibCurveWidget
"
name=
"trajectory_plot"
>
<property
name=
"
figureAutoScale
"
>
<
bool>
true
</bool
>
<layout
class=
"Q
VBox
Layout"
name=
"
vertical
Layout_
2
"
>
<item>
<widget
class=
"
QSplitter
"
name=
"trajectory_plot
_splitter
"
>
<property
name=
"
orientation
"
>
<
enum>
Qt::Vertical
</enum
>
</property>
<property
name=
"figureXlabel"
>
<string>
s [m]
</string>
<widget
class=
"MatplotlibCurveWidget"
name=
"trajectory_plot"
>
<property
name=
"figureAutoScale"
>
<bool>
true
</bool>
</property>
<property
name=
"figureXlabel"
>
<string>
s [m]
</string>
</property>
<property
name=
"figureYlabel"
>
<string>
Centroid Position [mm]
</string>
</property>
<property
name=
"figureXYlabelFont"
>
<font>
<family>
sans-serif
</family>
<pointsize>
14
</pointsize>
<weight>
50
</weight>
<italic>
false
</italic>
<bold>
false
</bold>
</font>
</property>
<property
name=
"figureTitleFont"
>
<font>
<family>
sans-serif
</family>
<pointsize>
14
</pointsize>
<weight>
50
</weight>
<italic>
false
</italic>
<bold>
false
</bold>
</font>
</property>
<property
name=
"figureXYticksFont"
>
<font>
<family>
sans-serif
</family>
<pointsize>
12
</pointsize>
<weight>
50
</weight>
<italic>
false
</italic>
<bold>
false
</bold>
</font>
</property>
</widget>
<widget
class=
"MatplotlibBaseWidget"
name=
"trajectory_layout_plot"
>
<property
name=
"figureAutoScale"
>
<bool>
true
</bool>
</property>
<property
name=
"figureToolbarToggle"
stdset=
"0"
>
<bool>
false
</bool>
</property>
</widget>
</widget>
</item>
</layout>
</widget>
<widget
class=
"QWidget"
name=
"layout_tab"
>
<attribute
name=
"title"
>
<string>
Schematic Layout
</string>
</attribute>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_7"
>
<item>
<widget
class=
"MatplotlibBaseWidget"
name=
"layout_plot"
>
<property
name=
"figureAspectRatio"
>
<string>
20
</string>
</property>
<property
name=
"figure
Ylabel
"
>
<
string>
Centroid Position [mm]
</string
>
<property
name=
"figure
TightLayout"
stdset=
"0
"
>
<
bool>
true
</bool
>
</property>
<property
name=
"figureXYlabelFont"
>
<font>
<family>
sans-serif
</family>
<pointsize>
14
</pointsize>
<weight>
50
</weight>
<italic>
false
</italic>
<bold>
false
</bold>
</font>
<property
name=
"figureDPI"
stdset=
"0"
>
<double>
130.000000000000000
</double>
</property>
<property
name=
"figureTitleFont"
>
<font>
<family>
sans-serif
</family>
<pointsize>
14
</pointsize>
<weight>
50
</weight>
<italic>
false
</italic>
<bold>
false
</bold>
</font>
<property
name=
"figureXTicksVisible"
>
<bool>
false
</bool>
</property>
<property
name=
"figureXYticksFont"
>
<font>
<family>
sans-serif
</family>
<pointsize>
12
</pointsize>
<weight>
50
</weight>
<italic>
false
</italic>
<bold>
false
</bold>
</font>
<property
name=
"figureYTicksVisible"
>
<bool>
false
</bool>
</property>
</widget>
</item>
...
...
@@ -479,106 +634,6 @@
</widget>
</widget>
</item>
<item
row=
"1"
column=
"0"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<item>
<widget
class=
"QLabel"
name=
"label"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Fixed"
vsizetype=
"Preferred"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"text"
>
<string>
Select quadrupole
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QComboBox"
name=
"quad1_name_cbb"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"Fixed"
>
<horstretch>
1
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"font"
>
<font>
<family>
Monospace
</family>
</font>
</property>
</widget>
</item>
<item>
<widget
class=
"QToolButton"
name=
"quad_info_btn"
>
<property
name=
"toolTip"
>
<string>
Click to see the details of selected device.
</string>
</property>
<property
name=
"text"
>
<string>
info
</string>
</property>
<property
name=
"icon"
>
<iconset
resource=
"resources.qrc"
>
<normaloff>
:/icons/info.png
</normaloff>
:/icons/info.png
</iconset>
</property>
<property
name=
"iconSize"
>
<size>
<width>
30
</width>
<height>
30
</height>
</size>
</property>
<property
name=
"autoRaise"
>
<bool>
true
</bool>
</property>
</widget>
</item>
<item>
<spacer
name=
"horizontalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
40
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item>
<widget
class=
"QLabel"
name=
"label_2"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Fixed"
vsizetype=
"Preferred"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"text"
>
<string>
Gradient Setting
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QDoubleSpinBox"
name=
"quad1_grad_dsbox"
>
<property
name=
"suffix"
>
<string>
T/m
</string>
</property>
<property
name=
"decimals"
>
<number>
3
</number>
</property>
<property
name=
"minimum"
>
<double>
-100.000000000000000
</double>
</property>
<property
name=
"maximum"
>
<double>
100.000000000000000
</double>
</property>
<property
name=
"singleStep"
>
<double>
0.100000000000000
</double>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<widget
class=
"QMenuBar"
name=
"menubar"
>
...
...
@@ -594,6 +649,7 @@
<property
name=
"title"
>
<string>
&
File
</string>
</property>
<addaction
name=
"actionLoad_Lattice"
/>
<addaction
name=
"actionE_xit"
/>
</widget>
<widget
class=
"QMenu"
name=
"menu_Help"
>
...
...
@@ -637,6 +693,11 @@
<string>
F1
</string>
</property>
</action>
<action
name=
"actionLoad_Lattice"
>
<property
name=
"text"
>
<string>
Load Lattice
</string>
</property>
</action>
</widget>
<customwidgets>
<customwidget>
...
...
@@ -709,8 +770,8 @@
<slot>
on_auto_xlim()
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
8
3
6
</x>
<y>
7
82
</y>
<x>
86
3
</x>
<y>
7
95
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
1730
</x>
...
...
@@ -725,8 +786,8 @@
<slot>
on_auto_ylim()
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
1
675
</x>
<y>
7
74
</y>
<x>
1
708
</x>
<y>
7
95
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
1729
</x>
...
...
@@ -741,8 +802,8 @@
<slot>
on_ellipse_size_changed()
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
49
7
</x>
<y>
8
19
</y>
<x>
51
7
</x>
<y>
8
37
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
1731
</x>
...
...
@@ -750,6 +811,150 @@
</hint>
</hints>
</connection>
<connection>
<sender>
envelope_plot
</sender>
<signal>
autoScaleOnUpdated(bool)
</signal>
<receiver>
envelope_layout_plot
</receiver>
<slot>
setFigureAutoScale(bool)
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
642
</x>
<y>
333
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
864
</x>
<y>
621
</y>
</hint>
</hints>
</connection>
<connection>
<sender>
envelope_plot
</sender>
<signal>
gridOnUpdated(bool)
</signal>
<receiver>
envelope_layout_plot
</receiver>
<slot>
setFigureGridToggle(bool)
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
500
</x>
<y>
435
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
770
</x>
<y>
613
</y>
</hint>
</hints>
</connection>
<connection>
<sender>
envelope_plot
</sender>
<signal>
xlimitMinChanged(double)
</signal>
<receiver>
envelope_layout_plot
</receiver>
<slot>
setXLimitMin(double)
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
589
</x>
<y>
375
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
602
</x>
<y>
563
</y>
</hint>
</hints>
</connection>
<connection>
<sender>
envelope_plot
</sender>
<signal>
xlimitMaxChanged(double)
</signal>
<receiver>
envelope_layout_plot
</receiver>
<slot>
setXLimitMax(double)
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
486
</x>
<y>
366
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
477
</x>
<y>
516
</y>
</hint>
</hints>
</connection>
<connection>
<sender>
trajectory_plot
</sender>
<signal>
autoScaleOnUpdated(bool)
</signal>
<receiver>
trajectory_layout_plot
</receiver>
<slot>
setFigureAutoScale(bool)
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
524
</x>
<y>
427
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
530
</x>
<y>
613
</y>
</hint>
</hints>
</connection>
<connection>
<sender>
trajectory_plot
</sender>
<signal>
gridOnUpdated(bool)
</signal>
<receiver>
trajectory_layout_plot
</receiver>
<slot>
setFigureGridToggle(bool)
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
363
</x>
<y>
460
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
351
</x>
<y>
539
</y>
</hint>
</hints>
</connection>
<connection>
<sender>
trajectory_plot
</sender>
<signal>
xlimitMaxChanged(double)
</signal>
<receiver>
trajectory_layout_plot
</receiver>
<slot>
setXLimitMax(double)
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
795
</x>
<y>
418
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
797
</x>
<y>
569
</y>
</hint>
</hints>
</connection>
<connection>
<sender>
trajectory_plot
</sender>
<signal>
xlimitMinChanged(double)
</signal>
<receiver>
trajectory_layout_plot
</receiver>
<slot>
setXLimitMin(double)
</slot>
<hints>
<h