Tribler Widgets are python files (.py) with the following structure:
- first imports are defined, these may be python libraries or Tribler modules.
- general information on the widget is defined, the following properties are mandatory:
- width : optimal width to be used.
- height : optimal height to be used.
- a widget class is defined, with the following properties:
- the class is named "widget"
- it extends Tribler.Core.Widgets.widgets.tribler_widget
- the __init__ function calls the tribler_widget.__init__
In the rest of the python file, other classes and functions may be defined and used.
|