Contributing¶
Here’s some useful info if you want to contribute.
Guidelines¶
Each tab has its own Class. If possible, inherit from
AbstractTab.
To provide comatibility:
The displayed data should also be in a raw data list called
rawDatawhich is always up to date
prepareUIinitializes all GUI elements
activemanages the status of a tabTab specific CANData instances are called
CANData
Please log useful information using an own logger instance
Use existing Toolbox methods if possible
Use batch database operations using raw lists (not objects) for better performance
Use docstrings
Keep the
.uifiles clean: Always name new GUI elements properly according to existing onesPut new strings in the Strings file and reference it
I want to add a new tab, what do I have to do?¶
Create a new tab on the GUI and stick to the already existing naming conventions
Add a QTableView to display your data and other GUI elements
Update mainWindow.py using pyside-uic mainWindow.ui > mainWindow.py.
Add a new File and a new class which inherits from
AbstractTabCall the parents constructor in your
__init__Add the GUI elements from the
.uifile to your code. You can refer to the other tabs to see how it’s done. Also, add the click handlers here.Call
prepareUIas last action in__init___If your tab needs an interface or displays interface values: Add your tab class or instance to
updateInterfaceLabels()and/orupdateCANDataInstances().If your tab uses an instance: Add an instance to Globals.py and create one at startup (see CANalyzat0r.py).
If your tab uses a static class: Call prepareUI at startup (see CANalyzat0r.py).