2014-12-13 17:57:33 +00:00
|
|
|
#<MyLabel@Label>:
|
|
|
|
# text: 'Current Temperature: n/a'
|
2014-12-11 03:38:40 +00:00
|
|
|
|
2014-12-13 17:57:33 +00:00
|
|
|
#<PlotWidget@Image>:
|
|
|
|
# allow_stretch: True
|
|
|
|
|
|
|
|
#<SerialPortDropdown@DropDown>:
|
|
|
|
|
|
|
|
#<SerialPortButton@Button>:
|
2014-12-10 22:22:52 +00:00
|
|
|
|
2014-12-13 21:44:05 +00:00
|
|
|
<StatusWidget@BoxLayout>:
|
|
|
|
orientation: 'horizontal'
|
|
|
|
|
|
|
|
<YesNoModalView@Popup>:
|
|
|
|
id: clear_modal_view
|
|
|
|
process_callback:
|
|
|
|
title: 'Clear graph?'
|
|
|
|
BoxLayout:
|
|
|
|
orientation: 'vertical'
|
|
|
|
Label:
|
|
|
|
id: default_content
|
|
|
|
text: 'Continuing will clear the graph and turn off logging to file.'
|
|
|
|
BoxLayout:
|
|
|
|
orientation: 'horizontal'
|
|
|
|
Button:
|
|
|
|
id: cancel_button
|
|
|
|
text: 'Cancel'
|
|
|
|
on_press: clear_modal_view.process(0)
|
|
|
|
Button:
|
|
|
|
id: confirm_button
|
|
|
|
text: 'Delete data'
|
|
|
|
on_press: clear_modal_view.process(1)
|
|
|
|
|
|
|
|
<StatusBar@BoxLayout>:
|
|
|
|
orientation: 'horizontal'
|
|
|
|
pos_hint: { 'x' : 0.01 }
|
|
|
|
Image:
|
|
|
|
id: status_image
|
|
|
|
size_hint_x: 0.05
|
|
|
|
source: './images/ok.png'
|
|
|
|
Label:
|
|
|
|
id: status_text
|
|
|
|
size_hint_x: 0.1
|
|
|
|
Label:
|
|
|
|
id: status_message
|
|
|
|
size_hint_x: 0.80
|
|
|
|
|
2014-12-10 22:22:52 +00:00
|
|
|
<MainWindow>:
|
|
|
|
label_wid: "Temperature Monitor"
|
2014-12-13 17:57:33 +00:00
|
|
|
current_temperature: current_temperature
|
|
|
|
serial_chooser_button: serial_chooser_button
|
2014-12-13 21:44:05 +00:00
|
|
|
on_dataSources: serial_chooser_button.values = self.dataSources
|
2014-12-13 17:57:33 +00:00
|
|
|
on_lastTemperature: current_temperature.on_temperature_change(self.lastTemperature)
|
|
|
|
on_lastTemperature: mainplot.on_lastTemperature(self.lastTemperature)
|
|
|
|
on_lastTime: mainplot.on_lastTime(self.lastTime)
|
2014-12-13 21:44:05 +00:00
|
|
|
on_lastStatus: status_bar.update_status(self.lastStatus)
|
2014-12-10 22:22:52 +00:00
|
|
|
BoxLayout:
|
2014-12-13 21:44:05 +00:00
|
|
|
orientation: 'vertical'
|
|
|
|
BoxLayout:
|
|
|
|
size_hint_y: 0.1
|
|
|
|
id: 'top_menu'
|
|
|
|
pos_hint: {'top':1}
|
|
|
|
orientation: 'horizontal'
|
|
|
|
MyLabel:
|
|
|
|
id: current_temperature
|
|
|
|
StatusWidget:
|
|
|
|
id: startstop_widget
|
|
|
|
state: 'running'
|
|
|
|
on_state: setattr(startstop_button, 'text', self.change_state_labels[self.state])
|
|
|
|
on_state: root.set_state(self.state)
|
|
|
|
Button:
|
|
|
|
id: startstop_button
|
|
|
|
text: 'Pause'
|
|
|
|
on_press: startstop_widget.change_state()
|
|
|
|
Button:
|
|
|
|
id: clear_button
|
|
|
|
text: 'Clear'
|
|
|
|
on_press: root.initiate_clear_dialog()
|
|
|
|
Label:
|
|
|
|
text: 'No File Chosen'
|
|
|
|
SerialPortButton:
|
|
|
|
id: serial_chooser_button
|
|
|
|
on_serial_port_changed: root.serial_port_changed(self.text)
|
|
|
|
#dropdown: serial_chooser_dropdown.__self__
|
|
|
|
#on_release: serial_chooser_dropdown.open(self)
|
|
|
|
#SerialPortDropdown:
|
|
|
|
# id: serial_chooser_dropdown
|
|
|
|
# data:
|
|
|
|
# on_serial_port_changed: serial_chooser_button.serial_port_selected(self.data)
|
|
|
|
# on_serial_port_changed: root.serial_port_changed(self.data)
|
|
|
|
PlotWidget:
|
|
|
|
id: mainplot
|
|
|
|
size_hint_y: 0.8
|
|
|
|
StatusBar:
|
|
|
|
size_hint_y: 0.1
|
|
|
|
id: status_bar
|
2014-12-13 17:57:33 +00:00
|
|
|
MainWindow:
|