Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zhang, Tong
Online Model App
Commits
4ebedd5e
Commit
4ebedd5e
authored
Jul 28, 2021
by
Tong Zhang
Browse files
UI: Add controls for ellipse size.
parent
49212c8a
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/myApp/ui/ui_app.py
View file @
4ebedd5e
...
...
@@ -67,7 +67,7 @@ class Ui_MainWindow(object):
self
.
scrollArea
.
setWidgetResizable
(
True
)
self
.
scrollArea
.
setObjectName
(
"scrollArea"
)
self
.
ellipse_area
=
QtWidgets
.
QWidget
()
self
.
ellipse_area
.
setGeometry
(
QtCore
.
QRect
(
0
,
0
,
1684
,
6
2
1
))
self
.
ellipse_area
.
setGeometry
(
QtCore
.
QRect
(
0
,
0
,
1684
,
61
8
))
self
.
ellipse_area
.
setObjectName
(
"ellipse_area"
)
self
.
gridLayout_2
=
QtWidgets
.
QGridLayout
(
self
.
ellipse_area
)
self
.
gridLayout_2
.
setObjectName
(
"gridLayout_2"
)
...
...
@@ -199,6 +199,23 @@ class Ui_MainWindow(object):
self
.
tight_layout_on_chkbox
=
QtWidgets
.
QCheckBox
(
self
.
tab
)
self
.
tight_layout_on_chkbox
.
setObjectName
(
"tight_layout_on_chkbox"
)
self
.
horizontalLayout_6
.
addWidget
(
self
.
tight_layout_on_chkbox
)
self
.
line
=
QtWidgets
.
QFrame
(
self
.
tab
)
self
.
line
.
setFrameShape
(
QtWidgets
.
QFrame
.
VLine
)
self
.
line
.
setFrameShadow
(
QtWidgets
.
QFrame
.
Sunken
)
self
.
line
.
setObjectName
(
"line"
)
self
.
horizontalLayout_6
.
addWidget
(
self
.
line
)
self
.
label_10
=
QtWidgets
.
QLabel
(
self
.
tab
)
self
.
label_10
.
setObjectName
(
"label_10"
)
self
.
horizontalLayout_6
.
addWidget
(
self
.
label_10
)
self
.
size_factor_sbox
=
QtWidgets
.
QSpinBox
(
self
.
tab
)
self
.
size_factor_sbox
.
setSuffix
(
""
)
self
.
size_factor_sbox
.
setMinimum
(
1
)
self
.
size_factor_sbox
.
setMaximum
(
6
)
self
.
size_factor_sbox
.
setObjectName
(
"size_factor_sbox"
)
self
.
horizontalLayout_6
.
addWidget
(
self
.
size_factor_sbox
)
self
.
label_11
=
QtWidgets
.
QLabel
(
self
.
tab
)
self
.
label_11
.
setObjectName
(
"label_11"
)
self
.
horizontalLayout_6
.
addWidget
(
self
.
label_11
)
spacerItem
=
QtWidgets
.
QSpacerItem
(
40
,
20
,
QtWidgets
.
QSizePolicy
.
Expanding
,
QtWidgets
.
QSizePolicy
.
Minimum
)
...
...
@@ -308,6 +325,8 @@ class Ui_MainWindow(object):
self
.
action_About
.
triggered
.
connect
(
MainWindow
.
onAbout
)
self
.
auto_xlim_btn
.
clicked
.
connect
(
MainWindow
.
on_auto_xlim
)
self
.
auto_ylim_btn
.
clicked
.
connect
(
MainWindow
.
on_auto_ylim
)
self
.
size_factor_sbox
.
valueChanged
[
'int'
].
connect
(
MainWindow
.
on_ellipse_size_changed
)
QtCore
.
QMetaObject
.
connectSlotsByName
(
MainWindow
)
def
retranslateUi
(
self
,
MainWindow
):
...
...
@@ -340,6 +359,10 @@ class Ui_MainWindow(object):
self
.
mticks_on_chkbox
.
setText
(
_translate
(
"MainWindow"
,
"Minor Ticks"
))
self
.
tight_layout_on_chkbox
.
setText
(
_translate
(
"MainWindow"
,
"Compact"
))
self
.
label_10
.
setText
(
_translate
(
"MainWindow"
,
"Ellipse Size"
))
self
.
label_11
.
setText
(
_translate
(
"MainWindow"
,
"<html><head/><body><p>σ</p></body></html>"
))
self
.
tabWidget
.
setTabText
(
self
.
tabWidget
.
indexOf
(
self
.
tab
),
_translate
(
"MainWindow"
,
"Beam Ellipse"
))
self
.
envelope_plot
.
setFigureXlabel
(
_translate
(
"MainWindow"
,
"s [m]"
))
...
...
src/myApp/ui/ui_app.ui
View file @
4ebedd5e
...
...
@@ -103,7 +103,7 @@
<x>
0
</x>
<y>
0
</y>
<width>
1684
</width>
<height>
6
2
1
</height>
<height>
61
8
</height>
</rect>
</property>
<layout
class=
"QGridLayout"
name=
"gridLayout_2"
>
...
...
@@ -329,6 +329,40 @@
</property>
</widget>
</item>
<item>
<widget
class=
"Line"
name=
"line"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
</widget>
</item>
<item>
<widget
class=
"QLabel"
name=
"label_10"
>
<property
name=
"text"
>
<string>
Ellipse Size
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QSpinBox"
name=
"size_factor_sbox"
>
<property
name=
"suffix"
>
<string/>
</property>
<property
name=
"minimum"
>
<number>
1
</number>
</property>
<property
name=
"maximum"
>
<number>
6
</number>
</property>
</widget>
</item>
<item>
<widget
class=
"QLabel"
name=
"label_11"
>
<property
name=
"text"
>
<string>
<
html
><
head/
><
body
><
p
>&
sigma;
<
/p
><
/body
><
/html
>
</string>
</property>
</widget>
</item>
<item>
<spacer
name=
"horizontalSpacer_2"
>
<property
name=
"orientation"
>
...
...
@@ -635,11 +669,28 @@
</hint>
</hints>
</connection>
<connection>
<sender>
size_factor_sbox
</sender>
<signal>
valueChanged(int)
</signal>
<receiver>
MainWindow
</receiver>
<slot>
on_ellipse_size_changed()
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
497
</x>
<y>
819
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
1731
</x>
<y>
694
</y>
</hint>
</hints>
</connection>
</connections>
<slots>
<slot>
onAbout()
</slot>
<slot>
onAboutQt()
</slot>
<slot>
on_auto_xlim()
</slot>
<slot>
on_auto_ylim()
</slot>
<slot>
on_ellipse_size_changed()
</slot>
</slots>
</ui>
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