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


Python mainwindow.Ui_MainWindow类代码示例

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


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

示例1: Editor

class Editor(QtGui.QMainWindow):

    def __init__(self):
        super(Editor, self).__init__()
        self.ui=Ui_MainWindow()
        self.ui.setupUi(self)
        self.show()
开发者ID:finger563,项目名称:editor,代码行数:7,代码来源:test.py

示例2: ControlMainWindow

class ControlMainWindow(QtGui.QMainWindow):
    def __init__(self, parent=None):
        super(ControlMainWindow, self).__init__(parent)
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        self.ui.exit_button.clicked.connect(self.CloseProgram)

    @QtCore.Slot()
    def CloseProgram(self):
        sys.exit()
开发者ID:montreal91,项目名称:workshop,代码行数:10,代码来源:hw_app.py

示例3: ScriptRunnerMainWindow

class ScriptRunnerMainWindow(QtGui.QMainWindow):
    """
    This class initializes the main window for Script Runner
    """

    def __init__(self):
        """
        Set up the user interface from Designer.
        """
        QtGui.QMainWindow.__init__(self)
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
开发者ID:der100,项目名称:Script-Runner,代码行数:12,代码来源:preferences.py

示例4: MainWindow

class MainWindow(QtGui.QMainWindow):
    def __init__(self, parent=None):
        super(MainWindow, self).__init__(parent)
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        self.ui.actionQuit.triggered.connect(QtCore.QCoreApplication.instance().quit)
        self.ui.pkgList.itemClicked.connect(self._showPackageDetail)
        self.ui.installedBtn.clicked.connect(self._showInstalled)
        self.ui.availableBtn.clicked.connect(self._showAvailable)
        self.ui.karmaWidget.hide()
        #menu = QtGui.QMenu(self)
        #menu.addAction("Description")
        #menu.addAction("Comments")
        #menu.addAction("Related packages")
        #menu.addAction("Test cases")
        #menu.activated.connect(self._showPage)
        #self.ui.moreBtn.setMenu(menu)

    def _showInstalled(self):
        self.ui.availableBtn.setChecked(False)

    def _showAvailable(self):
        self.ui.installedBtn.setChecked(False)

    def _switchView(self, n):
        if not self.ui.pkgDetailWidget.isHidden():
            if n == -10: # XXX weird values
                self.ui.karmaWidget.show()
            elif n == -11:
                self.ui.karmaWidget.hide()

    #def _showPage(self, n):
        # TODO setCurrentIndex
    #    self.ui.descPage.hide()
    #    self.ui.commentPage.hide()
    #    self.ui.relatedPkgPage.hide()
    #    self.ui.testCasePage.hide()
    #    pages = {-5:self.ui.descPage, -6:self.ui.commentPage, -7:self.ui.relatedPkgPage, -8:self.ui.testCasePage} # XXX weird values
    #    pages[n].show() # XXX KeyError

    def _showPackageDetail(self, item):
        if self.ui.installedBtn.isChecked():
            self.ui.karmaWidget.show()
        else:
            self.ui.karmaWidget.hide()

        self._setData(item)

    def _setData(self, item):
        self.ui.pkgNameLabel.setText(item.text())
开发者ID:mkrizek,项目名称:fedora-gooey-karma,代码行数:50,代码来源:main.py

示例5: ClientWindow

class ClientWindow(QtGui.QMainWindow):
    Image = 'kukeliku.png'
    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self, parent)
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        self.ui.firstCard.setPixmap(QtGui.QPixmap(self.Image))

        self.ui.firstCard = NewLabel(self)
        self.ui.firstCard.move(0,0)
        QtCore.QObject.connect(self.ui.firstCard, QtCore.SIGNAL("clicked()"), self.fix)

    def fix(self):
        self.ui.label.setText('Suck it')
开发者ID:sebbz,项目名称:B-bot,代码行数:14,代码来源:client.py

示例6: MyWindowClass

