本文整理汇总了Python中pyqtgraph.PlotWidget.setStyleSheet方法的典型用法代码示例。如果您正苦于以下问题:Python PlotWidget.setStyleSheet方法的具体用法?Python PlotWidget.setStyleSheet怎么用?Python PlotWidget.setStyleSheet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyqtgraph.PlotWidget
的用法示例。
在下文中一共展示了PlotWidget.setStyleSheet方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Ui_FileLoaderG
# 需要导入模块: from pyqtgraph import PlotWidget [as 别名]
# 或者: from pyqtgraph.PlotWidget import setStyleSheet [as 别名]
class Ui_FileLoaderG(object):
def setupUi(self, FileLoaderG):
FileLoaderG.setObjectName(_fromUtf8("FileLoaderG"))
FileLoaderG.resize(909, 541)
self.centralwidget = QtGui.QWidget(FileLoaderG)
self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
self.frame = QtGui.QFrame(self.centralwidget)
self.frame.setGeometry(QtCore.QRect(10, 10, 881, 439))
font = QtGui.QFont()
font.setBold(False)
font.setWeight(50)
self.frame.setFont(font)
self.frame.setStyleSheet(_fromUtf8("background-color: rgb(255, 255, 255);"))
self.frame.setFrameShape(QtGui.QFrame.Box)
self.frame.setFrameShadow(QtGui.QFrame.Raised)
self.frame.setObjectName(_fromUtf8("frame"))
self.gridLayout = QtGui.QGridLayout(self.frame)
self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
self.Local = PlotWidget(self.frame)
font = QtGui.QFont()
font.setPointSize(10)
self.Local.setFont(font)
self.Local.setStyleSheet(_fromUtf8("background-color: rgb(255, 255, 255);\n"
"border-top-color: rgb(255, 255, 255);\n"
"border-right-color: rgb(255, 255, 255);\n"
"border-bottom-color: rgb(255, 255, 255);\n"
"border-left-color: rgb(0, 0, 0);"))
self.Local.setObjectName(_fromUtf8("Local"))
self.gridLayout.addWidget(self.Local, 0, 0, 1, 1)
self.Server = PlotWidget(self.frame)
font = QtGui.QFont()
font.setPointSize(10)
self.Server.setFont(font)
self.Server.setStyleSheet(_fromUtf8("background-color: rgb(255, 255, 255);\n"
"border-top-color: rgb(255, 255, 255);\n"
"border-right-color: rgb(255, 255, 255);\n"
"border-bottom-color: rgb(255, 255, 255);\n"
"border-left-color: rgb(0, 0, 0);"))
self.Server.setObjectName(_fromUtf8("Server"))
self.gridLayout.addWidget(self.Server, 0, 1, 1, 1)
FileLoaderG.setCentralWidget(self.centralwidget)
self.menubar = QtGui.QMenuBar(FileLoaderG)
self.menubar.setGeometry(QtCore.QRect(0, 0, 909, 20))
self.menubar.setObjectName(_fromUtf8("menubar"))
self.menuFile = QtGui.QMenu(self.menubar)
self.menuFile.setObjectName(_fromUtf8("menuFile"))
self.menuSettings = QtGui.QMenu(self.menubar)
self.menuSettings.setObjectName(_fromUtf8("menuSettings"))
self.menuAbout_Us = QtGui.QMenu(self.menubar)
self.menuAbout_Us.setObjectName(_fromUtf8("menuAbout_Us"))
FileLoaderG.setMenuBar(self.menubar)
self.statusbar = QtGui.QStatusBar(FileLoaderG)
self.statusbar.setObjectName(_fromUtf8("statusbar"))
FileLoaderG.setStatusBar(self.statusbar)
self.actionFile_Loader_G = QtGui.QAction(FileLoaderG)
self.actionFile_Loader_G.setObjectName(_fromUtf8("actionFile_Loader_G"))
self.actionOpen = QtGui.QAction(FileLoaderG)
self.actionOpen.setObjectName(_fromUtf8("actionOpen"))
self.actionQuit = QtGui.QAction(FileLoaderG)
self.actionQuit.setObjectName(_fromUtf8("actionQuit"))
self.menuFile.addAction(self.actionOpen)
self.menuFile.addSeparator()
self.menuFile.addAction(self.actionQuit)
self.menuAbout_Us.addAction(self.actionFile_Loader_G)
self.menubar.addAction(self.menuFile.menuAction())
self.menubar.addAction(self.menuSettings.menuAction())
self.menubar.addAction(self.menuAbout_Us.menuAction())
self.retranslateUi(FileLoaderG)
QtCore.QMetaObject.connectSlotsByName(FileLoaderG)
def retranslateUi(self, FileLoaderG):
FileLoaderG.setWindowTitle(_translate("FileLoaderG", "MainWindow", None))
self.menuFile.setTitle(_translate("FileLoaderG", "File", None))
self.menuSettings.setTitle(_translate("FileLoaderG", "Settings", None))
self.menuAbout_Us.setTitle(_translate("FileLoaderG", "About Us", None))
self.actionFile_Loader_G.setText(_translate("FileLoaderG", "File Loader G", None))
self.actionOpen.setText(_translate("FileLoaderG", "Open", None))
self.actionQuit.setText(_translate("FileLoaderG", "Quit", None))
示例2: Ui_MainWidget
# 需要导入模块: from pyqtgraph import PlotWidget [as 别名]
# 或者: from pyqtgraph.PlotWidget import setStyleSheet [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"))
#.........这里部分代码省略.........