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


Python pyqtgraph.GraphicsView方法代码示例

本文整理汇总了Python中pyqtgraph.GraphicsView方法的典型用法代码示例。如果您正苦于以下问题:Python pyqtgraph.GraphicsView方法的具体用法?Python pyqtgraph.GraphicsView怎么用?Python pyqtgraph.GraphicsView使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pyqtgraph的用法示例。


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

示例1: retranslateUi

# 需要导入模块: import pyqtgraph [as 别名]
# 或者: from pyqtgraph import GraphicsView [as 别名]
def retranslateUi(self, MainWindow):
        MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow", "MainWindow", None, QtGui.QApplication.UnicodeUTF8))
        self.downsampleCheck.setText(QtGui.QApplication.translate("MainWindow", "Auto downsample", None, QtGui.QApplication.UnicodeUTF8))
        self.scaleCheck.setText(QtGui.QApplication.translate("MainWindow", "Scale Data", None, QtGui.QApplication.UnicodeUTF8))
        self.rawRadio.setText(QtGui.QApplication.translate("MainWindow", "RawImageWidget", None, QtGui.QApplication.UnicodeUTF8))
        self.gfxRadio.setText(QtGui.QApplication.translate("MainWindow", "GraphicsView + ImageItem", None, QtGui.QApplication.UnicodeUTF8))
        self.rawGLRadio.setText(QtGui.QApplication.translate("MainWindow", "RawGLImageWidget", None, QtGui.QApplication.UnicodeUTF8))
        self.dtypeCombo.setItemText(0, QtGui.QApplication.translate("MainWindow", "uint8", None, QtGui.QApplication.UnicodeUTF8))
        self.dtypeCombo.setItemText(1, QtGui.QApplication.translate("MainWindow", "uint16", None, QtGui.QApplication.UnicodeUTF8))
        self.dtypeCombo.setItemText(2, QtGui.QApplication.translate("MainWindow", "float", None, QtGui.QApplication.UnicodeUTF8))
        self.label.setText(QtGui.QApplication.translate("MainWindow", "Data type", None, QtGui.QApplication.UnicodeUTF8))
        self.rgbLevelsCheck.setText(QtGui.QApplication.translate("MainWindow", "RGB", None, QtGui.QApplication.UnicodeUTF8))
        self.label_3.setText(QtGui.QApplication.translate("MainWindow", "<--->", None, QtGui.QApplication.UnicodeUTF8))
        self.label_2.setText(QtGui.QApplication.translate("MainWindow", "<--->", None, QtGui.QApplication.UnicodeUTF8))
        self.label_4.setText(QtGui.QApplication.translate("MainWindow", "<--->", None, QtGui.QApplication.UnicodeUTF8))
        self.lutCheck.setText(QtGui.QApplication.translate("MainWindow", "Use Lookup  Table", None, QtGui.QApplication.UnicodeUTF8))
        self.alphaCheck.setText(QtGui.QApplication.translate("MainWindow", "alpha", None, QtGui.QApplication.UnicodeUTF8))
        self.fpsLabel.setText(QtGui.QApplication.translate("MainWindow", "FPS", None, QtGui.QApplication.UnicodeUTF8))
        self.rgbCheck.setText(QtGui.QApplication.translate("MainWindow", "RGB", None, QtGui.QApplication.UnicodeUTF8))
        self.label_5.setText(QtGui.QApplication.translate("MainWindow", "Image size", None, QtGui.QApplication.UnicodeUTF8)) 
开发者ID:SrikanthVelpuri,项目名称:tf-pose,代码行数:22,代码来源:VideoTemplate_pyside.py

示例2: retranslateUi

