1
0
mirror of https://github.com/ciromattia/kcc synced 2026-01-03 20:09:31 +00:00

Updated progress bar

This commit is contained in:
Paweł Jastrzębski
2013-06-11 17:39:33 +02:00
parent 2a169d50ec
commit 9fee6568cd
3 changed files with 26 additions and 5 deletions

14
KCC.ui
View File

@@ -590,11 +590,21 @@
<height>31</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="value">
<number>0</number>
</property>
<property name="textVisible">
<bool>false</bool>
<property name="alignment">
<set>Qt::AlignJustify|Qt::AlignVCenter</set>
</property>
<property name="format">
<string/>
</property>
</widget>
</widget>

View File

@@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'KCC.ui'
#
# Created: Tue Jun 11 08:49:21 2013
# Created: Tue Jun 11 16:42:31 2013
# by: PyQt4 UI code generator 4.10.1
#
# WARNING! All changes made in this file will be lost!
@@ -217,8 +217,14 @@ class Ui_KCC(object):
self.gridLayout_2.addWidget(self.customHeight, 0, 3, 1, 1)
self.ProgressBar = QtGui.QProgressBar(self.Form)
self.ProgressBar.setGeometry(QtCore.QRect(10, 10, 401, 31))
font = QtGui.QFont()
font.setPointSize(10)
font.setBold(True)
font.setWeight(75)
self.ProgressBar.setFont(font)
self.ProgressBar.setProperty("value", 0)
self.ProgressBar.setTextVisible(False)
self.ProgressBar.setAlignment(QtCore.Qt.AlignJustify|QtCore.Qt.AlignVCenter)
self.ProgressBar.setFormat(_fromUtf8(""))
self.ProgressBar.setObjectName(_fromUtf8("ProgressBar"))
KCC.setCentralWidget(self.Form)
self.ActionBasic = QtGui.QAction(KCC)

View File

@@ -673,6 +673,7 @@ def main(argv=None, qtGUI=None):
if qtGUI:
global GUI
GUI = qtGUI
GUI.emit(QtCore.SIGNAL("progressBarTick"), 1)
if len(args) != 1:
parser.print_help()
return
@@ -682,14 +683,18 @@ def main(argv=None, qtGUI=None):
splitCount = 0
if options.imgproc:
print "Processing images..."
if GUI:
GUI.emit(QtCore.SIGNAL("progressBarTick"), 'status', 'Processing images')
dirImgProcess(path + "/OEBPS/Images/")
if GUI:
GUI.emit(QtCore.SIGNAL("progressBarTick"), 1)
if options.cbzoutput:
# if CBZ output wanted, compress all images and return filepath
print "\nCreating CBZ file..."
filepath = getOutputFilename(args[0], options.output, '.cbz')
make_archive(path + '_comic', 'zip', path + '/OEBPS/Images')
else:
print "\nCreating ePub structure..."
print "\nCreating EPUB structure..."
genEpubStruct(path)
# actually zip the ePub
filepath = getOutputFilename(args[0], options.output, '.epub')