-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsub_view.enaml
44 lines (44 loc) · 1.52 KB
/
sub_view.enaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
SubView(MainWindow):
attr model
attr plot
title = "Subwoofer"
Container:
constraints = [
hbox(plot_window, controls),
align('top', plot_window, controls),
plot_window.height >= 600,
plot_window.width >= 600,
]
Form:
id: controls
Label:
text = "Driver"
ComboBox:
id: driver
items = model.enclosures[0].driver.drivernames
value := model.enclosures[0].driver.drivername
Label:
text << "Volume: %5.1f l " % model.enclosures[0].Vb
FloatSlider:
id: volume
minimum = model.enclosures[0].Vmin
maximum = model.enclosures[0].Vmax
value := model.enclosures[0].Vb
Label:
text << "Port diameter: %5.1f cm " % model.enclosures[0].Dv
FloatSlider:
id: port_diameter
minimum = 1
maximum = 20
value := model.enclosures[0].Dv
Label:
text << "Port length: %5.1f cm " % model.enclosures[0].Lv
Label:
text << "Min port diam: %5.1f cm" % model.enclosures[0].Dmin
Label:
text << "Fb = %5.1f Hz" % model.enclosures[0].Fb
Label:
text << "F3 = %5.1f Hz" % model.enclosures[0].F3
EnableCanvas:
id: plot_window
component = plot.get_plot_component()