# 需要导入模块: import pyqtgraph [as 别名]
# 或者: from pyqtgraph import GraphicsView [as 别名]
def retranslateUi(self, MainWindow):
        MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow", None))
        self.downsampleCheck.setText(_translate("MainWindow", "Auto downsample", None))
        self.scaleCheck.setText(_translate("MainWindow", "Scale Data", None))
        self.rawRadio.setText(_translate("MainWindow", "RawImageWidget", None))
        self.gfxRadio.setText(_translate("MainWindow", "GraphicsView + ImageItem", None))
        self.rawGLRadio.setText(_translate("MainWindow", "RawGLImageWidget", None))
        self.dtypeCombo.setItemText(0, _translate("MainWindow", "uint8", None))
        self.dtypeCombo.setItemText(1, _translate("MainWindow", "uint16", None))
        self.dtypeCombo.setItemText(2, _translate("MainWindow", "float", None))
        self.label.setText(_translate("MainWindow", "Data type", None))
        self.rgbLevelsCheck.setText(_translate("MainWindow", "RGB", None))
        self.label_3.setText(_translate("MainWindow", "<--->", None))
        self.label_2.setText(_translate("MainWindow", "<--->", None))
        self.label_4.setText(_translate("MainWindow", "<--->", None))
        self.lutCheck.setText(_translate("MainWindow", "Use Lookup  Table", None))
        self.alphaCheck.setText(_translate("MainWindow", "alpha", None))
        self.fpsLabel.setText(_translate("MainWindow", "FPS", None))
        self.rgbCheck.setText(_translate("MainWindow", "RGB", None))
        self.label_5.setText(_translate("MainWindow", "Image size", None)) 
开发者ID:SrikanthVelpuri,项目名称:tf-pose,代码行数:22,代码来源:VideoTemplate_pyqt.py

示例3: retranslateUi

# 需要导入模块: import pyqtgraph [as 别名]
# 或者: from pyqtgraph import GraphicsView [as 别名]
def retranslateUi(self, MainWindow):
        _translate = QtCore.QCoreApplication.translate
        MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
        self.downsampleCheck.setText(_translate("MainWindow", "Auto downsample"))
        self.scaleCheck.setText(_translate("MainWindow", "Scale Data"))
        self.rawRadio.setText(_translate("MainWindow", "RawImageWidget"))
        self.gfxRadio.setText(_translate("MainWindow", "GraphicsView + ImageItem"))
        self.rawGLRadio.setText(_translate("MainWindow", "RawGLImageWidget"))
        self.dtypeCombo.setItemText(0, _translate("MainWindow", "uint8"))
        self.dtypeCombo.setItemText(1, _translate("MainWindow", "uint16"))
        self.dtypeCombo.setItemText(2, _translate("MainWindow", "float"))
        self.label.setText(_translate("MainWindow", "Data type"))
        self.rgbLevelsCheck.setText(_translate("MainWindow", "RGB"))
        self.label_3.setText(_translate("MainWindow", "<--->"))
        self.label_2.setText(_translate("MainWindow", "<--->"))
        self.label_4.setText(_translate("MainWindow", "<--->"))
        self.lutCheck.setText(_translate("MainWindow", "Use Lookup  Table"))
        self.alphaCheck.setText(_translate("MainWindow", "alpha"))
        self.fpsLabel.setText(_translate("MainWindow", "FPS"))
        self.rgbCheck.setText(_translate("MainWindow", "RGB"))
        self.label_5.setText(_translate("MainWindow", "Image size")) 
开发者ID:SrikanthVelpuri,项目名称:tf-pose,代码行数:23,代码来源:VideoTemplate_pyqt5.py

示例4: __init__

# 需要导入模块: import pyqtgraph [as 别名]
# 或者: from pyqtgraph import GraphicsView [as 别名]
def __init__(self, controller=None, parent=None):
        WidgetBase.__init__(self, parent=parent, controller=controller)

        self.layout = QT.QVBoxLayout()
        self.setLayout(self.layout)
        
        self.combo_seg = QT.QComboBox()
        self.layout.addWidget(self.combo_seg)
        self.combo_seg.addItems([ 'Segment {}'.format(seg_num) for seg_num in range(self.controller.dataio.nb_segment) ])
        self._seg_pos = 0
        self.seg_num = self._seg_pos
        self.combo_seg.currentIndexChanged.connect(self.refresh)
        
        
        self.graphicsview = pg.GraphicsView()
        self.layout.addWidget(self.graphicsview)
        
        self.create_settings()
        
        self.initialize_plot()
        self.similarity = None
        
        self.on_params_changed()#this do refresh 
