documentation fixes / updates
This commit is contained in:
parent
aadd02f819
commit
2e03c9719f
@ -6,7 +6,7 @@ from pyqtgraph.Point import Point
|
||||
__all__ = ['GridItem']
|
||||
class GridItem(UIGraphicsItem):
|
||||
"""
|
||||
**Bases:** `UIGraphicsItem <pyqtgraph.UIGraphicsItem>'
|
||||
**Bases:** :class:`UIGraphicsItem <pyqtgraph.UIGraphicsItem>'
|
||||
|
||||
Displays a rectangular grid of lines indicating major divisions within a coordinate system.
|
||||
Automatically determines what divisions to use.
|
||||
|
@ -25,9 +25,10 @@ class HistogramLUTItem(GraphicsWidget):
|
||||
"""
|
||||
This is a graphicsWidget which provides controls for adjusting the display of an image.
|
||||
Includes:
|
||||
- Image histogram
|
||||
- Movable region over histogram to select black/white levels
|
||||
- Gradient editor to define color lookup table for single-channel images
|
||||
|
||||
- Image histogram
|
||||
- Movable region over histogram to select black/white levels
|
||||
- Gradient editor to define color lookup table for single-channel images
|
||||
"""
|
||||
|
||||
sigLookupTableChanged = QtCore.Signal(object)
|
||||
|
@ -34,11 +34,15 @@ class LabelItem(GraphicsWidget):
|
||||
def setText(self, text, **args):
|
||||
"""Set the text and text properties in the label. Accepts optional arguments for auto-generating
|
||||
a CSS style string:
|
||||
color: string (example: 'CCFF00')
|
||||
size: string (example: '8pt')
|
||||
bold: boolean
|
||||
italic: boolean
|
||||
"""
|
||||
|
||||
==================== ==============================
|
||||
**Style Arguments:**
|
||||
color (str) example: 'CCFF00'
|
||||
size (str) example: '8pt'
|
||||
bold (bool)
|
||||
italic (bool)
|
||||
==================== ==============================
|
||||
"""
|
||||
self.text = text
|
||||
opts = self.opts.copy()
|
||||
for k in args:
|
||||
|
@ -4,7 +4,8 @@ from GraphicsObject import GraphicsObject
|
||||
|
||||
__all__ = ['UIGraphicsItem']
|
||||
class UIGraphicsItem(GraphicsObject):
|
||||
"""Base class for graphics items with boundaries relative to a GraphicsView or ViewBox.
|
||||
"""
|
||||
Base class for graphics items with boundaries relative to a GraphicsView or ViewBox.
|
||||
The purpose of this class is to allow the creation of GraphicsItems which live inside
|
||||
a scalable view, but whose boundaries will always stay fixed relative to the view's boundaries.
|
||||
For example: GridItem, InfiniteLine
|
||||
@ -19,10 +20,11 @@ class UIGraphicsItem(GraphicsObject):
|
||||
|
||||
def __init__(self, bounds=None, parent=None):
|
||||
"""
|
||||
Initialization Arguments:
|
||||
#view: The view box whose bounds will be used as a reference vor this item's bounds
|
||||
bounds: QRectF with coordinates relative to view box. The default is QRectF(0,0,1,1),
|
||||
which means the item will have the same bounds as the view.
|
||||
============== =============================================================================
|
||||
**Arguments:**
|
||||
bounds QRectF with coordinates relative to view box. The default is QRectF(0,0,1,1),
|
||||
which means the item will have the same bounds as the view.
|
||||
============== =============================================================================
|
||||
"""
|
||||
GraphicsObject.__init__(self, parent)
|
||||
self.setFlag(self.ItemSendsScenePositionChanges)
|
||||
|
@ -3,18 +3,23 @@ from pyqtgraph.Qt import QtGui, QtCore
|
||||
|
||||
__all__ = ['ProgressDialog']
|
||||
class ProgressDialog(QtGui.QProgressDialog):
|
||||
"""Extends QProgressDialog for use in 'with' statements.
|
||||
Arguments:
|
||||
labelText (required)
|
||||
cancelText Text to display on cancel button, or None to disable it.
|
||||
minimum
|
||||
maximum
|
||||
parent
|
||||
wait Length of time (im ms) to wait before displaying dialog
|
||||
busyCursor If True, show busy cursor until dialog finishes
|
||||
"""
|
||||
Extends QProgressDialog for use in 'with' statements.
|
||||
|
||||
============== ================================================================
|
||||
**Arguments:**
|
||||
labelText (required)
|
||||
cancelText Text to display on cancel button, or None to disable it.
|
||||
minimum
|
||||
maximum
|
||||
parent
|
||||
wait Length of time (im ms) to wait before displaying dialog
|
||||
busyCursor If True, show busy cursor until dialog finishes
|
||||
============== ================================================================
|
||||
|
||||
|
||||
Example:
|
||||
Example::
|
||||
|
||||
with ProgressDialog("Processing..", minVal, maxVal) as dlg:
|
||||
# do stuff
|
||||
dlg.setValue(i) ## could also use dlg += 1
|
||||
|
@ -11,18 +11,14 @@ except:
|
||||
__all__ = ['TableWidget']
|
||||
class TableWidget(QtGui.QTableWidget):
|
||||
"""Extends QTableWidget with some useful functions for automatic data handling
|
||||
and copy / export context menu.
|
||||
Can automatically format and display:
|
||||
numpy arrays
|
||||
numpy record arrays
|
||||
metaarrays
|
||||
list-of-lists [[1,2,3], [4,5,6]]
|
||||
dict-of-lists {'x': [1,2,3], 'y': [4,5,6]}
|
||||
list-of-dicts [
|
||||
{'x': 1, 'y': 4},
|
||||
{'x': 2, 'y': 5},
|
||||
{'x': 3, 'y': 6}
|
||||
]
|
||||
and copy / export context menu. Can automatically format and display:
|
||||
|
||||
- numpy arrays
|
||||
- numpy record arrays
|
||||
- metaarrays
|
||||
- list-of-lists [[1,2,3], [4,5,6]]
|
||||
- dict-of-lists {'x': [1,2,3], 'y': [4,5,6]}
|
||||
- list-of-dicts [{'x': 1, 'y': 4}, {'x': 2, 'y': 5}, ...]
|
||||
"""
|
||||
|
||||
def __init__(self, *args):
|
||||
|
Loading…
Reference in New Issue
Block a user