Pregunta: | 67267 - PROBLEMA LÓGICO CON PYTHON |
Autor: | Alan Nungaray |
hola a todos, tengo un problema y me parece es lógico puesto que no tienen errores de sintaxis. El programa simula un procesador el cual puede ejecutar tanto por lotes como multiprogramación. esto lo hace por medios de hilos. todo este programa yo mismo lo diseñé y por esta razón se me es difícil encontrar el problema ya que responde a mi lógica este es el codigo de mi "kernel" el cual realiza todos los procesos ''' Created on 19/02/2013 @author: Alan Nungaray ''' import time import sys from Ventana import Ui_MainWindow from PyQt4 import QtGui, QtCore import threading class Prinsipal(QtGui.QMainWindow): def __init__(self): QtGui.QApplication.__init__(self) self.Ventana= Ui_MainWindow() self.Ventana.setupUi(self) self.estado=0 self.Lotes=True self.connect(self.Ventana.BanadirProceso,QtCore.SIGNAL("clicked()"), self.AgregarProceso) self.connect(self.Ventana.BLotes,QtCore.SIGNAL("clicked()"),self.IniciarLotes) self.connect(self.Ventana.BMultiprogramacion,QtCore.SIGNAL("clicked()"),self.IniciarMulti) self.connect(self.Ventana.actionMultiprogramacion,QtCore.SIGNAL("triggered()"),self.MostrarInfoMulti) self.connect(self.Ventana.actionPor_Lotes,QtCore.SIGNAL("triggered()"),self.MostrarInfoLotes) self.connect(self.Ventana.actionDatos_Personales,QtCore.SIGNAL("triggered()"),self.MostrarDatosPersonales) self.connect(self.Ventana.actionSalir,QtCore.SIGNAL("triggered()"),QtGui.qApp,QtCore.SLOT("quit()")) self.connect(self.Ventana.actionComo_Funciona,QtCore.SIGNAL("triggered()"),self.MostrarComoFunciona) def MostrarComoFunciona(self): self.MostrarVentana("Como funciona?", "1.-Escribe un nombre en la region de proceso a agregar y asigna un numero que será el tiempo que tardará en realizarce 2.-Pulsa el botón Agregar 3. Elige un tipo de procesamiento ya sea con el boton Lotes o Multiprogramación 4.-Puedes esperar o agregar mas procesos mientras se termina") def MostrarInfoMulti(self): self.MostrarVentana("Informacion Procesos Por Multiprogramacion", " En la funcion multiprogramacion todo el tiempo se analizara si hay algun proceso con un tiempo menor para darle mayor prioridad") def MostrarDatosPersonales(self): self.MostrarVentana("Datos personales", " Nombre: Alan David Nungaray Becerra Grado: 6 Semestre Carrera: Ingenieria en computación") def MostrarInfoLotes(self): self.MostrarVentana("Informacion Procesos Por lotes", " En el procesamiento por lotes siempre el primer proceso que llegue al procesador sera el primero en realizare y no compenzará otro procedimiento hasta haber terminado el actual") def IniciarMulti(self): self.ProcesarPorMultiprogramacion() def IniciarLotes(self): self.ProcesarPorLotes() def ProcesarPorMultiprogramacion (self): if self.Ventana.ProcesoA.text()!="" or self.Ventana.ProcesoB.text()!="" or self.Ventana.ProcesoC.text()!="" or self.Ventana.ProcesoD.text()!="" or self.Ventana.ProcesoE.text()!="" or self.Ventana.ProcesoF.text()!="" or self.Ventana.ProcesoG.text()!="" or self.Ventana.ProcesoH.text()!="" or self.Ventana.ProcesoI.text()!="" or self.Ventana.ProcesoJ.text()!="": self.Ventana.BLotes.disconnect(self.Ventana.BLotes,QtCore.SIGNAL("clicked()"),self.IniciarLotes) self.Ventana.BLotes.disconnect(self.Ventana.BMultiprogramacion,QtCore.SIGNAL("clicked()"),self.IniciarMulti) self.CompararElementos() self.Asignar() if self.Ventana.TiempoProcesoEjecucion!="": self.recorrer() t = threading.Thread(target=self.ImprimeMultiprogramacion, args=(int(self.Ventana.TiempoProcesoEjecucion.text()), )) t.start() else: self.connect(self.Ventana.BLotes,QtCore.SIGNAL("clicked()"),self.IniciarLotes) self.connect(self.Ventana.BMultiprogramacion,QtCore.SIGNAL("clicked()"),self.IniciarMulti) def CompararElementos(self): if self.Ventana.ProcesoA.text()!="": self.TiempoMenor=self.Ventana.TiempoA self.ProcesMenor=self.Ventana.ProcesoA if self.Ventana.ProcesoB.text()!="" and int(self.Ventana.TiempoB.text()) <int(self.TiempoMenor.text()) : self.TiempoMenor=self.Ventana.TiempoB self.ProcesMenor=self.Ventana.ProcesoB if self.Ventana.ProcesoC.text()!="" and int(self.Ventana.TiempoC.text()) <int(self.TiempoMenor.text()) : self.TiempoMenor=self.Ventana.TiempoC self.ProcesMenor=self.Ventana.ProcesoC if self.Ventana.ProcesoD.text()!="" and int(self.Ventana.TiempoD.text()) <int(self.TiempoMenor.text()) : self.TiempoMenor=self.Ventana.TiempoD self.ProcesMenor=self.Ventana.ProcesoD if self.Ventana.ProcesoE.text()!="" and int(self.Ventana.TiempoE.text()) <int(self.TiempoMenor.text()) : self.TiempoMenor=self.Ventana.TiempoE self.ProcesMenor=self.Ventana.ProcesoE if self.Ventana.ProcesoF.text()!="" and int(self.Ventana.TiempoF.text()) <int(self.TiempoMenor.text()) : self.TiempoMenor=self.Ventana.TiempoF self.ProcesMenor=self.Ventana.ProcesoF if self.Ventana.ProcesoG.text()!="" and int(self.Ventana.TiempoG.text()) <int(self.TiempoMenor.text()) : self.TiempoMenor=self.Ventana.TiempoG self.ProcesMenor=self.Ventana.ProcesoG if self.Ventana.ProcesoH.text()!="" and int(self.Ventana.TiempoH.text()) <int(self.TiempoMenor.text()) : self.TiempoMenor=self.Ventana.TiempoH self.ProcesMenor=self.Ventana.ProcesoH if self.Ventana.ProcesoI.text()!="" and int(self.Ventana.TiempoI.text()) <int(self.TiempoMenor.text()) : self.TiempoMenor=self.Ventana.TiempoI self.ProcesMenor=self.Ventana.ProcesoI if self.Ventana.ProcesoJ.text()!="" and int(self.Ventana.TiempoJ.text()) <int(self.TiempoMenor.text()) : self.TiempoMenor=self.Ventana.TiempoJ self.ProcesMenor=self.Ventana.ProcesoJ def Asignar(self): self.Ventana.TiempoProcesoEjecucion.setText(self.TiempoMenor.text()) self.Ventana.ProcesoEjecucion.setText(self.ProcesMenor.text()) self.ProcesMenor.setText("") self.TiempoMenor.setText("") def ImprimeMultiprogramacion(self,num): for i in range(0,num+1): self.Ventana.TiempoProcesoEjecucion.setText(str(num-i)) time.sleep(1) if(self.Ventana.TiempoProcesoEjecucion.text()=="0"): self.Ventana.ProcesoTerminado.setText(self.Ventana.ProcesoEjecucion.text()) self.Ventana.ProcesoEjecucion.setText("") self.Ventana.TiempoProcesoEjecucion.setText("") self.ProcesarPorMultiprogramacion() def ProcesarPorLotes (self): if(self.Ventana.ProcesoA.text()!=""): self.Ventana.BLotes.disconnect(self.Ventana.BLotes,QtCore.SIGNAL("clicked()"),self.IniciarLotes) self.Ventana.BLotes.disconnect(self.Ventana.BMultiprogramacion,QtCore.SIGNAL("clicked()"),self.IniciarMulti) self.Ventana.ProcesoEjecucion.setText(str(self.Ventana.ProcesoA.text())) self.Ventana.TiempoProcesoEjecucion.setText(str(self.Ventana.TiempoA.text())) self.Ventana.ProcesoA.setText(str(self.Ventana.ProcesoB.text())) self.Ventana.TiempoA.setText(str(self.Ventana.TiempoB.text())) self.Ventana.ProcesoB.setText(str(self.Ventana.ProcesoC.text())) self.Ventana.TiempoB.setText(str(self.Ventana.TiempoC.text())) self.Ventana.ProcesoC.setText(str(self.Ventana.ProcesoD.text())) self.Ventana.TiempoC.setText(str(self.Ventana.TiempoD.text())) self.Ventana.ProcesoD.setText(str(self.Ventana.ProcesoE.text())) self.Ventana.TiempoD.setText(str(self.Ventana.TiempoE.text())) self.Ventana.ProcesoE.setText(str(self.Ventana.ProcesoF.text())) self.Ventana.TiempoE.setText(str(self.Ventana.TiempoF.text())) self.Ventana.ProcesoF.setText(str(self.Ventana.ProcesoG.text())) self.Ventana.TiempoF.setText(str(self.Ventana.TiempoG.text())) self.Ventana.ProcesoG.setText(str(self.Ventana.ProcesoH.text())) self.Ventana.TiempoG.setText(str(self.Ventana.TiempoH.text())) self.Ventana.ProcesoH.setText(str(self.Ventana.ProcesoI.text())) self.Ventana.TiempoH.setText(str(self.Ventana.TiempoI.text())) self.Ventana.ProcesoI.setText(str(self.Ventana.ProcesoJ.text())) self.Ventana.TiempoI.setText(str(self.Ventana.TiempoJ.text())) self.Ventana.ProcesoJ.setText("") self.Ventana.TiempoJ.setText("") t = threading.Thread(target=self.imprimeLotes, args=(int(self.Ventana.TiempoProcesoEjecucion.text()), )) t.start() else: self.connect(self.Ventana.BLotes,QtCore.SIGNAL("clicked()"),self.IniciarLotes) self.connect(self.Ventana.BMultiprogramacion,QtCore.SIGNAL("clicked()"),self.IniciarMulti) def imprimeLotes(self,num): for i in range(0,num+1): self.Ventana.TiempoProcesoEjecucion.setText(str(num-i)) time.sleep(1) if(self.Ventana.TiempoProcesoEjecucion.text()=="0"): self.Ventana.ProcesoTerminado.setText(self.Ventana.ProcesoEjecucion.text()) self.Ventana.ProcesoEjecucion.setText("") self.Ventana.TiempoProcesoEjecucion.setText("") self.ProcesarPorLotes() def AgregarProceso (self): if self.Ventana.ProcesoA.text()!=self.Ventana.ProcesoAAgregar.text() and self.Ventana.ProcesoB.text()!=self.Ventana.ProcesoAAgregar.text() and self.Ventana.ProcesoC.text()!=self.Ventana.ProcesoAAgregar.text() and self.Ventana.ProcesoD.text()!=self.Ventana.ProcesoAAgregar.text() and self.Ventana.ProcesoE.text()!=self.Ventana.ProcesoAAgregar.text() and self.Ventana.ProcesoF.text()!=self.Ventana.ProcesoAAgregar.text() and self.Ventana.ProcesoG.text()!=self.Ventana.ProcesoAAgregar.text() and self.Ventana.ProcesoH.text()!=self.Ventana.ProcesoAAgregar.text() and self.Ventana.ProcesoI.text()!=self.Ventana.ProcesoAAgregar.text() and self.Ventana.ProcesoJ.text()!=self.Ventana.ProcesoAAgregar.text() and self.Ventana.ProcesoAAgregar.text()!="": if(self.Ventana.ProcesoA.text()==""): self.Ventana.ProcesoA.setText(str(self.Ventana.ProcesoAAgregar.text())) self.Ventana.TiempoA.setText(str(self.Ventana.TiempodelProcesoAAgregar.text())) elif(self.Ventana.ProcesoB.text()==""): self.Ventana.ProcesoB.setText(str(self.Ventana.ProcesoAAgregar.text())) self.Ventana.TiempoB.setText(str(self.Ventana.TiempodelProcesoAAgregar.text())) elif(self.Ventana.ProcesoC.text()==""): self.Ventana.ProcesoC.setText(str(self.Ventana.ProcesoAAgregar.text())) self.Ventana.TiempoC.setText(str(self.Ventana.TiempodelProcesoAAgregar.text())) elif(self.Ventana.ProcesoD.text()==""): self.Ventana.ProcesoD.setText(str(self.Ventana.ProcesoAAgregar.text())) self.Ventana.TiempoD.setText(str(self.Ventana.TiempodelProcesoAAgregar.text())) elif(self.Ventana.ProcesoE.text()==""): self.Ventana.ProcesoE.setText(str(self.Ventana.ProcesoAAgregar.text())) self.Ventana.TiempoE.setText(str(self.Ventana.TiempodelProcesoAAgregar.text())) elif(self.Ventana.ProcesoF.text()==""): self.Ventana.ProcesoF.setText(str(self.Ventana.ProcesoAAgregar.text())) self.Ventana.TiempoF.setText(str(self.Ventana.TiempodelProcesoAAgregar.text())) elif(self.Ventana.ProcesoG.text()==""): self.Ventana.ProcesoG.setText(str(self.Ventana.ProcesoAAgregar.text())) self.Ventana.TiempoG.setText(str(self.Ventana.TiempodelProcesoAAgregar.text())) elif(self.Ventana.ProcesoH.text()==""): self.Ventana.ProcesoH.setText(str(self.Ventana.ProcesoAAgregar.text())) self.Ventana.TiempoH.setText(str(self.Ventana.TiempodelProcesoAAgregar.text())) elif(self.Ventana.ProcesoI.text()==""): self.Ventana.ProcesoI.setText(str(self.Ventana.ProcesoAAgregar.text())) self.Ventana.TiempoI.setText(str(self.Ventana.TiempodelProcesoAAgregar.text())) elif(self.Ventana.ProcesoJ.text()==""): self.Ventana.ProcesoJ.setText(str(self.Ventana.ProcesoAAgregar.text())) self.Ventana.TiempoJ.setText(str(self.Ventana.TiempodelProcesoAAgregar.text())) else: print("Cola LLena") def recorrer(self): if(self.Ventana.ProcesoA.text()==""): self.Ventana.ProcesoA.setText(self.Ventana.ProcesoB.text()) self.Ventana.TiempoA.setText(self.Ventana.TiempoB.text()) self.Ventana.ProcesoB.setText("") self.Ventana.TiempoB.setText("") if(self.Ventana.ProcesoB.text()==""): self.Ventana.ProcesoB.setText(self.Ventana.ProcesoC.text()) self.Ventana.TiempoB.setText(self.Ventana.TiempoC.text()) self.Ventana.ProcesoC.setText("") self.Ventana.TiempoC.setText("") if(self.Ventana.ProcesoC.text()==""): self.Ventana.ProcesoC.setText(self.Ventana.ProcesoD.text()) self.Ventana.TiempoC.setText(self.Ventana.TiempoD.text()) self.Ventana.ProcesoD.setText("") self.Ventana.TiempoD.setText("") if(self.Ventana.ProcesoD.text()==""): self.Ventana.ProcesoD.setText(self.Ventana.ProcesoE.text()) self.Ventana.TiempoD.setText(self.Ventana.TiempoE.text()) self.Ventana.ProcesoE.setText("") self.Ventana.TiempoE.setText("") if(self.Ventana.ProcesoE.text()==""): self.Ventana.ProcesoE.setText(self.Ventana.ProcesoF.text()) self.Ventana.TiempoE.setText(self.Ventana.TiempoF.text()) self.Ventana.ProcesoF.setText("") self.Ventana.TiempoF.setText("") if(self.Ventana.ProcesoF.text()==""): self.Ventana.ProcesoF.setText(self.Ventana.ProcesoG.text()) self.Ventana.TiempoF.setText(self.Ventana.TiempoG.text()) self.Ventana.ProcesoG.setText("") self.Ventana.TiempoG.setText("") if(self.Ventana.ProcesoG.text()==""): self.Ventana.ProcesoG.setText(self.Ventana.ProcesoH.text()) self.Ventana.TiempoG.setText(self.Ventana.TiempoH.text()) self.Ventana.ProcesoH.setText("") self.Ventana.TiempoH.setText("") if(self.Ventana.ProcesoH.text()==""): self.Ventana.ProcesoH.setText(self.Ventana.ProcesoI.text()) self.Ventana.TiempoH.setText(self.Ventana.TiempoI.text()) self.Ventana.ProcesoI.setText("") self.Ventana.TiempoI.setText("") if(self.Ventana.ProcesoI.text()==""): self.Ventana.ProcesoI.setText(self.Ventana.ProcesoJ.text()) self.Ventana.TiempoI.setText(self.Ventana.TiempoJ.text()) self.Ventana.ProcesoJ.setText("") self.Ventana.TiempoJ.setText("") def MostrarVentana(self,Titulo,Texto): QtGui.QMessageBox.about(self,Titulo,Texto) def main(): app=QtGui.QApplication(sys.argv) Calculadora= Prinsipal() Calculadora.show() app.exec_() if __name__=="__main__": main() Y este es el código de mi interfaz # -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'Ventana.ui' # # Created: Thu Feb 21 17:17:41 2013 # by: PyQt4 UI code generator 4.9.6 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui from pickle import FALSE try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: def _fromUtf8(s): return s try: _encoding = QtGui.QApplication.UnicodeUTF8 def _translate(context, text, disambig): return QtGui.QApplication.translate(context, text, disambig, _encoding) except AttributeError: def _translate(context, text, disambig): return QtGui.QApplication.translate(context, text, disambig) class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName(_fromUtf8("MainWindow")) MainWindow.resize(420, 370) MainWindow.setMinimumSize(QtCore.QSize(420, 370)) MainWindow.setMaximumSize(QtCore.QSize(420, 370)) self.centralwidget = QtGui.QWidget(MainWindow) self.centralwidget.setObjectName(_fromUtf8("centralwidget")) self.BLotes = QtGui.QPushButton(self.centralwidget) self.BLotes.setGeometry(QtCore.QRect(180, 30, 221, 41)) self.BLotes.setStyleSheet(_fromUtf8("")) self.BLotes.setObjectName(_fromUtf8("BLotes")) self.BMultiprogramacion = QtGui.QPushButton(self.centralwidget) self.BMultiprogramacion.setGeometry(QtCore.QRect(180, 80, 221, 41)) self.BMultiprogramacion.setObjectName(_fromUtf8("BMultiprogramacion")) self.BanadirProceso = QtGui.QPushButton(self.centralwidget) self.BanadirProceso.setGeometry(QtCore.QRect(20, 90, 101, 23)) self.BanadirProceso.setObjectName(_fromUtf8("BanadirProceso")) self.LbModoEjecucion = QtGui.QLabel(self.centralwidget) self.LbModoEjecucion.setGeometry(QtCore.QRect(190, 0, 121, 31)) self.LbModoEjecucion.setObjectName(_fromUtf8("LbModoEjecucion")) self.LbAgregar = QtGui.QLabel(self.centralwidget) self.LbAgregar.setGeometry(QtCore.QRect(20, 10, 211, 16)) self.LbAgregar.setObjectName(_fromUtf8("LbAgregar")) self.ProcesoAAgregar = QtGui.QLineEdit(self.centralwidget) self.ProcesoAAgregar.setGeometry(QtCore.QRect(60, 30, 51, 20)) self.ProcesoAAgregar.setMaxLength(3) self.ProcesoAAgregar.setObjectName(_fromUtf8("ProcesoAAgregar")) self.LbNombreAgregar = QtGui.QLabel(self.centralwidget) self.LbNombreAgregar.setGeometry(QtCore.QRect(20, 30, 46, 13)) self.LbNombreAgregar.setObjectName(_fromUtf8("LbNombreAgregar")) self.TiempodelProcesoAAgregar = QtGui.QSpinBox(self.centralwidget) self.TiempodelProcesoAAgregar.setGeometry(QtCore.QRect(60, 50, 51, 22)) self.TiempodelProcesoAAgregar.setMinimum(1) self.TiempodelProcesoAAgregar.setMaximum(10) self.TiempodelProcesoAAgregar.setObjectName(_fromUtf8("TiempodelProcesoAAgregar")) self.LbTiempoAgregar = QtGui.QLabel(self.centralwidget) self.LbTiempoAgregar.setGeometry(QtCore.QRect(20, 50, 46, 13)) self.LbTiempoAgregar.setObjectName(_fromUtf8("LbTiempoAgregar")) self.LbCola = QtGui.QLabel(self.centralwidget) self.LbCola.setGeometry(QtCore.QRect(20, 120, 101, 41)) self.LbCola.setObjectName(_fromUtf8("LbCola")) self.ProcesoA = QtGui.QLineEdit(self.centralwidget) self.ProcesoA.setGeometry(QtCore.QRect(380, 160, 31, 21)) self.ProcesoA.setReadOnly(True) self.ProcesoA.setObjectName(_fromUtf8("ProcesoA")) self.TiempoA = QtGui.QLineEdit(self.centralwidget) self.TiempoA.setGeometry(QtCore.QRect(380, 190, 31, 21)) self.TiempoA.setReadOnly(True) self.TiempoA.setObjectName(_fromUtf8("TiempoA")) self.ProcesoB = QtGui.QLineEdit(self.centralwidget) self.ProcesoB.setGeometry(QtCore.QRect(340, 160, 31, 21)) self.ProcesoB.setReadOnly(True) self.ProcesoB.setObjectName(_fromUtf8("ProcesoB")) self.TiempoB = QtGui.QLineEdit(self.centralwidget) self.TiempoB.setGeometry(QtCore.QRect(340, 190, 31, 21)) self.TiempoB.setReadOnly(True) self.TiempoB.setObjectName(_fromUtf8("TiempoB")) self.ProcesoD = QtGui.QLineEdit(self.centralwidget) self.ProcesoD.setGeometry(QtCore.QRect(260, 160, 31, 21)) self.ProcesoD.setReadOnly(True) self.ProcesoD.setObjectName(_fromUtf8("ProcesoD")) self.ProcesoC = QtGui.QLineEdit(self.centralwidget) self.ProcesoC.setGeometry(QtCore.QRect(300, 160, 31, 21)) self.ProcesoC.setReadOnly(True) self.ProcesoC.setObjectName(_fromUtf8("ProcesoC")) self.TiempoC = QtGui.QLineEdit(self.centralwidget) self.TiempoC.setGeometry(QtCore.QRect(300, 190, 31, 21)) self.TiempoC.setReadOnly(True) self.TiempoC.setObjectName(_fromUtf8("TiempoC")) self.TiempoD = QtGui.QLineEdit(self.centralwidget) self.TiempoD.setGeometry(QtCore.QRect(260, 190, 31, 21)) self.TiempoD.setReadOnly(True) self.TiempoD.setObjectName(_fromUtf8("TiempoD")) self.ProcesoF = QtGui.QLineEdit(self.centralwidget) self.ProcesoF.setGeometry(QtCore.QRect(180, 160, 31, 21)) self.ProcesoF.setReadOnly(True) self.ProcesoF.setObjectName(_fromUtf8("ProcesoF")) self.ProcesoE = QtGui.QLineEdit(self.centralwidget) self.ProcesoE.setGeometry(QtCore.QRect(220, 160, 31, 21)) self.ProcesoE.setReadOnly(True) self.ProcesoE.setObjectName(_fromUtf8("ProcesoE")) self.TiempoF = QtGui.QLineEdit(self.centralwidget) self.TiempoF.setGeometry(QtCore.QRect(180, 190, 31, 21)) self.TiempoF.setReadOnly(True) self.TiempoF.setObjectName(_fromUtf8("TiempoF")) self.TiempoE = QtGui.QLineEdit(self.centralwidget) self.TiempoE.setGeometry(QtCore.QRect(220, 190, 31, 21)) self.TiempoE.setReadOnly(True) self.TiempoE.setObjectName(_fromUtf8("TiempoE")) self.ProcesoH = QtGui.QLineEdit(self.centralwidget) self.ProcesoH.setGeometry(QtCore.QRect(100, 160, 31, 21)) self.ProcesoH.setReadOnly(True) self.ProcesoH.setObjectName(_fromUtf8("ProcesoH")) self.ProcesoG = QtGui.QLineEdit(self.centralwidget) self.ProcesoG.setGeometry(QtCore.QRect(140, 160, 31, 21)) self.ProcesoG.setReadOnly(True) self.ProcesoG.setObjectName(_fromUtf8("ProcesoG")) self.TiempoG = QtGui.QLineEdit(self.centralwidget) self.TiempoG.setGeometry(QtCore.QRect(140, 190, 31, 21)) self.TiempoG.setReadOnly(True) self.TiempoG.setObjectName(_fromUtf8("TiempoG")) self.TiempoH = QtGui.QLineEdit(self.centralwidget) self.TiempoH.setGeometry(QtCore.QRect(100, 190, 31, 21)) self.TiempoH.setReadOnly(True) self.TiempoH.setObjectName(_fromUtf8("TiempoH")) self.ProcesoJ = QtGui.QLineEdit(self.centralwidget) self.ProcesoJ.setGeometry(QtCore.QRect(20, 160, 31, 21)) self.ProcesoJ.setReadOnly(True) self.ProcesoJ.setObjectName(_fromUtf8("ProcesoJ")) self.ProcesoI = QtGui.QLineEdit(self.centralwidget) self.ProcesoI.setGeometry(QtCore.QRect(60, 160, 31, 21)) self.ProcesoI.setReadOnly(True) self.ProcesoI.setObjectName(_fromUtf8("ProcesoI")) self.TiempoI = QtGui.QLineEdit(self.centralwidget) self.TiempoI.setGeometry(QtCore.QRect(60, 190, 31, 21)) self.TiempoI.setReadOnly(True) self.TiempoI.setObjectName(_fromUtf8("TiempoI")) self.TiempoJ = QtGui.QLineEdit(self.centralwidget) self.TiempoJ.setGeometry(QtCore.QRect(20, 190, 31, 21)) self.TiempoJ.setReadOnly(True) self.TiempoJ.setObjectName(_fromUtf8("TiempoJ")) self.LbTEjecucion = QtGui.QLabel(self.centralwidget) self.LbTEjecucion.setGeometry(QtCore.QRect(180, 260, 46, 13)) self.LbTEjecucion.setObjectName(_fromUtf8("LbTEjecucion")) self.LbPEjecucion = QtGui.QLabel(self.centralwidget) self.LbPEjecucion.setGeometry(QtCore.QRect(30, 250, 46, 13)) self.LbPEjecucion.setObjectName(_fromUtf8("LbPEjecucion")) self.ProcesoEjecucion = QtGui.QLineEdit(self.centralwidget) self.ProcesoEjecucion.setGeometry(QtCore.QRect(80, 240, 61, 41)) self.ProcesoEjecucion.setMinimumSize(QtCore.QSize(61, 41)) self.ProcesoEjecucion.setMaximumSize(QtCore.QSize(61, 41)) font = QtGui.QFont() font.setFamily(_fromUtf8("Monotype Corsiva")) font.setPointSize(30) font.setBold(True) font.setItalic(True) font.setUnderline(True) font.setWeight(75) font.setStrikeOut(False) self.ProcesoEjecucion.setFont(font) self.ProcesoEjecucion.setText(_fromUtf8("")) self.ProcesoEjecucion.setMaxLength(3) self.ProcesoEjecucion.setReadOnly(True) self.ProcesoEjecucion.setObjectName(_fromUtf8("ProcesoEjecucion")) self.LbEjecucion = QtGui.QLabel(self.centralwidget) self.LbEjecucion.setGeometry(QtCore.QRect(10, 210, 101, 41)) self.LbEjecucion.setObjectName(_fromUtf8("LbEjecucion")) self.LbTTerminado = QtGui.QLabel(self.centralwidget) self.LbTTerminado.setGeometry(QtCore.QRect(20, 300, 46, 13)) self.LbTTerminado.setObjectName(_fromUtf8("LbTTerminado")) self.ProcesoTerminado = QtGui.QLineEdit(self.centralwidget) self.ProcesoTerminado.setGeometry(QtCore.QRect(230, 240, 61, 41)) font = QtGui.QFont() font.setFamily(_fromUtf8("Monotype Corsiva")) font.setPointSize(30) font.setBold(True) font.setItalic(True) font.setUnderline(False) font.setWeight(75) font.setStrikeOut(True) self.ProcesoTerminado.setFont(font) self.ProcesoTerminado.setText(_fromUtf8("")) self.ProcesoTerminado.setReadOnly(True) self.ProcesoTerminado.setObjectName(_fromUtf8("ProcesoTerminado")) self.LblTerminado = QtGui.QLabel(self.centralwidget) self.LblTerminado.setGeometry(QtCore.QRect(170, 210, 101, 41)) self.LblTerminado.setObjectName(_fromUtf8("LblTerminado")) self.TiempoProcesoEjecucion = QtGui.QLabel(self.centralwidget) self.TiempoProcesoEjecucion.setGeometry(QtCore.QRect(80, 290, 61, 31)) font = QtGui.QFont() font.setFamily(_fromUtf8("Monotype Corsiva")) font.setPointSize(30) font.setItalic(True) self.TiempoProcesoEjecucion.setFont(font) self.TiempoProcesoEjecucion.setStyleSheet(_fromUtf8("background-color: rgb(255, 255, 255);")) self.TiempoProcesoEjecucion.setText(_fromUtf8("")) self.TiempoProcesoEjecucion.setOpenExternalLinks(False) self.TiempoProcesoEjecucion.setObjectName(_fromUtf8("TiempoProcesoEjecucion")) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtGui.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 420, 21)) self.menubar.setObjectName(_fromUtf8("menubar")) self.menuMenu = QtGui.QMenu(self.menubar) self.menuMenu.setObjectName(_fromUtf8("menuMenu")) self.menuAyuda = QtGui.QMenu(self.menubar) self.menuAyuda.setObjectName(_fromUtf8("menuAyuda")) self.menuInformacion = QtGui.QMenu(self.menubar) self.menuInformacion.setObjectName(_fromUtf8("menuInformacion")) MainWindow.setMenuBar(self.menubar) self.statusbar = QtGui.QStatusBar(MainWindow) self.statusbar.setObjectName(_fromUtf8("statusbar")) MainWindow.setStatusBar(self.statusbar) self.actionSalir = QtGui.QAction(MainWindow) self.actionSalir.setObjectName(_fromUtf8("actionSalir")) self.actionPor_Lotes = QtGui.QAction(MainWindow) self.actionPor_Lotes.setObjectName(_fromUtf8("actionPor_Lotes")) self.actionMultiprogramacion = QtGui.QAction(MainWindow) self.actionMultiprogramacion.setObjectName(_fromUtf8("actionMultiprogramacion")) self.actionComo_Funciona = QtGui.QAction(MainWindow) self.actionComo_Funciona.setObjectName(_fromUtf8("actionComo_Funciona")) self.actionDatos_Personales = QtGui.QAction(MainWindow) self.actionDatos_Personales.setObjectName(_fromUtf8("actionDatos_Personales")) self.menuAyuda.addAction(self.actionComo_Funciona) self.menuInformacion.addAction(self.actionPor_Lotes) self.menuInformacion.addAction(self.actionMultiprogramacion) self.menuInformacion.addAction(self.actionDatos_Personales) self.menubar.addAction(self.menuAyuda.menuAction()) self.menubar.addAction(self.menuInformacion.menuAction()) self.menubar.addAction(self.menuMenu.menuAction()) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow) def retranslateUi(self, MainWindow): MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow", None)) self.BLotes.setText(_translate("MainWindow", "Lotes", None)) self.BMultiprogramacion.setText(_translate("MainWindow", "Multiprogramacion.", None)) self.BanadirProceso.setText(_translate("MainWindow", "Añadir proceso", None)) self.LbModoEjecucion.setText(_translate("MainWindow", "Modo De ejecución", None)) self.LbAgregar.setText(_translate("MainWindow", "Agregar proceso al sistema", None)) self.LbNombreAgregar.setText(_translate("MainWindow", "Nombre", None)) self.LbTiempoAgregar.setText(_translate("MainWindow", "Tiempo", None)) self.LbCola.setText(_translate("MainWindow", "Cola de procesos", None)) self.LbTEjecucion.setText(_translate("MainWindow", "Nombre", None)) self.LbPEjecucion.setText(_translate("MainWindow", "Nombre", None)) self.LbEjecucion.setText(_translate("MainWindow", "Proceso en ejecucion", None)) self.LbTTerminado.setText(_translate("MainWindow", "Tiempo", None)) self.LblTerminado.setText(_translate("MainWindow", "Proceso Terminado", None)) self.menuMenu.setTitle(_translate("MainWindow", "Salir", None)) self.menuAyuda.setTitle(_translate("MainWindow", "Ayuda", None)) self.menuInformacion.setTitle(_translate("MainWindow", "Informacion", None)) self.actionSalir.setText(_translate("MainWindow", "Salir", None)) self.actionSalir.setShortcut(_translate("MainWindow", "Ctrl+Q", None)) self.actionPor_Lotes.setText(_translate("MainWindow", "Por Lotes", None)) self.actionPor_Lotes.setShortcut(_translate("MainWindow", "Ctrl+L", None)) self.actionMultiprogramacion.setText(_translate("MainWindow", "Multiprogramacion", None)) self.actionMultiprogramacion.setShortcut(_translate("MainWindow", "Ctrl+M", None)) self.actionComo_Funciona.setText(_translate("MainWindow", "Como Funciona", None)) self.actionComo_Funciona.setShortcut(_translate("MainWindow", "Ctrl+H", None)) self.actionDatos_Personales.setText(_translate("MainWindow", "Datos Personales", None)) if __name__ == "__main__": import sys app = QtGui.QApplication(sys.argv) MainWindow = QtGui.QMainWindow() ui = Ui_MainWindow() ui.setupUi(MainWindow) MainWindow.show() sys.exit(app.exec_()) |