开发者ID:tridesclous,项目名称:tridesclous,代码行数:25,代码来源:featuretimeviewer.py

示例5: __init__

# 需要导入模块: import pyqtgraph [as 别名]
# 或者: from pyqtgraph import GraphicsView [as 别名]
def __init__(self, controller=None, parent=None):
        WidgetBase.__init__(self, parent=parent, controller=controller)
        
        self.layout = QT.QVBoxLayout()
        self.setLayout(self.layout)
        
        #~ h = QT.QHBoxLayout()
        #~ self.layout.addLayout(h)
        #~ h.addWidget(QT.QLabel('<b>Similarity</b>') )

        #~ but = QT.QPushButton('settings')
        #~ but.clicked.connect(self.open_settings)
        #~ h.addWidget(but)
        
        
        self.graphicsview = pg.GraphicsView()
        self.layout.addWidget(self.graphicsview)
        
        self.initialize_plot()
        
        #~ self.on_params_changed()#this do refresh 
开发者ID:tridesclous,项目名称:tridesclous,代码行数:23,代码来源:isiviewer.py

示例6: __init__

# 需要导入模块: import pyqtgraph [as 别名]
# 或者: from pyqtgraph import GraphicsView [as 别名]
def __init__(self, controller=None, parent=None):
        WidgetBase.__init__(self, parent=parent, controller=controller)

        self.layout = QT.QVBoxLayout()
        self.setLayout(self.layout)
        
        h = QT.QHBoxLayout()
        self.layout.addLayout(h)
        but = QT.QPushButton('Show 1D dist', checkable=True)
        h.addWidget(but)
        but.clicked.connect(self.show_hide_1d_dist)
        
        self.graphicsview = pg.GraphicsView()
        self.layout.addWidget(self.graphicsview)

        self.graphicsview2 = pg.GraphicsView()
        self.layout.addWidget(self.graphicsview2)
        self.graphicsview2.hide()
        
        self.create_settings()
        
        self.initialize_plot()
        self.similarity = None

        self.on_params_changed()#this do refresh 
开发者ID:tridesclous,项目名称:tridesclous,代码行数:27,代码来源:waveformhistviewer.py

示例7: __init__

# 需要导入模块: import pyqtgraph [as 别名]
# 或者: from pyqtgraph import GraphicsView [as 别名]
def __init__(self, controller=None, parent=None):
        WidgetBase.__init__(self, parent=parent, controller=controller)
        
        self.layout = QT.QVBoxLayout()
        self.setLayout(self.layout)
        
        #~ self.create_settings()
        
        self.create_toolbar()
        self.layout.addWidget(self.toolbar)

        self.graphicsview = pg.GraphicsView()
        self.layout.addWidget(self.graphicsview)
        self.initialize_plot()
        
        self.alpha = 60
        self.refresh() 
开发者ID:tridesclous,项目名称:tridesclous,代码行数:19,代码来源:waveformviewer.py

示例8: __init__

# 需要导入模块: import pyqtgraph [as 别名]
# 或者: from pyqtgraph import GraphicsView [as 别名]
def __init__(self, controller=None, parent=None):
        WidgetBase.__init__(self, parent=parent, controller=controller)
        
        self.layout = QT.QVBoxLayout()
        self.setLayout(self.layout)
        
        #~ h = QT.QHBoxLayout()
        #~ self.layout.addLayout(h)
        #~ h.addWidget(QT.QLabel('<b>Similarity</b>') )

        #~ but = QT.QPushButton('settings')
        #~ but.clicked.connect(self.open_settings)
        #~ h.addWidget(but)
        
        
        self.graphicsview = pg.GraphicsView()
        self.layout.addWidget(self.graphicsview)
        
        self.initialize_plot()
        
        self.on_params_changed()#this do refresh 
