cuciferus avatar cuciferus committed 93e29c7

am incercat sa fac parintele sa sa ascunda cand apare copilu
mai trebe lucrat ca apar toti parinti deodata cand dispare copilu

Comments (0)

Files changed (8)

         self.alte={}
         self.query=query
         self.nume=nume
-        self.setObjectName='Analize'
         QtGui.QDialog.__init__(self,parent)
         self.setWindowTitle('Analize '+self.nume)
         self.cnp=cnp
         #self.mapper.setSubmitPolicy(QtGui.QDataWidgetMapper.ManualSubmit)
         #self.mapper.setModel(self.model)
 
+        self.setObjectName('Analize')
 
 
-        #self.create_gui() INCA NU
-        #def create_gui(self): INCA NU
         self.layout=QtGui.QGridLayout()
         #TODO: sa nu uit sa bag un warning cand da ok cu ce analize nu sunt trecute
         evaluari=QtGui.QLabel('Vezi evaluari anterioare:')
                     "patologi","recomandari"]
 
         while self.query.next():
-            self.acidUric.setText(self.query.value(0).toString())
-            self.albumina.setText(self.query.value(1).toString())
-            self.calciuTotal.setText(self.query.value(2).toString())
-            self.creatinina.setText(self.query.value(3).toString())
-            self.fosfor.setText(self.query.value(4).toString())
-            self.fosfataza.setText(self.query.value(5).toString())
-            self.tgop.setText(self.query.value(6).toString())
-            self.glicata.setText(self.query.value(7).toString())
-            self.uree.setText(self.query.value(8).toString())
-            self.trigliceride.setText(self.query.value(9).toString())
-            self.colesterol.setText(self.query.value(10).toString())
+            self.acidUric.baga(self.query.value(0).toString())
+            self.albumina.baga(self.query.value(1).toString())
+            self.calciuTotal.baga(self.query.value(2).toString())
+            self.creatinina.baga(self.query.value(3).toString())
+            self.fosfor.baga(self.query.value(4).toString())
+            self.fosfataza.baga(self.query.value(5).toString())
+            self.tgop.baga(self.query.value(6).toString())
+            self.glicata.baga(self.query.value(7).toString())
+            self.uree.baga(self.query.value(8).toString())
+            self.trigliceride.baga(self.query.value(9).toString())
+            self.colesterol.baga(self.query.value(10).toString())
             #HLG ramane ca experiment inca si nu va fi evaluat
             #in cadru model/view inca
             self.leucocite.baga(self.query.value(11).toString())
             self.hct.baga(self.query.value(13).toString())
             self.plt.baga(self.query.value(14).toString())
             self.bicarb.baga(self.query.value(15).toString())
-            self.leucocitepipi.setText(self.query.value(16).toString())
-            self.hematii.setText(self.query.value(17).toString())
-            self.micro.setText(self.query.value(18).toString())
-            self.raport.setText(self.query.value(19).toString())
+            self.leucocitepipi.baga(self.query.value(16).toString())
+            self.hematii.baga(self.query.value(17).toString())
+            self.micro.baga(self.query.value(18).toString())
+            self.raport.baga(self.query.value(19).toString())
             self.patologi.setText(self.query.value(20).toString())
             self.recomandari.setText(self.query.value(21).toString())
 

Binary file modified.

         self.alte={}
         self.query=query
         self.nume=nume
-        self.setObjectName='Analize'
         QtGui.QDialog.__init__(self,parent)
         self.setWindowTitle('Analize '+self.nume)
         self.cnp=cnp
         #self.mapper.setSubmitPolicy(QtGui.QDataWidgetMapper.ManualSubmit)
         #self.mapper.setModel(self.model)
 
+        self.setObjectName('Analize')
 
 
         #self.create_gui() INCA NU
                     "patologi","recomandari"]
 
         while self.query.next():
-            self.acidUric.setText(self.query.value(0).toString())
-            self.albumina.setText(self.query.value(1).toString())
-            self.calciuTotal.setText(self.query.value(2).toString())
-            self.creatinina.setText(self.query.value(3).toString())
-            self.fosfor.setText(self.query.value(4).toString())
-            self.fosfataza.setText(self.query.value(5).toString())
-            self.tgop.setText(self.query.value(6).toString())
-            self.glicata.setText(self.query.value(7).toString())
-            self.uree.setText(self.query.value(8).toString())
-            self.trigliceride.setText(self.query.value(9).toString())
-            self.colesterol.setText(self.query.value(10).toString())
+            self.acidUric.baga(self.query.value(0).toString())
+            self.albumina.baga(self.query.value(1).toString())
+            self.calciuTotal.baga(self.query.value(2).toString())
+            self.creatinina.baga(self.query.value(3).toString())
+            self.fosfor.baga(self.query.value(4).toString())
+            self.fosfataza.baga(self.query.value(5).toString())
+            self.tgop.baga(self.query.value(6).toString())
+            self.glicata.baga(self.query.value(7).toString())
+            self.uree.baga(self.query.value(8).toString())
+            self.trigliceride.baga(self.query.value(9).toString())
+            self.colesterol.baga(self.query.value(10).toString())
             #HLG ramane ca experiment inca si nu va fi evaluat
             #in cadru model/view inca
             self.leucocite.baga(self.query.value(11).toString())
             self.hct.baga(self.query.value(13).toString())
             self.plt.baga(self.query.value(14).toString())
             self.bicarb.baga(self.query.value(15).toString())
