Application Support¶
Contents
rcp.app¶
Objects related to the application event loop and life cycle. This uses QtCore but not QtGui so this functionality is compatible with non-graphical command-line programs.
-
class
rcp.app.
MainApp
[source]¶ Root application class for managing common elements of our applications. This is intended to be inherited by an top-level application controller along with other root classes which define specific interface API.
- Variables
config – configuration parser object to hold persistent user selections
configuration_file_path – path of current configuration file, possibly not yet existing
-
app_has_started
()[source]¶ Callback to be invoked right after the main event loop begins. This may be extended in child classes to implement startup behaviors which require a running event loop.
-
app_is_exiting
()[source]¶ Callback invoked right before the program ends, either from a keyboard interrupt window close. This may be extended in child classes to clean up external resources, e.g., close any serial ports to remove associated lock files.
-
initialize_default_configuration
()[source]¶ Method to add default configuration values. This is intended to be extended in child classes. It is called during object initialization.
-
rcp.app.
add_console_log_handler
(level=10)[source]¶ Add an additional root log handler to stream messages to the console.
rcp.QtConfig¶
PyQt5 widgets to create configuration fields and forms.
-
class
rcp.QtConfig.
QtConfigComboBox
(callback=None, default='<no selection>')[source]¶ Composite widget enabling a user to select an item from a drop down list.
- Parameters
callback – function called with argument (string)
default – name of initial selection, defaults to ‘<no selection>’
-
class
rcp.QtConfig.
QtConfigFileButtons
(delegate=None, path=None, extension='config')[source]¶ Composite widget with buttons to control loading and saving a configuration file.
-
class
rcp.QtConfig.
QtConfigForm
[source]¶ Composite widget to display a form of user-configuration entries.
-
class
rcp.QtConfig.
QtConfigOSCPort
(callback=None, address='localhost', portnum=3761)[source]¶ Composite widget enabling a user to configure an address:portnum field.
- Parameters
callback – function called with arguments (address-string, port-integer)
address – host address string, defaults to ‘localhost’
portnum – UDP port integer, defaults to 3761
rcp.QtLog¶
PyQt5 widgets to show and control logging output.