pyqtgraph/widgets/GraphicsLayoutWidget.py
2013-12-23 11:16:39 -05:00

13 lines
606 B
Python

from ..Qt import QtGui
from ..graphicsItems.GraphicsLayout import GraphicsLayout
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', 'addLabel', 'addViewBox', 'removeItem', 'itemIndex', 'clear']:
setattr(self, n, getattr(self.ci, n))
self.setCentralItem(self.ci)