当前位置: 首页>>代码示例>>Python>>正文


Python spreadsheet_cell.QCellWidget类代码示例

本文整理汇总了Python中vistrails.packages.spreadsheet.spreadsheet_cell.QCellWidget的典型用法代码示例。如果您正苦于以下问题:Python QCellWidget类的具体用法?Python QCellWidget怎么用?Python QCellWidget使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了QCellWidget类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: updateContents

    def updateContents(self, inputPorts):
        """ updateContents(inputPorts: tuple)
        Updates the cell contents with new vtkRenderer
        
        """
        (renderView,) = inputPorts
        renWin = renderView.vtkInstance.GetRenderWindow()
        renWin.DoubleBufferOn()
        self.SetRenderWindow(renWin)
        renderView.vtkInstance.ResetCamera()
        self.addObserversToInteractorStyle()

        #        renWin = self.GetRenderWindow()
        #        renderers = [renderView.vtkInstance.GetRenderer()]
        #        iren = renWin.GetInteractor()
        # Update interactor style
        #         self.removeObserversFromInteractorStyle()
        #         if renderView==None:
        #             if iStyle==None:
        #                 iStyleInstance = vtk.vtkInteractorStyleTrackballCamera()
        #             else:
        #                 iStyleInstance = iStyle.vtkInstance
        #             iren.SetInteractorStyle(iStyleInstance)
        #         self.addObserversToInteractorStyle()
        # Capture window into history for playback
        # Call this at the end to capture the image after rendering
        QCellWidget.updateContents(self, inputPorts)
开发者ID:pombredanne,项目名称:VisTrails,代码行数:27,代码来源:vtkviewcell.py

示例2: updateContents

 def updateContents(self, input_ports):
     (data,keys) = input_ports
     layout = QtGui.QHBoxLayout()
     widg = Stack1DMainWindow(data_list=data, key_list=keys)
     layout.addWidget(widg)
     self.setLayout(layout)
     QCellWidget.updateContents(self, input_ports)
开发者ID:Nikea,项目名称:VTTools,代码行数:7,代码来源:vis.py

示例3: deleteLater

    def deleteLater(self):
        """ deleteLater() -> None        
        Overriding PyQt deleteLater to free up resources
        
        """
        # Destroy the old one if possible
        if self.figure is not None:
            pylab.close(self.figure)

        QCellWidget.deleteLater(self)
开发者ID:AnyarInc,项目名称:VisTrails,代码行数:10,代码来源:figure_cell.py

示例4: __init__

 def __init__(self, parent=None):
     """ QGISCellWidget(parent: QWidget) -> QGISCellWidget
     Initialize the widget with its central layout
     
     """
     QCellWidget.__init__(self, parent)
     centralLayout = QtGui.QVBoxLayout()
     self.setLayout(centralLayout)
     centralLayout.setMargin(0)
     centralLayout.setSpacing(0)
开发者ID:Nikea,项目名称:VisTrails,代码行数:10,代码来源:init.py

示例5: __init__

 def __init__(self, parent=None):
     """ WebViewCellWidget(parent: QWidget) -> WebViewCellWidget
     Create a rich text cell without a toolbar
     
     """
     QCellWidget.__init__(self, parent)
     self.setLayout(QtGui.QVBoxLayout(self))
     self.browser = QtWebKit.QWebView()
     self.layout().addWidget(self.browser)
     self.browser.setMouseTracking(True)
     self.urlSrc = None
开发者ID:lumig242,项目名称:VisTrailsRecommendation,代码行数:11,代码来源:webview.py

示例6: dumpToFile

 def dumpToFile(self, filename):
     """ dumpToFile(filename) -> None
     It will generate a screenshot of the cell contents and dump to filename.
     It will also create a copy of the original text file used with
     filename's basename and the original extension.
     """
     if self.html is not None:
         basename, ext = os.path.splitext(filename)
         with open(basename + '.html', 'wb') as fp:
             fp.write(self.html.encode('utf-8'))
     QCellWidget.dumpToFile(self,filename)
开发者ID:pombredanne,项目名称:VisTrails,代码行数:11,代码来源:richtext.py

示例7: __init__

    def __init__(self, parent=None):
        """ RichTextCellWidget(parent: QWidget) -> RichTextCellWidget
        Create a rich text cell without a toolbar

        """
        QCellWidget.__init__(self, parent)
        self.setLayout(QtGui.QVBoxLayout(self))
        self.browser = QtGui.QTextBrowser()
        self.layout().addWidget(self.browser)
        self.browser.setMouseTracking(True)
        self.browser.controlBarType = None
        self.html = None
开发者ID:hjanime,项目名称:VisTrails,代码行数:12,代码来源:richtext.py

示例8: __init__

    def __init__(self, parent=None):
        """ SVGCellWidget(parent: QWidget) -> SVGCellWidget
        Create a SVGCellWidget without any toolbar
        """
        QCellWidget.__init__(self, parent)        
        self.setLayout(QtGui.QVBoxLayout(self))

        self.svgWidget = QtSvg.QSvgWidget()
        self.layout().addWidget(self.svgWidget)
        
        self.controlBarType = None
        self.fileSrc = None
