本文整理汇总了Python中packages.spreadsheet.spreadsheet_cell.QCellWidget.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python QCellWidget.__init__方法的具体用法?Python QCellWidget.__init__怎么用?Python QCellWidget.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类packages.spreadsheet.spreadsheet_cell.QCellWidget
的用法示例。
在下文中一共展示了QCellWidget.__init__方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from packages.spreadsheet.spreadsheet_cell import QCellWidget [as 别名]
# 或者: from packages.spreadsheet.spreadsheet_cell.QCellWidget import __init__ [as 别名]
def __init__(self, parent=None, f=QtCore.Qt.WindowFlags()):
QCellWidget.__init__(self,parent,f)
self.layout = QVBoxLayout(self)
self.view = None
self.location = None
self.cdms_var = None
self.params = None
示例2: __init__
# 需要导入模块: from packages.spreadsheet.spreadsheet_cell import QCellWidget [as 别名]
# 或者: from packages.spreadsheet.spreadsheet_cell.QCellWidget import __init__ [as 别名]
def __init__(self, parent=None):
QCellWidget.__init__(self, parent)
centralLayout = QtGui.QVBoxLayout()
self.setLayout(centralLayout)
centralLayout.setMargin(0)
centralLayout.setSpacing(0)
self.view = vtk.vtkContextView()
self.widget = QVTKRenderWindowInteractor(self,
rw=self.view.GetRenderWindow(),
iren=self.view.GetInteractor()
)
self.chart = vtk.vtkChartParallelCoordinates()
self.view.GetScene().AddItem(self.chart)
self.layout().addWidget(self.widget)
# Create a annotation link to access selection in parallel coordinates view
self.annotationLink = vtk.vtkAnnotationLink()
# If you don't set the FieldType explicitly it ends up as UNKNOWN (as of 21 Feb 2010)
# See vtkSelectionNode doc for field and content type enum values
self.annotationLink.GetCurrentSelection().GetNode(0).SetFieldType(1) # Point
self.annotationLink.GetCurrentSelection().GetNode(0).SetContentType(4) # Indices
# Connect the annotation link to the parallel coordinates representation
self.chart.SetAnnotationLink(self.annotationLink)
self.annotationLink.AddObserver("AnnotationChangedEvent", self.selectionCallback)
示例3: __init__
# 需要导入模块: from packages.spreadsheet.spreadsheet_cell import QCellWidget [as 别名]
# 或者: from packages.spreadsheet.spreadsheet_cell.QCellWidget import __init__ [as 别名]
def __init__(self, parent=None):
QCellWidget.__init__(self, parent)
self.window = None
self.canvas = None
self.windowId = -1
layout = QtGui.QVBoxLayout()
self.setLayout(layout)
示例4: __init__
# 需要导入模块: from packages.spreadsheet.spreadsheet_cell import QCellWidget [as 别名]
# 或者: from packages.spreadsheet.spreadsheet_cell.QCellWidget import __init__ [as 别名]
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)
示例5: __init__
# 需要导入模块: from packages.spreadsheet.spreadsheet_cell import QCellWidget [as 别名]
# 或者: from packages.spreadsheet.spreadsheet_cell.QCellWidget import __init__ [as 别名]
def __init__(self, parent=None):
""" ExcelCellWidget(parent: QWidget) -> ExcelCellWidget
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.fileSrc = None
示例6: __init__
# 需要导入模块: from packages.spreadsheet.spreadsheet_cell import QCellWidget [as 别名]
# 或者: from packages.spreadsheet.spreadsheet_cell.QCellWidget import __init__ [as 别名]
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
示例7: __init__
# 需要导入模块: from packages.spreadsheet.spreadsheet_cell import QCellWidget [as 别名]
# 或者: from packages.spreadsheet.spreadsheet_cell.QCellWidget import __init__ [as 别名]
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
示例8: __init__
# 需要导入模块: from packages.spreadsheet.spreadsheet_cell import QCellWidget [as 别名]
# 或者: from packages.spreadsheet.spreadsheet_cell.QCellWidget import __init__ [as 别名]
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)
示例9: __init__
# 需要导入模块: from packages.spreadsheet.spreadsheet_cell import QCellWidget [as 别名]
# 或者: from packages.spreadsheet.spreadsheet_cell.QCellWidget import __init__ [as 别名]
def __init__(self, parent=None):
""" ImageViewerCellWidget(parent: QWidget) -> ImageViewerCellWidget
Initialize the widget with its toolbar type and aligment
"""
QCellWidget.__init__(self, parent)
self.setLayout(QtGui.QVBoxLayout(self))
self.setAnimationEnabled(True)
self.label = QtGui.QLabel()
self.layout().addWidget(self.label)
self.label.setAutoFillBackground(True)
self.label.palette().setColor(QtGui.QPalette.Window, QtCore.Qt.white)
self.label.setMouseTracking(False)
self.label.setAlignment(QtCore.Qt.AlignHCenter | QtCore.Qt.AlignVCenter)
self.label.setScaledContents(False)
self.toolBarType = ImageViewerToolBar
self.originalPix = None
self.setMinimumSize(1, 1)
示例10: __init__
# 需要导入模块: from packages.spreadsheet.spreadsheet_cell import QCellWidget [as 别名]
# 或者: from packages.spreadsheet.spreadsheet_cell.QCellWidget import __init__ [as 别名]
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)
# self.setAnimationEnabled(True)
self.Frame = QtGui.QFrame()
self.ui = Ui_Frame()
self.ui.setupUi(self.Frame)
self.toolBarType = SAHMSpatialViewerToolBar
self.controlBarType = SAHMSpatialViewerToolBar
self.layout().addWidget(self.Frame)
示例11: __init__
# 需要导入模块: from packages.spreadsheet.spreadsheet_cell import QCellWidget [as 别名]
# 或者: from packages.spreadsheet.spreadsheet_cell.QCellWidget import __init__ [as 别名]
def __init__(self, parent=None):
QCellWidget.__init__(self, parent)
centralLayout = QtGui.QVBoxLayout()
self.setLayout(centralLayout)
centralLayout.setMargin(0)
centralLayout.setSpacing(0)
# self.setAnimationEnabled(True)
self.Frame = QtGui.QFrame()
self.ui = Ui_Frame()
self.ui.setupUi(self.Frame)
# #add scenes to our graphicViews
# self.gs_prob_map = QtGui.QGraphicsScene()
# self.ui.gv_prob_map.setScene(self.gs_prob_map)
# self.gs_prob_map.wheelEvent = self.wheel_event_prob
self.gs_auc_graph = QtGui.QGraphicsScene()
self.ui.gv_auc.setScene(self.gs_auc_graph)
self.gs_auc_graph.wheelEvent = self.wheel_event_auc
#add in ie browsers for the text and response
self.text_browser = QAxContainer.QAxWidget(self)
self.text_browser.setFocusPolicy(QtCore.Qt.StrongFocus)
self.text_browser.setControl("{8856F961-340A-11D0-A96B-00C04FD705A2}")
self.ui.text_output_layout.addWidget(self.text_browser)
self.text_urlSrc = None
self.response_browser = QAxContainer.QAxWidget(self)
self.response_browser.setFocusPolicy(QtCore.Qt.StrongFocus)
self.response_browser.setControl("{8856F961-340A-11D0-A96B-00C04FD705A2}")
self.ui.response_curves_layout.addWidget(self.response_browser)
self.response_urlSrc = None
self.layout().addWidget(self.Frame)
示例12: __init__
# 需要导入模块: from packages.spreadsheet.spreadsheet_cell import QCellWidget [as 别名]
# 或者: from packages.spreadsheet.spreadsheet_cell.QCellWidget import __init__ [as 别名]
def __init__(self, parent=None):
QCellWidget.__init__(self, parent)
self.window = None
self.canvas = None
self.windowIndex = self.getWindowIndex() #index to get QT Window from VCSQtManager
示例13: __init__
# 需要导入模块: from packages.spreadsheet.spreadsheet_cell import QCellWidget [as 别名]
# 或者: from packages.spreadsheet.spreadsheet_cell.QCellWidget import __init__ [as 别名]
def __init__(self, parent=None):
"""TO DO: Add doc string"""
QCellWidget.__init__(self, parent)
# set widgets layouts
self.mainLayout = QtGui.QHBoxLayout()
self.setLayout(self.mainLayout)
# create canvas
self.canvas = QgsMapCanvas()
self.canvas.setCanvasColor(QColor(240, 255, 180))
#self.mainLayout.addWidget(self.canvas)
# icons
actionAddLayer = QAction(QIcon(path_png_icon + \
"/mActionAddLayer.png"), "Add Layer", self)
actionZoomIn = QAction(QIcon(path_png_icon + \
"/mActionZoomIn.png"), "Zoom In", self)
actionZoomOut = QAction(QIcon(path_png_icon + \
"/mActionZoomOut.png"), "Zoom Out", self)
actionPan = QAction(QIcon(path_png_icon + \
"/mActionPan.png"), "Pan", self)
# create toolbar
self.toolbar = QToolBar()
self.toolbar.addAction(actionAddLayer)
self.toolbar.addAction(actionZoomIn)
self.toolbar.addAction(actionZoomOut)
self.toolbar.addAction(actionPan)
# layerList explorer#~
self.GroupBoxLyrExplorer = QtGui.QGroupBox("")
self.vboxLyrExplorer = QtGui.QVBoxLayout()
self.GroupBoxLyrExplorer.setLayout(self.vboxLyrExplorer)
self.mainLayout.addWidget(self.GroupBoxLyrExplorer)
self.label = QtGui.QLabel("")
self.vboxLyrExplorer.addWidget(self.label)
# create layer explorer dock#~
self.explorer = QDockWidget("Layers")#~
self.explorer.resize(60, 100)#~
self.vboxLyrExplorer.addWidget(self.explorer)
# create layer explorer pane#~
self.explorerListWidget = QtGui.QListWidget()#~
self.explorerListWidget.setObjectName("listWidget")#~
self.explorer.setWidget(self.explorerListWidget)#~
# create layer explorer signal#~
self.explorerListWidget.itemClicked.connect(
self.on_listWidget_itemClicked)#~
# create map tools
self.toolPan = QgsMapToolPan(self.canvas,)
self.toolPan.setAction(actionPan)
self.toolZoomIn = QgsMapToolZoom(self.canvas, False) # false == in
self.toolZoomIn.setAction(actionZoomIn)
self.toolZoomOut = QgsMapToolZoom(self.canvas, True) # true == out
self.toolZoomOut.setAction(actionZoomOut)
# toolbar and canvas layout
self.GroupBoxToolBarMapCanvas = QtGui.QGroupBox("")
self.vboxToolBarMapCanvas = QtGui.QVBoxLayout()
self.GroupBoxToolBarMapCanvas.setLayout(self.vboxToolBarMapCanvas)
self.mainLayout.addWidget(self.GroupBoxToolBarMapCanvas)
self.vboxToolBarMapCanvas.addWidget(self.toolbar)
self.vboxToolBarMapCanvas.addWidget(self.canvas)
# set map processing signals
self.connect(actionAddLayer, SIGNAL("activated()"), self.addLayer)
self.connect(actionZoomIn, SIGNAL("activated()"), self.zoomIn)
self.connect(actionZoomOut, SIGNAL("activated()"), self.zoomOut)
self.connect(actionPan, SIGNAL("activated()"), self.pan)
#global list to hold inputlayers list -> accessible for toggleLayer
self.mylist = []