-            self.leucocitepipi.setText(self.query.value(16).toString())
-            self.hematii.setText(self.query.value(17).toString())
-            self.micro.setText(self.query.value(18).toString())
-            self.raport.setText(self.query.value(19).toString())
+            self.leucocitepipi.baga(self.query.value(16).toString())
+            self.hematii.baga(self.query.value(17).toString())
+            self.micro.baga(self.query.value(18).toString())
+            self.raport.baga(self.query.value(19).toString())
             self.patologi.setText(self.query.value(20).toString())
             self.recomandari.setText(self.query.value(21).toString())
 
     def calculeaza(self):
         sex=(self.cnp)[0]
         varsta=QtCore.QDate.year(QtCore.QDate.currentDate())-int('19'+(self.cnp)[1]+(self.cnp)[2])
-        if not self.albumina.text()=='0':
+        if not self.albumina=='0':
             if sex=='1':
                 sex_coeficient=1
             if sex=='2':
         print str(QtGui.QApplication.focusWidget().objectName())
         print QtGui.QApplication.focusWidget().parentWidget().objectName()
     def evaluare(self):
+        self.hide()
         self.evaluare_d=Evaluare(self.query,self)
+        self.show()
     def pacient(self):
+        self.hide()
         self.pacient_d=Pacient(self.query,self)
+        self.show()
     def closeEvent(self,event):
         try:
             QtSql.QSqlDatabase.close(self.pacientidb) 
         self.query=query
         self.cnp=0
         QtGui.QDialog.__init__(self,parent)
-        self.setObjectName='Evaluare'
+        self.setObjectName('Evaluare')
         self.setWindowTitle('Evaluare')
         cauta=QtGui.QLabel('Cauta pacient')
         self.cautat=QtGui.QLineEdit()
         self.exec_()
 
     def veziEval(self):
+        self.hide()
         eval=Evaluari(self.query,self.cnp,self)
+        self.show()
 
     def cauta_f(self):
         self.rezultat.clear()
             a.exec_()
 
         if tip=="pre":
+            self.hide()
             self.analize=Analize(self.query,nume,cnp,self) 
+            self.show()
         if tip=="sga":
+            self.hide()
             self.sga=SGA(self.query,nume,cnp,self)
+            self.show()
         if tip=="adresa":
+            self.hide()
             self.adresa=Adresa(self.query,cnp,self.rezultat.selectedItems(),self)
+            self.show()
 
 
        
         #QtGui.QApplication.processEvents()
         QtGui.QDialog.__init__(self,parent)
         self.setWindowTitle('Pacient')
-        self.setObjectName='Pacient'
+        self.setObjectName('Pacient')
         nume=QtGui.QLabel('Nume')
         self.nume=QtGui.QLineEdit()
         prenume=QtGui.QLabel('Prenume')
         self.connect(butoane,QtCore.SIGNAL('accepted()'),self.verifica)
         self.connect(self,QtCore.SIGNAL('accepted()'),QtCore.SLOT('accept()'))
         cnpBun=(2,0)
-        self.show()
+        self.exec_()
     def verifica(self):
         #if self.exec_()==QtGui.QDialog.Accepted and \
         #    v.validate(self.cnp.text(),0)==cnpBun:
         print str(QtGui.QApplication.focusWidget().objectName())
         print QtGui.QApplication.focusWidget().parentWidget().objectName()
     def evaluare(self):
+        self.hide()
         self.evaluare_d=Evaluare(self.query,self)
+        self.show()
     def pacient(self):
+        self.hide()
         self.pacient_d=Pacient(self.query,self)
+        self.show()
     def closeEvent(self,event):
         try:
             QtSql.QSqlDatabase.close(self.pacientidb) 
         self.query=query
         self.cnp=0
         QtGui.QDialog.__init__(self,parent)
-        self.setObjectName='Evaluare'
+        self.setObjectName('Evaluare')
         self.setWindowTitle('Evaluare')
         cauta=QtGui.QLabel('Cauta pacient')
         self.cautat=QtGui.QLineEdit()
         self.exec_()
 
     def veziEval(self):
+        self.hide()
         eval=Evaluari(self.query,self.cnp,self)
+        self.show()
 
     def cauta_f(self):
         self.rezultat.clear()
         #QtGui.QApplication.processEvents()
         QtGui.QDialog.__init__(self,parent)
         self.setWindowTitle('Pacient')
-        self.setObjectName='Pacient'
+        self.setObjectName('Pacient')
         nume=QtGui.QLabel('Nume')
         self.nume=QtGui.QLineEdit()
         prenume=QtGui.QLabel('Prenume')
         self.connect(butoane,QtCore.SIGNAL('accepted()'),self.verifica)
         self.connect(self,QtCore.SIGNAL('accepted()'),QtCore.SLOT('accept()'))
         cnpBun=(2,0)
-        self.show()
+        self.exec_()
     def verifica(self):
         #if self.exec_()==QtGui.QDialog.Accepted and \
         #    v.validate(self.cnp.text(),0)==cnpBun:
             return 0.0
     def __repr__(self):
         return self.valoare.text()
+    def text(self):
+        return self.valoare.text()
     def __str__(self):
 	    return self.nume
     def baga(self,valoare):

Binary file modified.

             return self.valoare.text()
         except:
             return 0
+    def __float__(self):
+        try:
+            return float(self.valoare.text())
+        except:
+            return 0.0
     def __repr__(self):
         return self.valoare.text()
     def __str__(self):
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.