minor doc / test edits
This commit is contained in:
parent
95de07b48a
commit
de0ee32a20
@ -18,12 +18,14 @@ class SpinBox(QtGui.QAbstractSpinBox):
|
||||
"""
|
||||
**Bases:** QtGui.QAbstractSpinBox
|
||||
|
||||
QSpinBox widget on steroids. Allows selection of numerical value, with extra features:
|
||||
Extension of QSpinBox widget for selection of a numerical value.
|
||||
Adds many extra features:
|
||||
|
||||
- SI prefix notation (eg, automatically display "300 mV" instead of "0.003 V")
|
||||
- Float values with linear and decimal stepping (1-9, 10-90, 100-900, etc.)
|
||||
- Option for unbounded values
|
||||
- Delayed signals (allows multiple rapid changes with only one change signal)
|
||||
* SI prefix notation (eg, automatically display "300 mV" instead of "0.003 V")
|
||||
* Float values with linear and decimal stepping (1-9, 10-90, 100-900, etc.)
|
||||
* Option for unbounded values
|
||||
* Delayed signals (allows multiple rapid changes with only one change signal)
|
||||
* Customizable text formatting
|
||||
|
||||
============================= ==============================================
|
||||
**Signals:**
|
||||
|
@ -2,7 +2,7 @@ import pyqtgraph as pg
|
||||
pg.mkQApp()
|
||||
|
||||
|
||||
def test_spinbox():
|
||||
def test_spinbox_formatting():
|
||||
sb = pg.SpinBox()
|
||||
assert sb.opts['decimals'] == 6
|
||||
assert sb.opts['int'] is False
|
||||
@ -18,6 +18,7 @@ def test_spinbox():
|
||||
(12345678955, '12345678955', dict(int=True, decimals=100)),
|
||||
(1.45e-9, '1.45e-09 A', dict(int=False, decimals=6, suffix='A', siPrefix=False)),
|
||||
(1.45e-9, '1.45 nA', dict(int=False, decimals=6, suffix='A', siPrefix=True)),
|
||||
(-2500.3427, '$-2500.34', dict(int=False, format='${value:0.02f}')),
|
||||
]
|
||||
|
||||
for (value, text, opts) in conds:
|
||||
|
Loading…
Reference in New Issue
Block a user