Projects/Plasma/Widgets
The widgets provided in libplasma (kdebase/workspace/plasma/lib) are for use in plasmoids to allow for user interaction in interfaces on the canvas that mimic those found in QWidget based application interfaces. They are zoomable and otherwise transformable and many of them are data aware.
[edit] Superclass
All Plasma widgets are QGraphicsItems. This allows us to use them in a QGraphicsView like any other item.
Some widgets may also subclass Plasma::DataVisualization, which allows them to be used with a Plasma::DataEngine. They can of course still be used as regular widgets.
[edit] Painting
To make the widgets look and behave as much like their QWidget counterparts, they are all drawn using QStyle if there is a QWidget analog. If there is not, then QStyle elements are preferred with a fallback to SVG rendering in the case of more exotic widgets.
[edit] Existing Widgets
- LineEdit: A text edit box. DataVisualization.
- PushButton: A clickable button. DataVisualization?
- RadioButton: An exclusive radio button with label; exclusivity is defined as "all buttons with the same parent item". DataVisualization?
- CheckBox: A checkable button with label. DataVisualization?
- IconButton: A clickable icon