• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python MainWindow.MainWindow类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: controller

class controller():
    def __init__(self):
        
        self.initUI()
        
    def initUI(self): 
        self.mw=MainWindow(self)
        self.mw.show()
        self.add_Filtermethods()
        #self.need_Param()
    def need_Param(self,a="HP",b="Chebychev 1",c="man"):
        if a=="HP" and b=="Chebychev 1": 
            b="cheby1"
            return self.filter.get(b).needHP()
        else:
            return "noch nicht implementiert"
    def add_Filtermethods(self):
        self.filter={}
        fobj=open("init.txt","r")
        for line in fobj:
            line=line.strip()
            #a=  eval(line) 
            a=getattr(sys.modules[__name__], line)()
            self.filter.update({line:a})
        fobj.close
开发者ID:jbeike,项目名称:DSV.2,代码行数:25,代码来源:controller.py


示例2: PyQtGuiController

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 getReloadDataIndex(self):
        if self.dataModel.getCount() == 0:
            self.showErrorMessage('Error', 'There\'re no enough data!')
            return
        names = self.dataModel.getNameDict()
        return self.getDataIndex(names, "Select the data to be reloaded")
    def getDataIndex(self, names, word):
        items = names.keys()
        item, ok = QtGui.QInputDialog.getItem(self.win, word, "Data:", items, 0, False)
        if ok and item:
            item = str(item)
            index = int(names[item])
            del names[item]
            return index
    def getRegisterDataIndex(self):
        if self.dataModel.getCount() < 2:
            self.showErrorMessage('Error', 'There\'re no enough data!')
            return
        names = self.dataModel.getNameDict()
        fixedIndex = self.getDataIndex(names, "Select the fixed image")
        if fixedIndex is not None:
            movingIndex = self.getDataIndex(names, "Select the moving image")
            if movingIndex is not None:
                return (fixedIndex, movingIndex)
    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 showErrorMessage(self, title, message):
        QtGui.QMessageBox.information(self.win, title, message)
    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,代码行数:60,代码来源:PyQtGuiController.py


示例3: on_promisCheckBox_stateChanged

    def on_promisCheckBox_stateChanged(self, p0):
        MainWindow.on_promisCheckBox_stateChanged(self, p0)
#        print "check int:%d"%p0
        if(self.promisCheckBox.isChecked()):
            self.capturer.set_promisc(True)
        else:
            self.capturer.set_promisc(False)
开发者ID:futureer,项目名称:QSniffer,代码行数:7,代码来源:QSniffer.py


示例4: main

def main():
    global app
    global mainWindow
    app = QApplication(sys.argv)
    mainWindow = MainWindow()
    mainWindow.show()
    sys.exit(app.exec_())
开发者ID:tajoy,项目名称:GOC,代码行数:7,代码来源:GOC.py


示例5: _Run

def _Run(argv):
    
    from CDUtilsPack.MetaUtils import UserException
    from PackUtils.CoreBaseException import CoreBaseException     
    from SectionFactory import CreateSectionsByCfg
    from MainWindow import MainWindow
        
    try:
        appLoop = QtGui.QApplication(argv)  # for Qt widgets using 
        
        imgs = _ImageLoader(dir = 'Images')
        sett = _CmdLineParser(argv)        
                
        absFileName = os.path.join(os.getcwd(), sett['cfg'])
        del sett['cfg']                       
        sectionDict = CreateSectionsByCfg(absFileName, imgs)        
        
        app = MainWindow(sectionDict, imgs)        
        app.show()                                      

        appLoop.exec()             
                   
    except UserException as e:
        print ("Aborted!\nStart-up error:", e)        
    
    except CoreBaseException as e:
        print("Aborted!\n{0}: {1}".format(type(e).__name__, e))
开发者ID:ixc-software,项目名称:lucksi,代码行数:27,代码来源:Main.py


示例6: run

def run():
    # PySide fix: Check if QApplication already exists. Create QApplication if it doesn't exist 
    app = QtGui.QApplication.instance()        
    if not app:
        app = QtGui.QApplication(sys.argv)
    window = MainWindow()
    window.show()
    app.exec_()
