示例#1
0
 def show_fullscreen_chart(chart, parent):
     """
     :param chart: a chart container
     :return: the widget showing the chart, by default a LiteBoxView
     """
     from matplotlib.figure import Figure
     from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas
     from camelot.view.controls.liteboxview import LiteBoxView
     from camelot.container.chartcontainer import structure_to_figure_container
     figure_container = structure_to_figure_container(chart)
     litebox = LiteBoxView(parent)
     fig = Figure(facecolor='#ffffff')
     canvas = FigureCanvas(fig)
     canvas.updateGeometry()
     figure_container.plot_on_figure(fig)
     proxy = QtGui.QGraphicsProxyWidget()
     proxy.setWidget(canvas)
     litebox.show_fullscreen_item(proxy)
     canvas.draw()
     return litebox
示例#2
0
 def show_fullscreen_chart(chart, parent):
     """
     :param chart: a chart container
     :return: the widget showing the chart, by default a LiteBoxView
     """
     from matplotlib.figure import Figure
     from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas
     from camelot.view.controls.liteboxview import LiteBoxView
     from camelot.container.chartcontainer import structure_to_figure_container
     figure_container = structure_to_figure_container( chart )
     litebox = LiteBoxView(parent)
     fig = Figure(facecolor='#ffffff')
     canvas = FigureCanvas(fig)
     canvas.updateGeometry()
     figure_container.plot_on_figure(fig)
     proxy = QtGui.QGraphicsProxyWidget()
     proxy.setWidget(canvas)
     litebox.show_fullscreen_item(proxy)
     canvas.draw()
     return litebox
示例#3
0
文件: gui.py 项目: vortexR2/camelot
 def gui_run(self, gui_context):
     from camelot.view.controls.liteboxview import LiteBoxView
     litebox = LiteBoxView(parent=gui_context.workspace)
     litebox.show_fullscreen_pixmap(self.pixmap.getQPixmap())
示例#4
0
文件: gui.py 项目: Governa/Camelot
 def gui_run( self, gui_context ):
     from camelot.view.controls.liteboxview import LiteBoxView
     litebox = LiteBoxView( parent = gui_context.workspace )
     litebox.show_fullscreen_pixmap( self.pixmap.getQPixmap() )
示例#5
0
 def show_fullscreen(self, image):
     lite_box = LiteBoxView(self)
     lite_box.show_fullscreen_image(image)
示例#6
0
 def show_fullscreen(self, image):
     lite_box = LiteBoxView(self)
     lite_box.show_fullscreen_image(image)