开发者ID:tridesclous,项目名称:tridesclous,代码行数:23,代码来源:similarity.py

示例9: __init__

# 需要导入模块: import pyqtgraph [as 别名]
# 或者: from pyqtgraph import GraphicsView [as 别名]
def __init__(self, controller=None, parent=None):
        WidgetBase.__init__(self, parent=parent, controller=controller)
        
        self.layout = QT.QVBoxLayout()
        self.setLayout(self.layout)
        
        h = QT.QHBoxLayout()
        self.layout.addLayout(h)
        h.addWidget(QT.QLabel('<b>Silhouette</b>') )

        but = QT.QPushButton('settings')
        but.clicked.connect(self.open_settings)
        h.addWidget(but)

        self.graphicsview = pg.GraphicsView()
        self.layout.addWidget(self.graphicsview)
        
        self.alpha = 60
        
        self.initialize_plot()
        
        self.refresh() 
开发者ID:tridesclous,项目名称:tridesclous,代码行数:24,代码来源:silhouette.py

示例10: init

# 需要导入模块: import pyqtgraph [as 别名]
# 或者: from pyqtgraph import GraphicsView [as 别名]
def init(self, width, height):
        self.rect = QtCore.QRect(0, 0, width, height)
        self.imageItem = pg.ImageItem()
        self.imageItem.setImage(None)

        self.graphicsScene = pg.GraphicsScene()
        self.graphicsScene.addItem(self.imageItem)

        self.graphicsView = pg.GraphicsView()
        self.graphicsView.setRenderHint(QtGui.QPainter.Antialiasing)
        self.graphicsView.setScene(self.graphicsScene)

        layout = QtGui.QHBoxLayout()
        layout.addWidget(self.graphicsView)
        self.setLayout(layout)
        self.setMaximumSize(width, height)
        self.setMinimumSize(width-10, height-10) 
开发者ID:FabianIsensee,项目名称:BatchViewer,代码行数:19,代码来源:batchviewer.py

示例11: init_window

# 需要导入模块: import pyqtgraph [as 别名]
# 或者: from pyqtgraph import GraphicsView [as 别名]
def init_window(x=0, y=0, w=1440, h=1080, title='Hello World'):
    global _window_view, _window_layout, _window_imgs, _window_stats_label, _windows
    view = pg.GraphicsView()
    layout = pg.GraphicsLayout(border=(100,100,100))
    view.setCentralItem(layout)
    view.setWindowTitle(title)
    view.setGeometry(x, y, w, h)
    view.show()
    
    imgs = []
    imgs.append( _add_image_to_layout(layout, title='capture') )
    imgs.append( _add_image_to_layout(layout, title='processed') )
    imgs.append( _add_image_to_layout(layout, title='prediction') )
    
    layout.nextRow()

    stats_label = pg.LabelItem()
    layout.addItem(stats_label, colspan=3)
    
    _window_view = view
    _window_layout = layout
    _window_imgs = imgs
    _window_stats_label = stats_label
    
    _windows.append(view) 
开发者ID:memo,项目名称:webcam-pix2pix-tensorflow,代码行数:27,代码来源:gui.py

示例12: __init__