class MyWindowClass(QtGui.QMainWindow):
    def __init__(self, parent=None):
        QtGui.QMainWindow.__init__(self, parent)
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        QtCore.QObject.connect(self.ui.StartButton, QtCore.SIGNAL('clicked()'), self.doFitting)
        QtCore.QObject.connect(self.ui.fileDialog, QtCore.SIGNAL('clicked()'), self.showFileInput)
        
    

    def doFitting(self):
        #t = np.arange(1.0, 5.0, 0.01)
        #s = np.sin(2*np.pi*t)
        #self.ui.xplot.canvas.ax.plot(t, s)
        #self.ui.xplot.canvas.draw()

        filename = self.ui.fileOutput.toPlainText()
        self.ui.FitResultsSummary.setPlainText("These are fitting results")
        self.ui.ErrorMessages.setPlainText("")
        try: 
            data = file1.make_numpyarray(filename)
        except:
            self.ui.ErrorMessages.setPlainText("Something went wrong with fitting")
            return None
        fit1 = file1.fit_axis(data,0)
        report = fit_report(fit1[2])
        self.ui.FitResultsSummary.append(report)
        
        # rotating by 90 degrees on the other axis doesn't work well yet
        #t = np.arange(1.0, 5.0, 0.01)
        #s = np.sin(2*np.pi*t)
        #self.myplot = self.ui.yplot.canvas.ax.plot(t, s)
        #self.rotated = ndimage.rotate(self.myplot,90)
        #self.rotated.draw()

        self.ui.BeamDisplay.canvas.ax.pcolorfast(data)
        self.ui.BeamDisplay.canvas.draw()

    def showFileInput(self):

        fname = QtGui.QFileDialog.getOpenFileName(self, 'Open file', 
                '/home/Oleksiy/Desktop/PythonCode')
        self.ui.fileOutput.setText(fname)



    def keyPressEvent(self, e):
        
        if e.key() == QtCore.Qt.Key_Escape:
            self.close()
开发者ID:Oleksiy1990,项目名称:beamFitter,代码行数:50,代码来源:GUItryout.py

示例7: Main

class Main(QtGui.QMainWindow):
    def __init__(self):
        QtGui.QMainWindow.__init__(self)
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        self.systemInformation()
    
    def systemInformation(self):
        subprocess.call('ps -ef > processlist.txt', shell=True)

       
        with open('processlist.txt', 'r') as processList:
            lines = processList.read().split('\n')
            
            firstLine = lines[0].split()[::-1]
            
            model = QtGui.QStandardItemModel(2,3,self)
          
            increment = 0
            first = True
            for line in lines:
                
                line = line.split()
                fullCMD = ''
                size = len(line)
                incrementor = 7
                while incrementor < size:
                    fullCMD = fullCMD + ' ' + line.pop(-1)
                    incrementor = incrementor + 1
                
                line.append(fullCMD)
                
                line = line[::-1]
                
                columnIncrement = 0
                for column in line:
                    if first:
                        model.setHorizontalHeaderItem(columnIncrement, QtGui.QStandardItem(column))
                    else:
                        model.setItem(increment, columnIncrement, QtGui.QStandardItem(column))
                    
                    columnIncrement = columnIncrement + 1
                
                if first:
                    first = False
                else:
                    increment = increment + 1
 
            self.ui.tableView.setModel(model)
开发者ID:vincekenney,项目名称:UI,代码行数:49,代码来源:display.py

