本文整理汇总了Python中matplotlib.backends.backend_qt5agg.FigureCanvasQTAgg.setObjectName方法的典型用法代码示例。如果您正苦于以下问题:Python FigureCanvasQTAgg.setObjectName方法的具体用法?Python FigureCanvasQTAgg.setObjectName怎么用?Python FigureCanvasQTAgg.setObjectName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类matplotlib.backends.backend_qt5agg.FigureCanvasQTAgg
的用法示例。
在下文中一共展示了FigureCanvasQTAgg.setObjectName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Ui_MainWindow
# 需要导入模块: from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg [as 别名]
# 或者: from matplotlib.backends.backend_qt5agg.FigureCanvasQTAgg import setObjectName [as 别名]
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName(_fromUtf8("Data View"))
#MainWindow.resize(539, 600)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget)
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
self.splitter = QtWidgets.QSplitter(self.centralwidget)
self.splitter.setOrientation(QtCore.Qt.Horizontal)
self.splitter.setObjectName(_fromUtf8("splitter"))
# File navigation
self.fileSystemModel = QtWidgets.QDirModel(self.splitter)
self.fileSystemModel.setObjectName(_fromUtf8("fileSystemModel"))
currentDir = str(QtCore.QDir.currentPath())
index = self.fileSystemModel.index(currentDir)
self.treeView = QtWidgets.QTreeView(self.splitter)
self.treeView.setObjectName(_fromUtf8("treeView"))
self.treeView.setModel(self.fileSystemModel)
if len(sys.argv)>1:
self.currentFile = currentDir + '/' + sys.argv[1]
else:
self.currentFile = None
self.recursive_expand( index, self.treeView )
tVheader = self.treeView.header()
for i in range(1,4): tVheader.hideSection(i)
self.treeView.doubleClicked.connect(self.on_treeView_doubleClicked)
# Plots tab
self.tabWidget = QtWidgets.QTabWidget(self.splitter)
self.tabWidget.setObjectName(_fromUtf8("tabWidget"))
self.tab = QtWidgets.QWidget()
self.tab.setObjectName(_fromUtf8("tab"))
self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.tab)
self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
self.figure = plt.figure(figsize=(15,5))
self.canvas = FigureCanvas(self.figure)
self.canvas.setObjectName(_fromUtf8("canvas"))
self.toolbar = NavigationToolbar(self.canvas, self)
self.toolbar.hide()
self.verticalLayout_2.addWidget(self.canvas)
# Plot buttons
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout_plotButtons"))
self.plotTypeCombo = QtWidgets.QComboBox(self.tab)
self.plotTypeCombo.setObjectName(_fromUtf8("plotTypeCombo"))
self.plotTypeCombo.currentIndexChanged.connect(self.ChangePlotType)
self.horizontalLayout.addWidget(self.plotTypeCombo)
self.btnPlot = QtWidgets.QPushButton(self.tab)
self.btnPlot.setObjectName(_fromUtf8("btnPlot"))
self.btnPlot.clicked.connect(self.drawPlot)
self.horizontalLayout.addWidget(self.btnPlot)
self.btnZoom = QtWidgets.QPushButton(self.tab)
self.btnZoom.setObjectName(_fromUtf8("btnZoom"))
self.btnZoom.clicked.connect(self.plotZoom)
self.horizontalLayout.addWidget(self.btnZoom)
self.btnPan = QtWidgets.QPushButton(self.tab)
self.btnPan.setObjectName(_fromUtf8("btnPan"))
self.btnPan.clicked.connect(self.plotPan)
self.horizontalLayout.addWidget(self.btnPan)
self.btnHome = QtWidgets.QPushButton(self.tab)
self.btnHome.setObjectName(_fromUtf8("btnHome"))
self.btnHome.clicked.connect(self.plotHome)
self.horizontalLayout.addWidget(self.btnHome)
self.verticalLayout_2.addLayout(self.horizontalLayout)
# x axis options
self.horizontalLayout_xAxis = QtWidgets.QHBoxLayout()
self.horizontalLayout_xAxis.setObjectName(_fromUtf8("horizontalLayout_xAxis"))
self.xColSelect = QtWidgets.QComboBox(self.tab)
self.xColSelect.setObjectName(_fromUtf8("xColSelect"))
self.xColSelect.currentIndexChanged.connect(self.ResetUserSelections)
self.horizontalLayout_xAxis.addWidget(self.xColSelect)
self.horizontalLayout_xAxis.setStretchFactor(self.xColSelect,2)
self.xbinsLabel = QtWidgets.QLabel(self.tab)
self.xbinsLabel.setText("X Bins:")
self.horizontalLayout_xAxis.addWidget( self.xbinsLabel )
self.xnBinsSpin = QtWidgets.QSpinBox(self.tab)
self.xnBinsSpin.setObjectName(_fromUtf8("xnBinsSpin"))
self.xnBinsSpin.valueChanged.connect(self.XChangeBinning)
self.xnBinsSpin.setRange(1,10000)
self.horizontalLayout_xAxis.addWidget( self.xnBinsSpin )
self.horizontalLayout_xAxis.setStretchFactor(self.xnBinsSpin,2)
self.xminLabel = QtWidgets.QLabel(self.tab)
self.xminLabel.setText("X Min:")
self.horizontalLayout_xAxis.addWidget( self.xminLabel )
self.xnMinSpin = QtWidgets.QDoubleSpinBox(self.tab)
self.xnMinSpin.setObjectName(_fromUtf8("xnMinSpin"))
self.xnMinSpin.valueChanged.connect(self.XChangeMin)
self.xnMinSpin.setRange( -1e20, 1e20 )
self.horizontalLayout_xAxis.addWidget( self.xnMinSpin )
self.horizontalLayout_xAxis.setStretchFactor(self.xnMinSpin,2)
self.xmaxLabel = QtWidgets.QLabel(self.tab)
self.xmaxLabel.setText("X Max:")
self.horizontalLayout_xAxis.addWidget( self.xmaxLabel )
self.xnMaxSpin = QtWidgets.QDoubleSpinBox(self.tab)
#.........这里部分代码省略.........
示例2: Ui_Dialog
# 需要导入模块: from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg [as 别名]
# 或者: from matplotlib.backends.backend_qt5agg.FigureCanvasQTAgg import setObjectName [as 别名]
class Ui_Dialog(object):
def setupUi(self, Dialog, mainwindow):
Dialog.setObjectName("Dialog")
Dialog.resize(633, 414)
self.horizontalLayout = QtWidgets.QHBoxLayout(Dialog)
self.horizontalLayout.setObjectName("horizontalLayout")
self.verticalLayout = QtWidgets.QVBoxLayout()
self.verticalLayout.setObjectName("verticalLayout")
self.figure = plt.figure()
self.gel = FigureCanvas(self.figure)
self.gel.setMinimumSize(QtCore.QSize(320, 0))
self.gel.setObjectName("gel")
self.horizontalLayout_3 = QtWidgets.QHBoxLayout(self.gel)
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
self.verticalLayout.addWidget(self.gel)
self.navbar = NavigationToolbar(self.gel, Dialog)
self.navbar.setObjectName("navbar")
self.verticalLayout.addWidget(self.navbar)
self.horizontalLayout.addLayout(self.verticalLayout)
self.verticalLayout_3 = QtWidgets.QVBoxLayout()
self.verticalLayout_3.setObjectName("verticalLayout_3")
self.groupBox_2 = QtWidgets.QGroupBox(Dialog)
self.groupBox_2.setObjectName("groupBox_2")
self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.groupBox_2)
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.seq_sele = QtWidgets.QComboBox(self.groupBox_2)
self.seq_sele.setObjectName("seq_sele")
self.verticalLayout_2.addWidget(self.seq_sele)
self.verticalLayout_3.addWidget(self.groupBox_2)
self.groupBox = QtWidgets.QGroupBox(Dialog)
self.groupBox.setEnabled(True)
self.groupBox.setCheckable(False)
self.groupBox.setChecked(False)
self.groupBox.setObjectName("groupBox")
self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.groupBox)
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.verticalLayout_4 = QtWidgets.QVBoxLayout()
self.verticalLayout_4.setObjectName("verticalLayout_4")
self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
self.horizontalLayout_4.setObjectName("horizontalLayout_4")
self.select_enz1 = QtWidgets.QComboBox(self.groupBox)
self.select_enz1.setEnabled(False)
self.select_enz1.setCurrentText("")
self.select_enz1.setObjectName("select_enz1")
self.horizontalLayout_4.addWidget(self.select_enz1)
self.check_enzy1 = QtWidgets.QCheckBox(self.groupBox)
self.check_enzy1.setText("")
self.check_enzy1.setObjectName("check_enzy1")
self.horizontalLayout_4.addWidget(self.check_enzy1)
self.verticalLayout_4.addLayout(self.horizontalLayout_4)
self.horizontalLayout_5 = QtWidgets.QHBoxLayout()
self.horizontalLayout_5.setObjectName("horizontalLayout_5")
self.select_enz2 = QtWidgets.QComboBox(self.groupBox)
self.select_enz2.setEnabled(False)
self.select_enz2.setCurrentText("")
self.select_enz2.setObjectName("select_enz2")
self.horizontalLayout_5.addWidget(self.select_enz2)
self.check_enzy2 = QtWidgets.QCheckBox(self.groupBox)
self.check_enzy2.setText("")
self.check_enzy2.setObjectName("check_enzy2")
self.horizontalLayout_5.addWidget(self.check_enzy2)
self.verticalLayout_4.addLayout(self.horizontalLayout_5)
self.horizontalLayout_2.addLayout(self.verticalLayout_4)
self.verticalLayout_3.addWidget(self.groupBox)
self.groupBox_3 = QtWidgets.QGroupBox(Dialog)
self.groupBox_3.setObjectName("groupBox_3")
self.verticalLayout_5 = QtWidgets.QVBoxLayout(self.groupBox_3)
self.verticalLayout_5.setObjectName("verticalLayout_5")
self.ladder = QtWidgets.QComboBox(self.groupBox_3)
self.ladder.setObjectName("ladder")
self.verticalLayout_5.addWidget(self.ladder)
self.verticalLayout_3.addWidget(self.groupBox_3)
self.plot_update = QtWidgets.QPushButton(Dialog)
self.plot_update.setObjectName("plot_update")
self.verticalLayout_3.addWidget(self.plot_update)
self.gel_browser = QtWidgets.QTextBrowser(Dialog)
self.gel_browser.setObjectName("gel_browser")
self.verticalLayout_3.addWidget(self.gel_browser)
self.close_plot = QtWidgets.QPushButton(Dialog)
self.close_plot.setObjectName("close_plot")
self.verticalLayout_3.addWidget(self.close_plot)
self.horizontalLayout.addLayout(self.verticalLayout_3)
self.retranslateUi(Dialog)
QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog):
_translate = QtCore.QCoreApplication.translate
Dialog.setWindowTitle(_translate("Dialog", "Dialog"))
self.groupBox_2.setTitle(_translate("Dialog", "Sequence Selection"))
self.groupBox.setTitle(_translate("Dialog", "Enzyme Selction"))
self.groupBox_3.setTitle(_translate("Dialog", "Ladder Selection:"))
self.plot_update.setText(_translate("Dialog", "Update Plot"))
self.close_plot.setText(_translate("Dialog", "Quit"))