File: progress.py

package info (click to toggle)
python-pyqtgraph 0.13.7-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,068 kB
  • sloc: python: 54,043; makefile: 129; ansic: 40; sh: 2
file content (19 lines) | stat: -rw-r--r-- 508 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from ...Qt import QtWidgets
from ..Parameter import Parameter
from .basetypes import WidgetParameterItem


class ProgressBarParameterItem(WidgetParameterItem):
    def makeWidget(self):
        w = QtWidgets.QProgressBar()
        w.setMaximumHeight(20)
        w.sigChanged = w.valueChanged
        self.hideWidget = False
        return w


class ProgressBarParameter(Parameter):
    """
    Displays a progress bar whose value can be set between 0 and 100
    """
    itemClass = ProgressBarParameterItem