From 9fee6568cde68ad1c0d1b59b89a6c2c901a5c4bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Jastrz=C4=99bski?= Date: Tue, 11 Jun 2013 17:39:33 +0200 Subject: [PATCH] Updated progress bar --- KCC.ui | 14 ++++++++++++-- kcc/KCC_ui.py | 10 ++++++++-- kcc/comic2ebook.py | 7 ++++++- 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/KCC.ui b/KCC.ui index d09ecf3..79c850d 100644 --- a/KCC.ui +++ b/KCC.ui @@ -590,11 +590,21 @@ 31 + + + 10 + 75 + true + + 0 - - false + + Qt::AlignJustify|Qt::AlignVCenter + + + diff --git a/kcc/KCC_ui.py b/kcc/KCC_ui.py index 0ed4156..42d12e2 100644 --- a/kcc/KCC_ui.py +++ b/kcc/KCC_ui.py @@ -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) diff --git a/kcc/comic2ebook.py b/kcc/comic2ebook.py index ce436d0..60274f4 100755 --- a/kcc/comic2ebook.py +++ b/kcc/comic2ebook.py @@ -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')