pyopticon.minimal_widget module
- class pyopticon.minimal_widget.MinimalWidget(parent_dashboard)
Bases:
objectSuperclass for creating widgets entirely from scratch, without any of the automation or data logging machinery in the GenericWidget class. This is mostly useful for creating widgets that are entirely cosmetic, e.g. the TitleWidget class. This superclass implements all functions required to interact with a Dashboard, but none of them do anything.
- Parameters:
parent_dashboard (pyopticon.dashboard.PyOpticonDashboard) – The dashboard object to which this device will be added
- on_handshake()
Runs when serial is connected. Does nothing unless overridden.
- on_update()
Runs every update cycle. Does nothing unless overridden.
- on_serial_close()
Runs on serial close. Does nothing unless overridden.
- on_confirm()
Runs on ‘confirm’, though these widgets generally don’t have confirm buttons unless you add one. Does nothing unless overridden.
- _run_thread()
Launch a thread to process commands from the widget’s queue.
- _shutdown_thread()
Shutdown the widget’s thread once the GUI is closed.
- close_serial()
- get_frame()
Get the widget’s Tkinter frame object.
- show_serial()
This method must be implemented in all widgets; in this case, it is empty.
- hide_serial()
This method must be implemented in all widgets; in this case, it is empty.
- update_serial_ports(new_com_options)
This method must be implemented in all widgets; in this case, it is empty.
- Parameters:
new_com_options (list) – A list containing the names (strings) of the available serial ports.