pyqtgraph/widgets/GraphicsLayoutWidget.py

13 lines
560 B
Python
Raw Normal View History

from pyqtgraph.Qt import QtGui
from pyqtgraph.graphicsItems.GraphicsLayout import GraphicsLayout
2012-05-11 22:05:41 +00:00
from .GraphicsView import GraphicsView
__all__ = ['GraphicsLayoutWidget']
class GraphicsLayoutWidget(GraphicsView):
def __init__(self, parent=None, **kargs):
GraphicsView.__init__(self, parent)
self.ci = GraphicsLayout(**kargs)
for n in ['nextRow', 'nextCol', 'nextColumn', 'addPlot', 'addViewBox', 'addItem', 'getItem', 'addLabel', 'addLayout']:
setattr(self, n, getattr(self.ci, n))
self.setCentralItem(self.ci)