开发者ID:AnyarInc,项目名称:VisTrails,代码行数:12,代码来源:svg.py

示例9: __init__

    def __init__(self, parent=None):
        QCellWidget.__init__(self, parent)

        layout = QtGui.QVBoxLayout()

        self.table = QtGui.QTableWidget()

        scrollarea = QtGui.QScrollArea(self)
        scrollarea.setWidgetResizable(True)
        scrollarea.setWidget(self.table)
        layout.addWidget(scrollarea)

        self.setLayout(layout)
开发者ID:lumig242,项目名称:VisTrailsRecommendation,代码行数:13,代码来源:viewer.py

示例10: deleteLater

 def deleteLater(self):
     """ deleteLater() -> None        
     Make sure to free render window resource when
     deallocating. Overriding PyQt deleteLater to free up
     resources
     
     """
     self.renderer_maps = {}
     for ren in self.getRendererList():
         self.mRenWin.RemoveRenderer(ren)
     self.removeObserversFromInteractorStyle()
     self.SetRenderWindow(None)
     QCellWidget.deleteLater(self)
开发者ID:pombredanne,项目名称:VisTrails,代码行数:13,代码来源:vtkviewcell.py

示例11: __init__

 def __init__(self, parent=None):
     """ WebViewCellWidget(parent: QWidget) -> WebViewCellWidget
     Create a rich text cell without a toolbar
     
     """
     QCellWidget.__init__(self, parent)
     self.setLayout(QtGui.QVBoxLayout(self))
     QtWebKit.QWebSettings.globalSettings().setAttribute(
         QtWebKit.QWebSettings.DeveloperExtrasEnabled, True)
     self.browser = QtWebKit.QWebView()
     self.layout().addWidget(self.browser)
     self.browser.setMouseTracking(True)
     self.urlSrc = None
开发者ID:Nikea,项目名称:VisTrails,代码行数:13,代码来源:webview.py

示例12: __init__

 def __init__(self, parent=None):
     """ IECellWidget(parent: QWidget) -> IECellWidget
     Create a ActiveX Container pointing to the IE Cell
     
     """
     QCellWidget.__init__(self, parent)
     vbox = QtGui.QVBoxLayout(self)
     vbox.setMargin(0)
     self.setLayout(vbox)
     self.browser = QAxContainer.QAxWidget(self)
     self.browser.setFocusPolicy(QtCore.Qt.StrongFocus)
     self.browser.setControl("{8856F961-340A-11D0-A96B-00C04FD705A2}")
     vbox.addWidget(self.browser)
     self.urlSrc = None
开发者ID:cjh1,项目名称:VisTrails,代码行数:14,代码来源:iecell.py

示例13: __init__

 def __init__(self, parent=None):
     """ MplFigureCellWidget(parent: QWidget) -> MplFigureCellWidget
     Initialize the widget with its central layout
     
     """
     QCellWidget.__init__(self, parent)
     self.setFocusPolicy(QtCore.Qt.StrongFocus)
     centralLayout = QtGui.QVBoxLayout()
     self.setLayout(centralLayout)
     centralLayout.setMargin(0)
     centralLayout.setSpacing(0)
     self.canvas = None
     self.figure = None
     self.figManager = None
     self.toolBarType = MplFigureCellToolBar
     self.mplToolbar = None
开发者ID:tacaswell,项目名称:VisTrails,代码行数:16,代码来源:figure_cell.py

示例14: __init__

    def __init__(self, parent=None, f=QtCore.Qt.WindowFlags()):
        """ QVTKViewWidget(parent: QWidget, f: WindowFlags) -> QVTKViewWidget
        Initialize QVTKViewWidget with a toolbar with its own device
        context
        
        """
        QCellWidget.__init__(self, parent, f | QtCore.Qt.MSWindowsOwnDC)

        self.interacting = None
        self.mRenWin = None
        self.setAttribute(QtCore.Qt.WA_OpaquePaintEvent)
        self.setAttribute(QtCore.Qt.WA_PaintOnScreen)
        self.setMouseTracking(True)
        self.setFocusPolicy(QtCore.Qt.StrongFocus)
        self.setSizePolicy(QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding))
        self.toolBarType = QVTKViewWidgetToolBar
        self.setAnimationEnabled(True)
开发者ID:pombredanne,项目名称:VisTrails,代码行数:17,代码来源:vtkviewcell.py

示例15: updateContents

    def updateContents(self, inputPorts):
        """ updateContents(inputPorts: tuple) -> None
        Update the widget contents based on the input data
        
        """
        (fileValue, ) = inputPorts
        if fileValue:
            img = QtGui.QImage()
            if img.load(fileValue.name):
                self.originalPix = QtGui.QPixmap.fromImage(img)
                self.label.setPixmap(self.originalPix.scaled(self.label.size(),
                                                         QtCore.Qt.KeepAspectRatio,
                                                         QtCore.Qt.SmoothTransformation))
            else:
                self.label.setText("Invalid image file!")

        QCellWidget.updateContents(self, inputPorts)
开发者ID:AnyarInc,项目名称:VisTrails,代码行数:17,代码来源:imageviewer.py


注:本文中的vistrails.packages.spreadsheet.spreadsheet_cell.QCellWidget类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。