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


Python MainWindow.addNewDataView方法代码示例

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


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

示例1: PyQtGuiController

# 需要导入模块: from MainWindow import MainWindow [as 别名]
# 或者: from MainWindow.MainWindow import addNewDataView [as 别名]
class PyQtGuiController(GuiControllerBase):
    def __init__(self):
        super(PyQtGuiController, self).__init__()
        self.app = QtGui.QApplication(sys.argv)
        self.win = MainWindow(self)
    def getDirName(self, title, dir, filter):
        temp = QtGui.QFileDialog.getExistingDirectory(self.win, title, dir)
        return str(temp)
    def getFileNames(self, title, dir, filter):
        temp = QtGui.QFileDialog.getOpenFileNames(self.win, title, dir, filter)
        fileNames = map(str, temp)
        return fileNames
    def getSaveName(self, title, dir, filter):
        temp = QtGui.QFileDialog.getSaveFileName(self.win, title, dir, filter)
        fileName = str(temp)
        return fileName
    def getInputName(self, window):
        name, ok = QtGui.QInputDialog.getText(self.win, "Enter the name", 
                "Name:", QtGui.QLineEdit.Normal, window.getName())
        return name, ok
    def getInputPara(self, window, title, initial = 0.0):
        data, ok = QtGui.QInputDialog.getDouble(self.win, "Enter the " + title.lower(), 
                title.capitalize() + ":", initial)
        return data, ok
    def showMessageOnStatusBar(self, text):
        return self.win.showMessageOnStatusBar(text)
    def getMessageOnStatusBar(self):
        return self.win.getMessageOnStatusBar()
    def addNewDataView(self, data):
        return self.win.addNewDataView(data)
    def startApplication(self): 
        self.win.show()
        sys.exit(self.app.exec_())
开发者ID:guohengkai,项目名称:MIRVAP,代码行数:35,代码来源:PyQtGuiController.py


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