def __init__(self, parent=None): QCellWidget.__init__(self, parent) self.vcsWindow = None self.canvas = None self.windowId = -1 layout = QtGui.QVBoxLayout() self.setLayout(layout)
def __init__(self, parent=None): QCellWidget.__init__(self, parent) self.window = None self.canvas = None self.windowId = -1 layout = QtGui.QVBoxLayout() self.setLayout(layout)
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
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)
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)
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)
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
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
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.fileSrc = None
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
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
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)
def __init__(self, parent=None): """ MplWidget(parent: QWidget) -> MplWidget Initialize the widget with its central layout """ QCellWidget.__init__(self, parent) centralLayout = QtGui.QVBoxLayout() self.setLayout(centralLayout) centralLayout.setMargin(0) centralLayout.setSpacing(0) # Create a new Figure Manager and configure it pylab.figure(str(self)) self.figManager = pylab.get_current_fig_manager() self.figManager.toolbar.hide() self.layout().addWidget(self.figManager.window) self.inputPorts = None self.selectedIds = []
def __init__(self, parent=None): """ MplWidget(parent: QWidget) -> MplWidget Initialize the widget with its central layout """ QCellWidget.__init__(self, parent) centralLayout = QtGui.QVBoxLayout() self.setLayout(centralLayout) centralLayout.setMargin(0) centralLayout.setSpacing(0) # Create a new Figure Manager and configure it pylab.figure(str(self)) self.figManager = pylab.get_current_fig_manager() self.figManager.toolbar.hide() self.layout().addWidget(self.figManager.window) self.inputPorts = None; self.selectedIds = []
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)
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)
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)
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)
def __init__(self, parent=None): """ QGISCellWidget(parent: QWidget) -> QGISCellWidget Initialize the widget with its central layout """ QCellWidget.__init__(self, parent) self.displaylegend = False centralLayout = QtGui.QVBoxLayout() self.setLayout(centralLayout) centralLayout.setMargin(0) centralLayout.setSpacing(0) self.create_main_frame() self.fig.canvas.draw() self.sync_changes = "all" self.setAnimationEnabled(False) self.displayTL = False self.cmap = matplotlib.cm.jet self.categorical = False self.threeBand = False self.dataMin = "ExtractFromFile" self.dataMax = "ExtractFromFile" self.NoDataValue = "ExtractFromFile"
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
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
def __init__(self, parent=None): QCellWidget.__init__(self, parent) self.sync_changes = "all" 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_crv_graph = QtGui.QGraphicsScene() self.ui.gv_crv.setScene(self.gs_crv_graph) QtCore.QObject.connect(self.ui.crv_combobox, QtCore.SIGNAL("currentIndexChanged(QString)"), self.changeResponseCurve) # self.ui.crv_combobox.currentIndexChanged = self.changeResponseCurve self.gs_crv_graph.wheelEvent = self.wheel_event_crv self.gs_auc_graph = QtGui.QGraphicsScene() self.ui.gv_auc.setScene(self.gs_auc_graph) self.gs_auc_graph.wheelEvent = self.wheel_event_auc # self.gs_response_graph = QtGui.QGraphicsScene() # self.ui.gv_response.setScene(self.gs_response_graph) # self.gs_response_graph.wheelEvent = self.wheel_event_response self.gs_calibration_graph = QtGui.QGraphicsScene() self.ui.gv_calibration.setScene(self.gs_calibration_graph) self.gs_calibration_graph.wheelEvent = self.wheel_event_calibration self.gs_confusion_graph = QtGui.QGraphicsScene() self.ui.gv_confusion.setScene(self.gs_confusion_graph) self.gs_confusion_graph.wheelEvent = self.wheel_event_confusion self.gs_residuals_graph = QtGui.QGraphicsScene() self.ui.gv_residuals.setScene(self.gs_residuals_graph) self.gs_residuals_graph.wheelEvent = self.wheel_event_residuals self.gs_variable_graph = QtGui.QGraphicsScene() self.ui.gv_variable.setScene(self.gs_variable_graph) self.gs_variable_graph.wheelEvent = self.wheel_event_variable #add in ie browsers for the text and response if systemType in ['Microsoft', 'Windows']: 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) else: self.text_browser = None self.text_urlSrc = None # layout = QtGui.QVBoxLayout() # self.response_frame = QtGui.QFrame(self) # self.response_graph = QtGui.QGraphicsScene() # self.ui.gv_response.setScene(self.response_graph) # self.response_graph.wheelEvent = self.wheel_event_response # 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.connect(self.ui.tabWidget,QtCore.SIGNAL('currentChanged(int)'), self.tabChanged) self.layout().addWidget(self.Frame)
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 = []