uwsift.util.widgets package
Submodules
uwsift.util.widgets.pie_dial module
- class uwsift.util.widgets.pie_dial.PieDial(visible: bool = True, opacity: float = 1.0, pie_brush=9, pie_pen=0, strike_out_brush=7, strike_out_pen=0)[source]
Bases:
object
Widget for displaying visibility and opacity of a layer.
The available look and behaviour of the QDial widget is not suitable for the purpose of displaying the state of visibility and opacity of a layer. Therefore, a separate widget system was developed.
- The opacity is indicated by the filled area of a pie:
If, for example, the pie is completely filled, then the opacity is 100%.
If the cake is e.g. only half filled, the opacity is 50%.
Visibility is indicated by crossing out or not crossing out the circle. If the cake is crossed out, the layer is invisible and vice versa.
The span angle value and the visibility value are changed via the PieDialEditor.
The source code used as the basis for the custom dial widget is:
https://pastebin.com/yN3B3fc2 https://stackoverflow.com/questions/12011147/how-to-create-a-3-color-gradient-dial-indicator-the-one-that-shows-green-yellow
- property opacity
- property visible
- class uwsift.util.widgets.pie_dial.PieDialDelegate(*args, **kwargs)[source]
Bases:
QStyledItemDelegate
- createEditor(parent: QWidget, option: QStyleOptionViewItem, index: QModelIndex) QWidget [source]
- Parameters:
parent –
option –
index –
- Returns:
- class uwsift.util.widgets.pie_dial.PieDialEditor(parent: QWidget, pie_dial: PieDial)[source]
Bases:
QWidget
- class uwsift.util.widgets.pie_dial.SliderPopup(*args, **kwargs)[source]
Bases:
QWidget
Custom slider widget that can change a value from 1 to 100 per cent and is displayed in a pop-up window. When the widget is displayed, the value to be changed must be converted if the value is not a percentage value.
- property active
Get the current state if the window with the slider is active or not