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'
|
2015-03-21 18:07:17 +00:00
|
|
|
size_hint_y: 0.1
|
2014-12-13 21:44:05 +00:00
|
|
|
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
|
|
|
|
|
2015-01-03 22:03:11 +00:00
|
|
|
<OutputFileDialog>:
|
|
|
|
textinput: text_input
|
|
|
|
BoxLayout:
|
|
|
|
orientation: 'vertical'
|
|
|
|
Label:
|
|
|
|
text: "Select a folder & file name for the output. A csv & png file will be saved."
|
|
|
|
size_hint_y: 0.1
|
|
|
|
FileChooserListView:
|
|
|
|
id: filechooser
|
|
|
|
on_selection: text_input.text = self.selection and self.selection[0] or ''
|
|
|
|
BoxLayout:
|
|
|
|
size_hint_y: 0.1
|
|
|
|
orientation: 'horizontal'
|
|
|
|
Label:
|
|
|
|
text: 'File name:'
|
|
|
|
size_hint_x: 0.2
|
|
|
|
TextInput:
|
|
|
|
id: text_input
|
|
|
|
BoxLayout:
|
|
|
|
size_hint_y: 0.1
|
|
|
|
orientation: 'horizontal'
|
|
|
|
Button:
|
|
|
|
text: 'Cancel'
|
|
|
|
on_press: root.cancel()
|
|
|
|
Button:
|
|
|
|
text: 'Set Output File'
|
|
|
|
on_press: root.set_output(filechooser.path, text_input.text)
|
|
|
|
|
2015-01-04 17:58:58 +00:00
|
|
|
<SelectReferenceProfileDialog>:
|
|
|
|
BoxLayout:
|
|
|
|
orientation: 'vertical'
|
|
|
|
Label:
|
|
|
|
text: 'Select a reference temperature profile (csv)'
|
|
|
|
size_hint_y: 0.1
|
|
|
|
FileChooserListView:
|
|
|
|
id: filechooser
|
|
|
|
filters: ['*.csv']
|
|
|
|
BoxLayout:
|
2015-03-21 18:07:17 +00:00
|
|
|
size_hint_y: 0.1
|
2015-01-04 17:58:58 +00:00
|
|
|
orientation: 'horizontal'
|
|
|
|
Button:
|
|
|
|
text: 'Cancel'
|
|
|
|
on_press: root.cancel()
|
|
|
|
Button:
|
|
|
|
text: 'Set reference profile'
|
|
|
|
on_press: root.set_output(file = filechooser.selection)
|
|
|
|
|
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)
|
2015-01-03 22:03:11 +00:00
|
|
|
raw_data_output_file: ''
|
|
|
|
image_output_file: ''
|
|
|
|
on_raw_data_output_file: mainplot.raw_data_output_file = self.raw_data_output_file
|
|
|
|
on_image_output_file: mainplot.image_output_file = self.image_output_file
|
2015-01-04 17:58:58 +00:00
|
|
|
reference_profile_file: ''
|
|
|
|
on_reference_profile_file: mainplot.reference_profile_file = self.reference_profile_file
|
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
|
2015-01-03 22:03:11 +00:00
|
|
|
text: "Current Temperature: n/a"
|
2014-12-13 21:44:05 +00:00
|
|
|
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
|
2015-01-04 17:58:58 +00:00
|
|
|
text: 'Pause Data'
|
2014-12-13 21:44:05 +00:00
|
|
|
on_press: startstop_widget.change_state()
|
|
|
|
Button:
|
|
|
|
id: clear_button
|
2015-01-04 17:58:58 +00:00
|
|
|
text: 'Clear Graph'
|
2014-12-13 21:44:05 +00:00
|
|
|
on_press: root.initiate_clear_dialog()
|
|
|
|
SerialPortButton:
|
|
|
|
id: serial_chooser_button
|
|
|
|
on_serial_port_changed: root.serial_port_changed(self.text)
|
2015-01-04 17:58:58 +00:00
|
|
|
BoxLayout:
|
|
|
|
orientation: 'horizontal'
|
|
|
|
size_hint_y: 0.1
|
|
|
|
BoxLayout:
|
|
|
|
orientation: 'vertical'
|
|
|
|
BoxLayout:
|
|
|
|
orientation: 'horizontal'
|
|
|
|
Label:
|
|
|
|
text: 'Output file'
|
|
|
|
size_hint_x: 0.3
|
|
|
|
Button:
|
|
|
|
id: output_button
|
|
|
|
text: 'Choose output file'
|
|
|
|
on_press: root.choose_output_file()
|
|
|
|
Label:
|
|
|
|
id: output_file_selected
|
|
|
|
text: 'No file chosen'
|
|
|
|
BoxLayout:
|
|
|
|
orientation: 'vertical'
|
|
|
|
BoxLayout:
|
|
|
|
orientation: 'horizontal'
|
|
|
|
Label:
|
|
|
|
text: 'Reference Profile'
|
|
|
|
Button:
|
|
|
|
id: reference_profile_select
|
|
|
|
text: 'Choose Profile'
|
|
|
|
on_press: root.select_reference_profile()
|
|
|
|
size_hint_x: 0.5
|
|
|
|
Button:
|
|
|
|
id: reference_profile_edit
|
|
|
|
text: 'Edit'
|
|
|
|
size_hint_x: 0.2
|
|
|
|
Button:
|
|
|
|
id: reference_profile_clear
|
|
|
|
text: 'Clear'
|
|
|
|
size_hint_x: 0.2
|
|
|
|
Label:
|
|
|
|
id: reference_profile_selected
|
|
|
|
text: 'No profile selected'
|
2014-12-13 21:44:05 +00:00
|
|
|
PlotWidget:
|
|
|
|
id: mainplot
|
2015-01-04 17:58:58 +00:00
|
|
|
reference_profile_file: ''
|
2015-01-03 22:03:11 +00:00
|
|
|
on_image_output_file: self.update_image_output_file()
|
|
|
|
on_raw_data_output_file: self.update_raw_data_output_file()
|
2015-01-04 17:58:58 +00:00
|
|
|
on_reference_profile_file: root.reference_profile_file = self.reference_profile_file
|
2014-12-13 21:44:05 +00:00
|
|
|
size_hint_y: 0.8
|
|
|
|
StatusBar:
|
|
|
|
size_hint_y: 0.1
|
|
|
|
id: status_bar
|
2014-12-13 17:57:33 +00:00
|
|
|
MainWindow:
|