开发者ID:mhogg,项目名称:BMDanalyse,代码行数:8,代码来源:BMDanalyse.py


示例7: on_stopButton_clicked

 def on_stopButton_clicked(self):
     MainWindow.on_stopButton_clicked(self)
     if self.cap_thread != None and self.cap_thread.is_alive():
         self.capturer.stop_capture()
         self.cap_thread.join()
     if self.ana_thread != None and self.ana_thread.is_alive():
         self.analyzer.stop_analize()
         self.ana_thread.join()
开发者ID:futureer,项目名称:QSniffer,代码行数:8,代码来源:QSniffer.py


示例8: main

def main(argv):
    app = QApplication(sys.argv)

    # Constructing gui...
    mainWindow = MainWindow()
    mainWindow.show()

    # Start event processing...
    app.exec_()
开发者ID:anarsoul,项目名称:wicd-qt4,代码行数:9,代码来源:wicd-qt4.py


示例9: PVDataTools

class PVDataTools(QtGui.QApplication):

    def __init__(self, sys_argv):
        super().__init__(sys_argv)

        self.model = Model()
        self.main_window = MainWindow(self.model)
        self.main_window.show()
        self.main_window.new_dataviewer()
开发者ID:DGalt,项目名称:pvdatatools,代码行数:9,代码来源:PVDataTools.py


示例10: main

def main():
    import sys

    app = QApplication(sys.argv)

    screen = MainWindow()
    screen.show()

    sys.exit(app.exec_())
开发者ID:arturnista,项目名称:RPGSoundController,代码行数:9,代码来源:main.py


示例11: main

def main():
    config = ConfigParser.SafeConfigParser(allow_no_value=True)
    internalConfig = ConfigParser.SafeConfigParser(allow_no_value=True)
    config.read("config.ini")
    internalConfig.read("internal-config.ini")

    w = MainWindow(config, internalConfig)
    w.show()
    return app.exec_()
开发者ID:dspieringsvdw2,项目名称:manualdaq,代码行数:9,代码来源:__main__.py


示例12: App

class App(QApplication):

    def __init__(self, argv):
        super(App, self).__init__(argv)
        self.mainwindow = MainWindow()

    def exec_(self, *args, **kwargs):
        self.mainwindow.show()
        super(App, self).exec_()
开发者ID:abalint,项目名称:ChessAnalyser,代码行数:9,代码来源:App.py


示例13: main

def main():
    app = QtGui.QApplication(sys.argv)
    guiDelegate = delegate.GuiDelegate()
    window = MainWindow(guiDelegate=guiDelegate)
    guiDelegate.set_main_window(window)

    window.show()
    excode = app.exec_()
    guiDelegate.exit()
    sys.exit(excode)
开发者ID:lassevalentini,项目名称:mail-attachment-downloader,代码行数:10,代码来源:main.py


示例14: on_startButton_clicked

    def on_startButton_clicked(self):
        MainWindow.on_startButton_clicked(self)
        if self.capturer.adhandle == None:
            curindex = self.devComboBox.currentIndex()
            if not self.capturer.open_dev(curindex):
#                TODO: handle open error
                return
        self.cap_thread = threading.Thread(target=self.capturer.start_capture)
        self.cap_thread.start()
        self.ana_thread = threading.Thread(target=self.analyzer.start_analize)
        self.ana_thread.start()
开发者ID:futureer,项目名称:QSniffer,代码行数:11,代码来源:QSniffer.py


示例15: main

def main(args):
    mainApp=QtGui.QApplication(args)
    fenetre=QWidget()
    label1 = QLabel("Bienvenue")


    MainWindow2=MainWindow()
    MainWindow2.show()


    r=mainApp.exec_()
    return r
开发者ID:Darkyler,项目名称:Piscine,代码行数:12,代码来源:MainView.py


示例16: __init__