示例8: __init__

    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self, parent)
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)

        self.have_auth = False
        self.have_mess = False

        ###############
        ##### set up signals/slots
        ###############

        ##### menu items

        # use the trick from http://eli.thegreenplace.net/2011/04/25/passing-extra-arguments-to-pyqt-slot
        # to use same callback for two menu items
        self.ui.actionImport_auth.triggered.connect(lambda: self.importData("auth"))
        self.ui.actionImport_messy.triggered.connect(lambda: self.importData("messy"))
        self.ui.actionRun_matching.triggered.connect(self.runMatching)
        self.ui.actionExport_CSV.triggered.connect(self.exportCSV)
        self.ui.actionPreferences.triggered.connect(self.setPreferences)
        self.ui.actionQuit.triggered.connect(QtCore.QCoreApplication.instance().quit)

        ##### GUI elements

        self.ui.match_table.currentCellChanged.connect(self.updateTopHits)
        self.ui.tophit_list.itemDoubleClicked.connect(self.clickAssign)
        self.ui.createAuthority_button.clicked.connect(self.createAuth)
        self.ui.deleteAuthority_button.clicked.connect(self.deleteMatch)

        ###### default preferences

        self.cutoffs = {"lev": 10, "damlev": 10, "jaro": 0.6, "jarowink": 0.6, "mrac": 9999}
        self.display_similarity = True
开发者ID:MAndrecPhD,项目名称:authoritizer,代码行数:34,代码来源:authoritizer.py

示例9: __init__

 def __init__(self):
     super(MainWindow, self).__init__()
     self.ui = Ui_MainWindow()
     self.ui.setupUi(self)
     self.connect_signals()
     self.cont = 0
     self.title = self.windowTitle()
开发者ID:zsinx6,项目名称:elainethegoddess,代码行数:7,代码来源:tela.py

示例10: __init__

 def __init__(self):
     """
     Set up the user interface from Designer.
     """
     QtGui.QMainWindow.__init__(self)
     self.ui = Ui_MainWindow()
     self.ui.setupUi(self)
开发者ID:der100,项目名称:Script-Runner,代码行数:7,代码来源:preferences.py

示例11: __init__

    def __init__(self,singleton,singleton_idusu):
        #Iniciar el objeto QMainWindow
        QMainWindow.__init__(self)
        self.obj_form_main = Ui_MainWindow()
        self.obj_form_main.setupUi(self)
        self.obj_form_main.actionEmpresa.triggered.connect(self.empresanuevo12)
        self.obj_form_main.actionEmpresaActualizar.triggered.connect(self.empresa_actualizar12)
        self.obj_form_main.action_alta_cliente_nuevo.triggered.connect(self.Agregar_cliente)
        self.obj_form_main.action_cliente_actualizar.triggered.connect(self.Actualizar_cliente)
        self.obj_form_main.action_buscar_cliente.triggered.connect(self.buscar_clientes)
        self.obj_form_main.action_credito_agregar_nuevo.triggered.connect(self.credito_nuevo)
        self.obj_form_main.actionCobradores.triggered.connect(self.cobradores)
        self.obj_form_main.actionREPORTE_DE_CUOTAS.triggered.connect(self.REPORTE_DE_CUOTAS)
        self.obj_form_main.actionCOBRAR_CUOTAS.triggered.connect(self.Cuotas)
        self.obj_form_main.actionEgresos.triggered.connect(self.egresos)
        self.obj_form_main.actionIngresos.triggered.connect(self.ingresos_diarios)
        self.obj_form_main.actionCALCULADOR.triggered.connect(self.CALCULADOR)
        self.obj_form_main.actionHISTORIAL_GARANTE.triggered.connect(self.garante_historial12)
        self.obj_form_main.actionUsu.triggered.connect(self.usuario)
        self.obj_form_main.actionUsu_Act.triggered.connect(self.usuario_actualizar)
        self.obj_form_main.actionGenerador_punitorios.triggered.connect(self.Punitorios)
        #self.obj_form_main.actionGenerador_punitorios.triggered.connect(self.Buscar_apellido)

        self.obj_form_main.actionBuscar_apellido.triggered.connect(self.Buscar_apellido)
        self.obj_form_main.actionReparar_Cuotas.triggered.connect(self.reparar_cta)
        self.obj_form_main.actionHist_cred_y_ctas.triggered.connect(self.credito_buscar_estado)
        self.obj_form_main.actionRefinanciar.triggered.connect(self.refinanciar)
        self.obj_form_main.actionCalcular_Creditos.triggered.connect(self.CALCULADOR)
        self.obj_form_main.actionReporte_deuda_cliente.triggered.connect(self.Reporte_deuda_cliente)


        self.singleton =singleton
        self.singleton_idusu =singleton_idusu
