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


Python MplWidget.setEnabled方法代码示例

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


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

示例1: Ui_PysplotterDlg

# 需要导入模块: from mplwidget import MplWidget [as 别名]
# 或者: from mplwidget.MplWidget import setEnabled [as 别名]
class Ui_PysplotterDlg(object):
    def setupUi(self, PysplotterDlg):
        PysplotterDlg.setObjectName(_fromUtf8("PysplotterDlg"))
        PysplotterDlg.resize(800, 600)
        PysplotterDlg.setWindowTitle(QtGui.QApplication.translate("PysplotterDlg", "MainWindow", None, QtGui.QApplication.UnicodeUTF8))
        self.centralwidget = QtGui.QWidget(PysplotterDlg)
        self.centralwidget.setEnabled(True)
        self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
        self.verticalLayout = QtGui.QVBoxLayout(self.centralwidget)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.mplwidget = MplWidget(self.centralwidget)
        self.mplwidget.setEnabled(True)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.mplwidget.sizePolicy().hasHeightForWidth())
        self.mplwidget.setSizePolicy(sizePolicy)
        self.mplwidget.setObjectName(_fromUtf8("mplwidget"))
        self.horizontalLayout.addWidget(self.mplwidget)
        self.verticalLayout.addLayout(self.horizontalLayout)
        PysplotterDlg.setCentralWidget(self.centralwidget)
        self.menubar = QtGui.QMenuBar(PysplotterDlg)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 20))
        self.menubar.setObjectName(_fromUtf8("menubar"))
        self.menuFile = QtGui.QMenu(self.menubar)
        self.menuFile.setTitle(QtGui.QApplication.translate("PysplotterDlg", "&File", None, QtGui.QApplication.UnicodeUTF8))
        self.menuFile.setObjectName(_fromUtf8("menuFile"))
        self.menuEdit = QtGui.QMenu(self.menubar)
        self.menuEdit.setTitle(QtGui.QApplication.translate("PysplotterDlg", "&Edit", None, QtGui.QApplication.UnicodeUTF8))
        self.menuEdit.setObjectName(_fromUtf8("menuEdit"))
        self.menuView = QtGui.QMenu(self.menubar)
        self.menuView.setTitle(QtGui.QApplication.translate("PysplotterDlg", "View", None, QtGui.QApplication.UnicodeUTF8))
        self.menuView.setObjectName(_fromUtf8("menuView"))
        self.menu_Spectrum = QtGui.QMenu(self.menubar)
        self.menu_Spectrum.setTitle(QtGui.QApplication.translate("PysplotterDlg", "&Spectrum", None, QtGui.QApplication.UnicodeUTF8))
        self.menu_Spectrum.setObjectName(_fromUtf8("menu_Spectrum"))
        PysplotterDlg.setMenuBar(self.menubar)
        self.statusbar = QtGui.QStatusBar(PysplotterDlg)
        self.statusbar.setObjectName(_fromUtf8("statusbar"))
        PysplotterDlg.setStatusBar(self.statusbar)
        self.toolBar = QtGui.QToolBar(PysplotterDlg)
        self.toolBar.setWindowTitle(QtGui.QApplication.translate("PysplotterDlg", "toolBar", None, QtGui.QApplication.UnicodeUTF8))
        self.toolBar.setObjectName(_fromUtf8("toolBar"))
        PysplotterDlg.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBar)
        self.dockWidget = QtGui.QDockWidget(PysplotterDlg)
        self.dockWidget.setObjectName(_fromUtf8("dockWidget"))
        self.dockWidgetContents = QtGui.QWidget()
        self.dockWidgetContents.setObjectName(_fromUtf8("dockWidgetContents"))
        self.verticalLayout_3 = QtGui.QVBoxLayout(self.dockWidgetContents)
        self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3"))
        self.verticalLayout_2 = QtGui.QVBoxLayout()
        self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
        self.treeWidget = QtGui.QTreeWidget(self.dockWidgetContents)
        self.treeWidget.setObjectName(_fromUtf8("treeWidget"))
        self.treeWidget.headerItem().setText(0, _fromUtf8("1"))
        self.verticalLayout_2.addWidget(self.treeWidget)
        self.listWidget = QtGui.QListWidget(self.dockWidgetContents)
        self.listWidget.setObjectName(_fromUtf8("listWidget"))
        self.verticalLayout_2.addWidget(self.listWidget)
        self.verticalLayout_3.addLayout(self.verticalLayout_2)
        self.dockWidget.setWidget(self.dockWidgetContents)
        PysplotterDlg.addDockWidget(QtCore.Qt.DockWidgetArea(2), self.dockWidget)
        self.actionOpen = QtGui.QAction(PysplotterDlg)
        self.actionOpen.setText(QtGui.QApplication.translate("PysplotterDlg", "&Open", None, QtGui.QApplication.UnicodeUTF8))
        self.actionOpen.setShortcut(QtGui.QApplication.translate("PysplotterDlg", "Ctrl+O", None, QtGui.QApplication.UnicodeUTF8))
        self.actionOpen.setObjectName(_fromUtf8("actionOpen"))
        self.actionQuit = QtGui.QAction(PysplotterDlg)
        self.actionQuit.setText(QtGui.QApplication.translate("PysplotterDlg", "&Quit", None, QtGui.QApplication.UnicodeUTF8))
        self.actionQuit.setShortcut(QtGui.QApplication.translate("PysplotterDlg", "Ctrl+Q", None, QtGui.QApplication.UnicodeUTF8))
        self.actionQuit.setObjectName(_fromUtf8("actionQuit"))
        self.actionToggle_Grid = QtGui.QAction(PysplotterDlg)
        self.actionToggle_Grid.setText(QtGui.QApplication.translate("PysplotterDlg", "Toggle &Grid", None, QtGui.QApplication.UnicodeUTF8))
        self.actionToggle_Grid.setObjectName(_fromUtf8("actionToggle_Grid"))
        self.actionToggle_linear_log = QtGui.QAction(PysplotterDlg)
        self.actionToggle_linear_log.setText(QtGui.QApplication.translate("PysplotterDlg", "Toggle &linear/log", None, QtGui.QApplication.UnicodeUTF8))
        self.actionToggle_linear_log.setObjectName(_fromUtf8("actionToggle_linear_log"))
        self.action_Velocity_Space = QtGui.QAction(PysplotterDlg)
        self.action_Velocity_Space.setText(QtGui.QApplication.translate("PysplotterDlg", "&Velocity Space", None, QtGui.QApplication.UnicodeUTF8))
        self.action_Velocity_Space.setObjectName(_fromUtf8("action_Velocity_Space"))
        self.action_Load_Spectrum = QtGui.QAction(PysplotterDlg)
        self.action_Load_Spectrum.setText(QtGui.QApplication.translate("PysplotterDlg", "&Load Spectrum", None, QtGui.QApplication.UnicodeUTF8))
        self.action_Load_Spectrum.setObjectName(_fromUtf8("action_Load_Spectrum"))
        self.actionShow_Available_Spectra = QtGui.QAction(PysplotterDlg)
        self.actionShow_Available_Spectra.setText(QtGui.QApplication.translate("PysplotterDlg", "Show Available Spectra", None, QtGui.QApplication.UnicodeUTF8))
        self.actionShow_Available_Spectra.setObjectName(_fromUtf8("actionShow_Available_Spectra"))
        self.actionSelect_Line = QtGui.QAction(PysplotterDlg)
        self.actionSelect_Line.setText(QtGui.QApplication.translate("PysplotterDlg", "Select Line", None, QtGui.QApplication.UnicodeUTF8))
        self.actionSelect_Line.setObjectName(_fromUtf8("actionSelect_Line"))
        self.menuFile.addAction(self.actionOpen)
        self.menuFile.addSeparator()
        self.menuFile.addAction(self.actionQuit)
        self.menuView.addAction(self.actionToggle_Grid)
        self.menuView.addAction(self.actionToggle_linear_log)
        self.menuView.addAction(self.action_Velocity_Space)
        self.menu_Spectrum.addAction(self.action_Load_Spectrum)
        self.menu_Spectrum.addAction(self.actionShow_Available_Spectra)
        self.menu_Spectrum.addAction(self.actionSelect_Line)
        self.menubar.addAction(self.menuFile.menuAction())
#.........这里部分代码省略.........
开发者ID:iancze,项目名称:Pysplotter,代码行数:103,代码来源:ui_pysplotter.py


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