[Uludag-commits] r11927 - trunk/bocek/src
svn-uludag at uludag.org.tr
svn-uludag at uludag.org.tr
11 Oca 2007 Per 00:46:51 EET
Author: gokmen.goksel
Date: Thu Jan 11 00:46:51 2007
New Revision: 11927
Modified:
trunk/bocek/src/bocek.py
trunk/bocek/src/gui.py
trunk/bocek/src/gui.ui
Log:
* progress filan
Modified: trunk/bocek/src/bocek.py
=================================================================
--- trunk/bocek/src/bocek.py (original)
+++ trunk/bocek/src/bocek.py Thu Jan 11 00:46:51 2007
@@ -51,6 +51,7 @@
def __init__(self, parent=None, name=None):
BocekForm.__init__(self, parent, name)
self.connect(self.buttonSave, SIGNAL('clicked()'), self.buildReport)
+ self.connect(self.buttonSend, SIGNAL('clicked()'), self.sendReport)
self.connect(self.buttonHelp, SIGNAL('clicked()'), self.slotHelp)
self.connect(guiApp, SIGNAL("shutDown()"), self.slotQuit)
os.environ["LC_ALL"] = "C"
@@ -66,15 +67,26 @@
self.output+="Summary : %s \n" % self.lineSummary.text()
self.output+="Details : %s \n" % self.lineDetails.text()
self.output+="\nAdditional Files : \n%s\n"%("*"*40)
+ self.progressBar.show()
+ size=0
+ for logs in checkedLogs:
+ size+=len(logs)
+ per = 100 / size
for logs in checkedLogs:
for log in logs:
self.output+="\n========» %s «========\n" % log
+ self.labelStatus.setText("%s is getting.." % log)
if logs[log]==1:
self.output+=self.getStaticOutput(log)
elif logs[log]==2:
self.output+=self.getCommandOutput(log)
self.output+="\n"
+ self.progressBar.setProgress(self.progressBar.progress()+per)
+ self.progressBar.update()
+ self.progressBar.setProgress(100)
self.lastReportFile = self.writeReport()
+
+ def sendReport(self):
if mail.send_mail(str(self.lineEmail.text()),
["gokmen at pardus.org.tr"],
str(self.lineSummary.text()),
Modified: trunk/bocek/src/gui.py
=================================================================
--- trunk/bocek/src/gui.py (original)
+++ trunk/bocek/src/gui.py Thu Jan 11 00:46:51 2007
@@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'gui.ui'
#
-# Created: Prş Oca 11 13:36:44 2007
+# Created: Cum Oca 12 00:04:38 2007
# by: The PyQt User Interface Compiler (pyuic) 3.17
#
# WARNING! All changes made in this file will be lost!
@@ -10,8 +10,8 @@
from qt import *
from kdecore import *
-from kfile import *
from kdeui import *
+from kfile import *
image0_data = \
"\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d" \
@@ -598,9 +598,9 @@
"\x1d\xfe\x05\x38\xb3\x18\x9a\xe6\x8f\xea\x11\x00" \
"\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82"
-class BocekForm(KDialog):
+class BocekForm(QDialog):
def __init__(self,parent = None,name = None,modal = 0,fl = 0):
- KDialog.__init__(self,parent,name,modal,fl)
+ QDialog.__init__(self,parent,name,modal,fl)
self.image0 = QPixmap()
self.image0.loadFromData(image0_data,"PNG")
@@ -741,9 +741,19 @@
BocekFormLayout.addLayout(layout7,6,0)
+ self.progressBar = KProgress(self,"progressBar")
+ self.progressBar.setEnabled(1)
+ self.progressBar.setFrameShadow(KProgress.Plain)
+ self.progressBar.setCenterIndicator(1)
+ self.progressBar.setIndicatorFollowsStyle(1)
+ self.progressBar.setPercentageVisible(1)
+ self.progressBar.hide()
+
+ BocekFormLayout.addWidget(self.progressBar,5,0)
+
self.languageChange()
- self.resize(QSize(509,410).expandedTo(self.minimumSizeHint()))
+ self.resize(QSize(509,425).expandedTo(self.minimumSizeHint()))
self.clearWState(Qt.WState_Polished)
self.connect(self.checkBoxAll,SIGNAL("toggled(bool)"),self.checkBoxStandartLogs.setChecked)
Modified: trunk/bocek/src/gui.ui
=================================================================
--- trunk/bocek/src/gui.ui (original)
+++ trunk/bocek/src/gui.ui Thu Jan 11 00:46:51 2007
@@ -9,7 +9,7 @@
<x>0</x>
<y>0</y>
<width>509</width>
- <height>410</height>
+ <height>425</height>
</rect>
</property>
<property name="caption">
@@ -403,6 +403,26 @@
</widget>
</hbox>
</widget>
+ <widget class="KProgress" row="5" column="0">
+ <property name="name">
+ <cstring>progressBar</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="frameShadow">
+ <enum>Plain</enum>
+ </property>
+ <property name="centerIndicator">
+ <bool>true</bool>
+ </property>
+ <property name="indicatorFollowsStyle">
+ <bool>true</bool>
+ </property>
+ <property name="percentageVisible">
+ <bool>true</bool>
+ </property>
+ </widget>
</grid>
</widget>
<images>
@@ -484,5 +504,6 @@
<includehint>kpushbutton.h</includehint>
<includehint>kpushbutton.h</includehint>
<includehint>kpushbutton.h</includehint>
+ <includehint>kprogress.h</includehint>
</includehints>
</UI>
Uludag-commits mesaj listesiyle ilgili
daha fazla bilgi