开发者ID:lriccombene,项目名称:Slam_Sistema_creditos,代码行数:33,代码来源:w_mainwindow.py

示例12: __init__

 def __init__(self, parent=None):
     QtGui.QMainWindow.__init__(self, parent)
     self.ui = Ui_MainWindow()
     self.ui.setupUi(self)
     QtCore.QObject.connect(self.ui.StartButton, QtCore.SIGNAL('clicked()'), self.doFitting_stream)
     QtCore.QObject.connect(self.ui.fitFromFile, QtCore.SIGNAL('clicked()'), self.doFitting_file)
     QtCore.QObject.connect(self.ui.fileDialog, QtCore.SIGNAL('clicked()'), self.showFileInput)
     QtCore.QObject.connect(self.ui.PauseButton, QtCore.SIGNAL('clicked()'), self.close)
开发者ID:Oleksiy1990,项目名称:beamFitter,代码行数:8,代码来源:GUItryout.py

示例13: __init__

    def __init__(self):
        super().__init__()
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)

        self.ui.pushButton_led.clicked.connect(self.run_led_demo)
        self.ui.pushButton_buzzer.clicked.connect(self.run_buzzer_demo)
        self.ui.pushButton_move.clicked.connect(self.run_move_demo)
开发者ID:davidko,项目名称:LinkbotPythonDemo,代码行数:8,代码来源:main.py

示例14: webwindow

class webwindow(QtWidgets.QMainWindow):
    """
        Class that is derived from the mainWindow.ui file
        which defines the browser window.
    """
    def __init__(self, parent=None):
        """
            Web browser constructor.
            Sets the event handlers, as well as loading the UI
            from the mainWindow.ui file.
        """
        super(webwindow, self).__init__(parent)
        self.ui = Ui_MainWindow()  # define the UI
        self.ui.setupUi(self)

        homeurl = "http://www.google.com"
        self.ui.lineEdit.setText(homeurl)  # set the homepage

        #load the home page after
        self.ui.webView.setUrl(QtCore.QUrl(homeurl))

        # tell the browser we want to handle the link clicking ourselves
        self.ui.webView.page().setLinkDelegationPolicy(QtWebKitWidgets.QWebPage.DelegateAllLinks)

        # hook up the url bar to RETURN KEYPRESS and GO button
        self.ui.pushButton.clicked.connect(self.change_page)
        self.ui.lineEdit.returnPressed.connect(self.change_page)
        self.ui.webView.linkClicked.connect(self.clicked_link)

    def change_page(self):
        """
            Change page event handler (what happens when the html page changes)
        """
        url = self.ui.lineEdit.text()
        print(url)
        self.ui.webView.setUrl(QtCore.QUrl(url))

    def clicked_link(self, url):
        """
            Overrides the original clickedlink handler
        """
        self.ui.webView.setUrl(QtCore.QUrl(url))
        self.ui.lineEdit.clear()
        self.ui.lineEdit.insert(url.toString())
        self.ui.lineEdit.home(False)
开发者ID:achengscode,项目名称:pyqt_browser,代码行数:45,代码来源:client_qt.py

示例15: __init__

 def __init__(self, parent=None):
     super(MainWindow, self).__init__(parent)
     self.ui = Ui_MainWindow()
     self.ui.setupUi(self)
     self.ui.actionQuit.triggered.connect(QtCore.QCoreApplication.instance().quit)
     self.ui.pkgList.itemClicked.connect(self._showPackageDetail)
     self.ui.installedBtn.clicked.connect(self._showInstalled)
     self.ui.availableBtn.clicked.connect(self._showAvailable)
     self.ui.karmaWidget.hide()
开发者ID:mkrizek,项目名称:fedora-gooey-karma,代码行数:9,代码来源:main.py


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