class Application:
    def __init__(self):
        global gwin
        #self.settingsContainer = SettingsContainer()
        #self.settingsController = SettingsController(self.settingsContainer)
        #self.settingsController.loadSettings()
        self.mainWindow = MainWindow()
        self.mainWindow.setupWindow()
        
        gwin = self.mainWindow
        self.journal = Journal()
        self.wordsHint = WordsHint()
开发者ID:scythargon,项目名称:mad-skillz,代码行数:12,代码来源:trans_label_click.py


示例17: exit

    def exit(self):
	self.cleanUp()
	self.painter = None
	
	for widget in self.parent.pack_slaves():
	    widget.pack_forget()
	
        from MainWindow import MainWindow
	mw = MainWindow(self.parent)
	mw.pack()
	
        self.destroy()
开发者ID:aherlihy,项目名称:GLIDE,代码行数:12,代码来源:Environment.py


示例18: __init__

class Application:
	def __init__(self):
		self.name = "Стержни от Димыча"
		self.nameDelim = " — "
		
		self.version = "1.0"
		self.timestamp = "Октябрь 2015"
		
		self.construction = None
		
		self.logic = Logic(self)
		
		# Окна
		self.mainWindow = MainWindow(self)
		self.windows = set()
		self.windows.add(self.mainWindow)
	
	
	def createDetailWindow(self, barNumber = 0):
		self.windows.add(DetailWindow(self, barNumber = barNumber))
	
	
	def createMatricesWindow(self, barNumber = None):
		self.windows.add(MatricesWindow(self, barNumber = barNumber))
	
	
	def createComponentsDumpWindow(self, barNumber = None):
		self.windows.add(ComponentsDumpWindow(self, barNumber = barNumber))
	
	
	def createEditConstructionWindow(self, barNumber = None):
		self.windows.add(EditConstructionWindow(self, barNumber = barNumber))
	
	
	def onWindowDestroy(self, window):
		self.windows.discard(window)
	
	
	def onConstructionChanged(self):
		for w in self.windows:
			w.onConstructionChanged()
	
	
	def run(self):
		self.mainWindow.mainloop()
	
	
	def about(self):
		return "Версия: %s, %s\n\n" \
			   "Куковинец Дмитрий Валерьевич\[email protected]\n\n" \
			   "ФГБОУ ВО \"МГТУ \"СТАНКИН\"\nКафедра УИТС" \
			   % (self.version, self.timestamp)
开发者ID:DmitryKuk,项目名称:CompMech,代码行数:52,代码来源:Application.py


示例19: LheidoEdit

class LheidoEdit(QApplication):
	""" LheidoEdit app class extend QApplication """
	
	def __init__ (self, argv):
		QApplication.__init__(self, argv)
		self.__mainWin = MainWindow()
		with open("dev-theme/dev_theme.css") as t:
			dev_theme = t.read()
		self.setStyleSheet(dev_theme)
	
	def run(self):
		self.__mainWin.show()
		self.exec_()
开发者ID:lheido,项目名称:lheidoEdit,代码行数:13,代码来源:lheidoEdit.py


示例20: on_pktTableWidget_cellClicked

 def on_pktTableWidget_cellClicked(self, row, column):
     MainWindow.on_pktTableWidget_cellClicked(self, row, column)
     tree = self.pktTreeWidget
     tree.clear()
     pktItem = self.analyzer.itemlist[row]
     pktdata = pktItem.rawpkt[1]
     
     pTree = ProtocolTree(tree, pktdata)
     tree.insertTopLevelItems(0, pTree.parseProtocol())
     p0xb = self.pkt0xBrowser
     p0xb.setText(QtCore.QString(PktContent.pkt0xContent(pktdata)))
     pasciib = self.pktAsciiBrowser
     pasciib.setText(QtCore.QString(PktContent.pktAsciiContent(pktdata)))
开发者ID:futureer,项目名称:QSniffer,代码行数:13,代码来源:QSniffer.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python toolbox.debug_output函数代码示例发布时间:2022-05-24
下一篇:
Python MainSelectorComponent.MainSelectorComponent类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap