The baseWidget module contains the BaseWidget class which provides an implementation of the BaseView specific to creating an extending a QWidget object.
The BaseView class provides a base framework for creating Qt objects.
It provides several functions that are called in a specific order, and are to be overridden by subclasses in order to provide a specific implementation for the BaseView. These functions pertain to certain aspects of setting up a view and are called in the following order:
This class implements the pyamp.logging.Loggable interface and provides the ability to specify the logData object as well as the color to use for logging (the default color is to use a white foreground color).
Finish setting up the view.
Note
This function should be overridden by subclasses.
Configure the view.
Note
This function should be overridden by subclasses.
Configure the layout for this view.
Note
This function should be overridden by subclasses.
Create the main layout.
Note
This function should be overridden by subclasses.
Set the controller object for this view.
Set up any connections this view requires.
Note
This function should be overridden by subclasses.
Create and set up this view.
Note
This function should be overridden by subclasses.
The BaseWidget class provides an implementation of the amp.ui.qt.BaseView class designed to set up and create a PyQt4.QtGui.QWidget object.
This class provides serveral functions which can be overridden by subclasses to easily add features to the BaseWidget. These functions are called in the following order during the set up process:
- configure()
- configureLayout()
- createElements()
- setupConnections()
Add a list of elements to the main layout.
Create the elements for this view. Return the list of widgets, or items in the order that they should be added to the layout.
The layoutType property contains the type of layout to use for this Widget. It should be a value from the LayoutType class.
Override the paintEvent function to allow StylSheets to work for this QWidget.
Set the content margins for this widget’s layout.
Set the spacing between components in the layout.
The tabOrder property allows concrete widgets to set their tab order. Each element in the list will be tab connected to the next element in the list. The list will cycle around to the front so the final element is tab connected to the first element.