本文整理汇总了Python中pyqtgraph.PlotWidget.setVerticalScrollBarPolicy方法的典型用法代码示例。如果您正苦于以下问题:Python PlotWidget.setVerticalScrollBarPolicy方法的具体用法?Python PlotWidget.setVerticalScrollBarPolicy怎么用?Python PlotWidget.setVerticalScrollBarPolicy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyqtgraph.PlotWidget
的用法示例。
在下文中一共展示了PlotWidget.setVerticalScrollBarPolicy方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Ui_MainWidget
# 需要导入模块: from pyqtgraph import PlotWidget [as 别名]
# 或者: from pyqtgraph.PlotWidget import setVerticalScrollBarPolicy [as 别名]
class Ui_MainWidget(object):
def setupUi(self, MainWidget):
MainWidget.setObjectName(_fromUtf8("MainWidget"))
MainWidget.resize(791, 488)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.MinimumExpanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(MainWidget.sizePolicy().hasHeightForWidth())
MainWidget.setSizePolicy(sizePolicy)
MainWidget.setMinimumSize(QtCore.QSize(170, 0))
MainWidget.setMaximumSize(QtCore.QSize(16777215, 16777215))
MainWidget.setStyleSheet(_fromUtf8("background-color: rgb(0, 0, 0);\n"
"color: rgb(255, 255, 255);\n"
"font: 10pt \"Droid Sans Mono\";"))
self.horizontalLayout_2 = QtGui.QHBoxLayout(MainWidget)
self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
self.horizontalLayout_8 = QtGui.QHBoxLayout()
self.horizontalLayout_8.setObjectName(_fromUtf8("horizontalLayout_8"))
self.plotVertLayout = QtGui.QVBoxLayout()
self.plotVertLayout.setObjectName(_fromUtf8("plotVertLayout"))
self.vitalsPlot = PlotWidget(MainWidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.vitalsPlot.sizePolicy().hasHeightForWidth())
self.vitalsPlot.setSizePolicy(sizePolicy)
self.vitalsPlot.setMinimumSize(QtCore.QSize(150, 8))
self.vitalsPlot.setStyleSheet(_fromUtf8("background-color: rgb(170, 0, 0);"))
self.vitalsPlot.setFrameShape(QtGui.QFrame.NoFrame)
self.vitalsPlot.setFrameShadow(QtGui.QFrame.Plain)
self.vitalsPlot.setLineWidth(0)
self.vitalsPlot.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.vitalsPlot.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.vitalsPlot.setObjectName(_fromUtf8("vitalsPlot"))
self.plotVertLayout.addWidget(self.vitalsPlot)
self.slowPlotHorizLayout = QtGui.QHBoxLayout()
self.slowPlotHorizLayout.setObjectName(_fromUtf8("slowPlotHorizLayout"))
self.textBrowser = QtGui.QTextBrowser(MainWidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.textBrowser.sizePolicy().hasHeightForWidth())
self.textBrowser.setSizePolicy(sizePolicy)
self.textBrowser.setMinimumSize(QtCore.QSize(136, 30))
self.textBrowser.setMaximumSize(QtCore.QSize(136, 30))
self.textBrowser.setStyleSheet(_fromUtf8("font: 9pt \"Droid Sans\";"))
self.textBrowser.setFrameShape(QtGui.QFrame.NoFrame)
self.textBrowser.setFrameShadow(QtGui.QFrame.Plain)
self.textBrowser.setLineWidth(0)
self.textBrowser.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.textBrowser.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.textBrowser.setObjectName(_fromUtf8("textBrowser"))
self.slowPlotHorizLayout.addWidget(self.textBrowser)
self.slowUpdatePeriod = QtGui.QDoubleSpinBox(MainWidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.slowUpdatePeriod.sizePolicy().hasHeightForWidth())
self.slowUpdatePeriod.setSizePolicy(sizePolicy)
self.slowUpdatePeriod.setMinimumSize(QtCore.QSize(150, 0))
self.slowUpdatePeriod.setMaximumSize(QtCore.QSize(150, 16777215))
self.slowUpdatePeriod.setStyleSheet(_fromUtf8("background-color: rgb(255,255,255);\n"
"font: 9pt \"Droid Sans\";\n"
"color: rgb(0, 0, 0);"))
self.slowUpdatePeriod.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.slowUpdatePeriod.setDecimals(1)
self.slowUpdatePeriod.setMinimum(0.1)
self.slowUpdatePeriod.setMaximum(1000000000.0)
self.slowUpdatePeriod.setProperty("value", 1.0)
self.slowUpdatePeriod.setObjectName(_fromUtf8("slowUpdatePeriod"))
self.slowPlotHorizLayout.addWidget(self.slowUpdatePeriod)
spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.slowPlotHorizLayout.addItem(spacerItem)
self.plotVertLayout.addLayout(self.slowPlotHorizLayout)
self.ventilationPlot = PlotWidget(MainWidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.MinimumExpanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.ventilationPlot.sizePolicy().hasHeightForWidth())
self.ventilationPlot.setSizePolicy(sizePolicy)
self.ventilationPlot.setMinimumSize(QtCore.QSize(150, 10))
self.ventilationPlot.setStyleSheet(_fromUtf8("background-color: rgb(255, 0, 255);"))
self.ventilationPlot.setFrameShape(QtGui.QFrame.NoFrame)
self.ventilationPlot.setFrameShadow(QtGui.QFrame.Plain)
self.ventilationPlot.setLineWidth(0)
self.ventilationPlot.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.ventilationPlot.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.ventilationPlot.setObjectName(_fromUtf8("pressurePlot"))
self.plotVertLayout.addWidget(self.ventilationPlot)
self.ecgPlot = PlotWidget(MainWidget)
self.ecgPlot.setMinimumSize(QtCore.QSize(150, 0))
self.ecgPlot.setStyleSheet(_fromUtf8("background-color: rgb(0, 170, 0);"))
self.ecgPlot.setFrameShape(QtGui.QFrame.NoFrame)
self.ecgPlot.setFrameShadow(QtGui.QFrame.Plain)
self.ecgPlot.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.ecgPlot.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.ecgPlot.setObjectName(_fromUtf8("ecgPlot"))
self.plotVertLayout.addWidget(self.ecgPlot)
self.fastPlotHorizLayout = QtGui.QHBoxLayout()
self.fastPlotHorizLayout.setObjectName(_fromUtf8("fastPlotHorizLayout"))
#.........这里部分代码省略.........
示例2: Ui_MainWindow
# 需要导入模块: from pyqtgraph import PlotWidget [as 别名]
# 或者: from pyqtgraph.PlotWidget import setVerticalScrollBarPolicy [as 别名]
#.........这里部分代码省略.........
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.BrightText, brush)
brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Shadow, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.AlternateBase, brush)
brush = QtGui.QBrush(QtGui.QColor(255, 255, 220))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ToolTipBase, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ToolTipText, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Button, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Light, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Midlight, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Dark, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Mid, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Text, brush)
brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.BrightText, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Shadow, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.AlternateBase, brush)
brush = QtGui.QBrush(QtGui.QColor(255, 255, 220))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ToolTipBase, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ToolTipText, brush)
self.centralwidget.setPalette(palette)
self.centralwidget.setLayoutDirection(QtCore.Qt.LeftToRight)
self.centralwidget.setAutoFillBackground(True)
self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
self.gridLayout = QtGui.QGridLayout(self.centralwidget)
self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
self.gridLayout.addItem(spacerItem, 3, 2, 1, 1)
spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.gridLayout.addItem(spacerItem1, 2, 2, 1, 1)
self.scroll_plot = PlotWidget(self.centralwidget)
self.scroll_plot.setObjectName(_fromUtf8("scroll_plot"))
self.gridLayout.addWidget(self.scroll_plot, 1, 1, 4, 1)
self.fft = PlotWidget(self.centralwidget)
self.fft.setFrameShape(QtGui.QFrame.NoFrame)
self.fft.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.fft.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.fft.setObjectName(_fromUtf8("fft"))
self.gridLayout.addWidget(self.fft, 4, 2, 1, 1)
spacerItem2 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.gridLayout.addItem(spacerItem2, 0, 1, 1, 2)
self.pushButton = QtGui.QPushButton(self.centralwidget)
self.pushButton.setObjectName(_fromUtf8("pushButton"))
self.gridLayout.addWidget(self.pushButton, 5, 1, 1, 2)
MainWindow.setCentralWidget(self.centralwidget)
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
MainWindow.setWindowTitle(_translate("MainWindow", "OpenBCI GUI", None))
self.pushButton.setText(_translate("MainWindow", "Stream", None))