# 需要导入模块: import pyqtgraph [as 别名]
# 或者: from pyqtgraph import GraphicsView [as 别名]
def __init__(self, **kargs):
        WidgetNode.__init__(self, **kargs)

        self.layout = QT.QVBoxLayout()
        self.setLayout(self.layout)
        
        
        h = QT.QHBoxLayout()
        self.layout.addLayout(h)
        
        self.combobox = QT.QComboBox()
        h.addWidget(self.combobox)
        
        but = QT.QPushButton('clear')
        h.addWidget(but)
        but.clicked.connect(self.on_clear)
        
        self.label = QT.QLabel('')
        h.addWidget(self.label)
        
        self.graphicsview = pg.GraphicsView()
        self.layout.addWidget(self.graphicsview)

        self.params = pg.parametertree.Parameter.create( name='settings', type='group', children=self._params)
        self.tree_params = pg.parametertree.ParameterTree(parent=self)
        self.tree_params.header().hide()
        self.tree_params.setParameters(self.params, showTop=True)
        self.tree_params.setWindowTitle('Options for waveforms hist viewer')
        self.tree_params.setWindowFlags(QT.Qt.Window)
        self.params.sigTreeStateChanged.connect(self.on_params_changed)
        
        self.initialize_plot()
        
        self.mutex = Mutex() 
开发者ID:tridesclous,项目名称:tridesclous,代码行数:36,代码来源:onlinewaveformhistviewer.py

示例13: __init__

# 需要导入模块: import pyqtgraph [as 别名]
# 或者: from pyqtgraph import GraphicsView [as 别名]
def __init__(self,controller=None, signal_type='initial', parent=None):
        WidgetBase.__init__(self, parent=parent, controller=controller)
    
        self.dataio = controller.dataio
        self.signal_type = signal_type
        
        self.layout = QT.QVBoxLayout()
        self.setLayout(self.layout)
        
        self.create_toolbar()
        
        
        # create graphic view and 2 scroll bar
        g = QT.QGridLayout()
        self.layout.addLayout(g)
        self.scroll_chan = QT.QScrollBar()
        g.addWidget(self.scroll_chan, 0,0)
        self.scroll_chan.valueChanged.connect(self.on_scroll_chan)
        self.graphicsview = pg.GraphicsView()
        g.addWidget(self.graphicsview, 0,1)
        self.initialize_plot()
        self.scroll_time = QT.QScrollBar(orientation=QT.Qt.Horizontal)
        g.addWidget(self.scroll_time, 1,1)
        self.scroll_time.valueChanged.connect(self.on_scroll_time)
        
        #handle time by segments
        self.time_by_seg = np.array([0.]*self.dataio.nb_segment, dtype='float64')
        
        self.change_segment(0)
        self.refresh() 
开发者ID:tridesclous,项目名称:tridesclous,代码行数:32,代码来源:traceviewer.py

示例14: __init__

# 需要导入模块: import pyqtgraph [as 别名]
# 或者: from pyqtgraph import GraphicsView [as 别名]
def __init__(self, parent = None, channel_groups=None):
        QT.QWidget.__init__(self, parent)
        
        self.channel_groups = channel_groups
        
        self.layout = QT.QVBoxLayout()
        self.setLayout(self.layout)
        
        h = QT.QHBoxLayout()
        self.layout.addLayout(h)
        
        self.combo_chan_grp = QT.QComboBox()
        h.addWidget(self.combo_chan_grp)
        self.combo_chan_grp.clear()
        self.combo_chan_grp.addItems([str(k) for k in self.channel_groups.keys()])
        self.combo_chan_grp.currentIndexChanged .connect(self.on_chan_grp_change)
        
        self.checkbox = QT.QCheckBox('flip_bottom_up')
        h.addWidget(self.checkbox)
        self.checkbox.stateChanged.connect(self.refresh)
        
        #~ self.combo_chan_grp.blockSignals(True)
        #~ self.combo_chan_grp.blockSignals(False)
        #~ self.on_chan_grp_change()

        
        self.graphicsview = pg.GraphicsView()
        self.layout.addWidget(self.graphicsview)
        

        self.viewBox = MyViewBox()
        self.viewBox.disableAutoRange()
        
        self.plot = pg.PlotItem(viewBox=self.viewBox)
        self.graphicsview.setCentralItem(self.plot)
        self.plot.hideButtons()
        self.plot.showAxis('left', False)
        
        self.refresh() 
开发者ID:tridesclous,项目名称:tridesclous,代码行数:41,代码来源:probegeometryview.py


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