mirror of
https://github.com/ciromattia/kcc
synced 2025-12-13 09:46:25 +00:00
Preliminary QT5 update
This commit is contained in:
@@ -700,7 +700,7 @@ p, li { white-space: pre-wrap; }
|
||||
<string>Resolution of target device.</string>
|
||||
</property>
|
||||
<property name="inputMask">
|
||||
<string>0000; </string>
|
||||
<string>0000</string>
|
||||
</property>
|
||||
<property name="maxLength">
|
||||
<number>4</number>
|
||||
@@ -751,7 +751,7 @@ p, li { white-space: pre-wrap; }
|
||||
<string>Resolution of target device.</string>
|
||||
</property>
|
||||
<property name="inputMask">
|
||||
<string>0000; </string>
|
||||
<string>0000</string>
|
||||
</property>
|
||||
<property name="maxLength">
|
||||
<number>4</number>
|
||||
|
||||
@@ -708,7 +708,7 @@
|
||||
<string><html><head/><body><p><span style=" font-size:12pt;">Resolution of target device.</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="inputMask">
|
||||
<string>0000; </string>
|
||||
<string>0000</string>
|
||||
</property>
|
||||
<property name="maxLength">
|
||||
<number>4</number>
|
||||
@@ -763,7 +763,7 @@
|
||||
<string><html><head/><body><p><span style=" font-size:12pt;">Resolution of target device.</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="inputMask">
|
||||
<string>0000; </string>
|
||||
<string>0000</string>
|
||||
</property>
|
||||
<property name="maxLength">
|
||||
<number>4</number>
|
||||
|
||||
4
KCC.ui
4
KCC.ui
@@ -599,7 +599,7 @@ p, li { white-space: pre-wrap; }
|
||||
<string>Resolution of target device.</string>
|
||||
</property>
|
||||
<property name="inputMask">
|
||||
<string>0000; </string>
|
||||
<string>0000</string>
|
||||
</property>
|
||||
<property name="maxLength">
|
||||
<number>4</number>
|
||||
@@ -640,7 +640,7 @@ p, li { white-space: pre-wrap; }
|
||||
<string>Resolution of target device.</string>
|
||||
</property>
|
||||
<property name="inputMask">
|
||||
<string>0000; </string>
|
||||
<string>0000</string>
|
||||
</property>
|
||||
<property name="maxLength">
|
||||
<number>4</number>
|
||||
|
||||
28
kcc.py
28
kcc.py
@@ -27,7 +27,7 @@ import sys
|
||||
import os
|
||||
try:
|
||||
# noinspection PyUnresolvedReferences
|
||||
from PyQt5 import QtCore, QtGui, QtNetwork
|
||||
from PyQt5 import QtCore, QtGui, QtNetwork, QtWidgets
|
||||
except ImportError:
|
||||
print("ERROR: PyQT5 is not installed!")
|
||||
if sys.platform.startswith('linux'):
|
||||
@@ -55,9 +55,11 @@ elif sys.platform.startswith('win'):
|
||||
|
||||
|
||||
# Implementing detection of already running KCC instance and forwarding argv to it
|
||||
class QApplicationMessaging(QtGui.QApplication):
|
||||
class QApplicationMessaging(QtWidgets.QApplication):
|
||||
messageFromOtherInstance = QtCore.pyqtSignal(str)
|
||||
|
||||
def __init__(self, argv):
|
||||
QtGui.QApplication.__init__(self, argv)
|
||||
QtWidgets.QApplication.__init__(self, argv)
|
||||
self._memory = QtCore.QSharedMemory(self)
|
||||
self._memory.setKey('KCC')
|
||||
if self._memory.attach():
|
||||
@@ -79,7 +81,7 @@ class QApplicationMessaging(QtGui.QApplication):
|
||||
def handleMessage(self):
|
||||
socket = self._server.nextPendingConnection()
|
||||
if socket.waitForReadyRead(self._timeout):
|
||||
self.emit(QtCore.SIGNAL('messageFromOtherInstance'), socket.readAll().data().decode('utf8'))
|
||||
self.messageFromOtherInstance.emit(socket.readAll().data().decode('utf8'))
|
||||
|
||||
def sendMessage(self, message):
|
||||
if self.isRunning():
|
||||
@@ -94,6 +96,17 @@ class QApplicationMessaging(QtGui.QApplication):
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
# Adding signals to QMainWindow
|
||||
class QMainWindowKCC(QtWidgets.QMainWindow):
|
||||
progressBarTick = QtCore.pyqtSignal(str, str)
|
||||
modeConvert = QtCore.pyqtSignal(str)
|
||||
addMessage = QtCore.pyqtSignal(str, str, bool)
|
||||
addTrayMessage = QtCore.pyqtSignal(str, str)
|
||||
showDialog = QtCore.pyqtSignal(str)
|
||||
hideProgressBar = QtCore.pyqtSignal()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
freeze_support()
|
||||
KCCAplication = QApplicationMessaging(sys.argv)
|
||||
@@ -102,13 +115,14 @@ if __name__ == "__main__":
|
||||
KCCAplication.sendMessage(sys.argv[1].decode(sys.getfilesystemencoding()))
|
||||
sys.exit(0)
|
||||
else:
|
||||
messageBox = QtGui.QMessageBox()
|
||||
messageBox = QtWidgets.QMessageBox()
|
||||
icon = QtGui.QIcon()
|
||||
icon.addPixmap(QtGui.QPixmap(':/Icon/icons/comic2ebook.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
messageBox.setWindowIcon(icon)
|
||||
QtGui.QMessageBox.critical(messageBox, 'KCC - Error', 'KCC is already running!', QtGui.QMessageBox.Ok)
|
||||
QtWidgets.QMessageBox.critical(messageBox, 'KCC - Error', 'KCC is already running!',
|
||||
QtWidgets.QMessageBox.Ok)
|
||||
sys.exit(1)
|
||||
KCCWindow = QtGui.QMainWindow()
|
||||
KCCWindow = QMainWindowKCC()
|
||||
KCCUI = KCC_gui.KCCGUI(KCCAplication, KCCWindow)
|
||||
if len(sys.argv) > 1:
|
||||
KCCUI.handleMessage(sys.argv[1].decode(sys.getfilesystemencoding()))
|
||||
|
||||
223
kcc/KCC_gui.py
223
kcc/KCC_gui.py
@@ -25,7 +25,9 @@ __docformat__ = 'restructuredtext en'
|
||||
import os
|
||||
import sys
|
||||
import traceback
|
||||
import urllib.request, urllib.error, urllib.parse
|
||||
import urllib.request
|
||||
import urllib.error
|
||||
import urllib.parse
|
||||
import socket
|
||||
from . import comic2ebook
|
||||
from . import kindlesplit
|
||||
@@ -34,7 +36,7 @@ from shutil import move
|
||||
from http.server import BaseHTTPRequestHandler, HTTPServer
|
||||
from socketserver import ThreadingMixIn
|
||||
from subprocess import STDOUT, PIPE
|
||||
from PyQt5 import QtGui, QtCore
|
||||
from PyQt5 import QtGui, QtCore, QtWidgets
|
||||
from xml.dom.minidom import parse
|
||||
from html.parser import HTMLParser
|
||||
from .KCC_rc_web import WebContent
|
||||
@@ -180,14 +182,14 @@ class WebServerThread(QtCore.QThread):
|
||||
self.server = WebServerThreaded(('', 4242), WebServerHandler)
|
||||
self.running = True
|
||||
if lIP:
|
||||
self.emit(QtCore.SIGNAL("addMessage"), '<b><a href="http://' + lIP +
|
||||
':4242/">Content server</a></b> started.', 'info')
|
||||
MW.addMessage.emit('<b><a href="http://' + str(lIP) + ':4242/">Content server</a></b> started.', 'info',
|
||||
False)
|
||||
else:
|
||||
self.emit(QtCore.SIGNAL("addMessage"), '<b>Content server</b> started on port 4242.', 'info')
|
||||
MW.addMessage.emit('<b>Content server</b> started on port 4242.', 'info', False)
|
||||
while self.running:
|
||||
self.server.handle_request()
|
||||
except Exception:
|
||||
self.emit(QtCore.SIGNAL("addMessage"), '<b>Content server</b> failed to start!', 'error')
|
||||
MW.addMessage.emit('<b>Content server</b> failed to start!', 'error', False)
|
||||
|
||||
def stop(self):
|
||||
self.running = False
|
||||
@@ -208,10 +210,10 @@ class VersionThread(QtCore.QThread):
|
||||
return
|
||||
latestVersion = XML.childNodes[0].getElementsByTagName('latest')[0].childNodes[0].toxml()
|
||||
if tuple(map(int, (latestVersion.split(".")))) > tuple(map(int, (__version__.split(".")))):
|
||||
self.emit(QtCore.SIGNAL("addMessage"), '<a href="http://kcc.vulturis.eu/">'
|
||||
MW.addMessage.emit('<a href="http://kcc.vulturis.eu/">'
|
||||
'<b>New version is available!</b></a> '
|
||||
'(<a href="https://github.com/ciromattia/kcc/releases/">'
|
||||
'Changelog</a>)', 'warning')
|
||||
'Changelog</a>)', 'warning', False)
|
||||
|
||||
|
||||
class ProgressThread(QtCore.QThread):
|
||||
@@ -229,7 +231,7 @@ class ProgressThread(QtCore.QThread):
|
||||
while self.running:
|
||||
sleep(1)
|
||||
if self.content:
|
||||
self.emit(QtCore.SIGNAL("addMessage"), self.content + self.progress * '.', 'info', True)
|
||||
MW.addMessage.emit(self.content + self.progress * '.', 'info', True)
|
||||
self.progress += 1
|
||||
if self.progress == 4:
|
||||
self.progress = 0
|
||||
@@ -335,17 +337,17 @@ class WorkerThread(QtCore.QThread):
|
||||
GUI.progress.content = ''
|
||||
GUI.progress.stop()
|
||||
GUI.needClean = True
|
||||
self.emit(QtCore.SIGNAL("hideProgressBar"))
|
||||
self.emit(QtCore.SIGNAL("addMessage"), '<b>Conversion interrupted.</b>', 'error')
|
||||
self.emit(QtCore.SIGNAL("addTrayMessage"), 'Conversion interrupted.', 'Critical')
|
||||
self.emit(QtCore.SIGNAL("modeConvert"), True)
|
||||
MW.hideProgressBar.emit()
|
||||
MW.addMessage.emit('<b>Conversion interrupted.</b>', 'error', False)
|
||||
MW.addTrayMessage.emit('Conversion interrupted.', 'Critical')
|
||||
MW.modeConvert.emit(True)
|
||||
|
||||
def addResult(self, output):
|
||||
self.emit(QtCore.SIGNAL("progressBarTick"))
|
||||
MW.progressBarTick.emit(False, False)
|
||||
self.workerOutput.append(output)
|
||||
|
||||
def run(self):
|
||||
self.emit(QtCore.SIGNAL("modeConvert"), False)
|
||||
MW.modeConvert.emit(False)
|
||||
profile = GUI.profiles[str(GUI.DeviceBox.currentText())]['Label']
|
||||
argv = ["--profile=" + profile]
|
||||
currentJobs = []
|
||||
@@ -400,18 +402,18 @@ class WorkerThread(QtCore.QThread):
|
||||
self.clean()
|
||||
return
|
||||
self.errors = False
|
||||
self.emit(QtCore.SIGNAL("addMessage"), '<b>Source:</b> ' + job, 'info')
|
||||
MW.addMessage.emit('<b>Source:</b> ' + job, 'info', False)
|
||||
if str(GUI.FormatBox.currentText()) == 'CBZ':
|
||||
self.emit(QtCore.SIGNAL("addMessage"), 'Creating CBZ files', 'info')
|
||||
MW.addMessage.emit('Creating CBZ files', 'info', False)
|
||||
GUI.progress.content = 'Creating CBZ files'
|
||||
else:
|
||||
self.emit(QtCore.SIGNAL("addMessage"), 'Creating EPUB files', 'info')
|
||||
MW.addMessage.emit('Creating EPUB files', 'info', False)
|
||||
GUI.progress.content = 'Creating EPUB files'
|
||||
jobargv = list(argv)
|
||||
jobargv.append(job)
|
||||
try:
|
||||
outputPath = comic2ebook.main(jobargv, self)
|
||||
self.emit(QtCore.SIGNAL("hideProgressBar"))
|
||||
MW.hideProgressBar.emit()
|
||||
except UserWarning as warn:
|
||||
if not self.conversionAlive:
|
||||
self.clean()
|
||||
@@ -419,17 +421,17 @@ class WorkerThread(QtCore.QThread):
|
||||
else:
|
||||
GUI.progress.content = ''
|
||||
self.errors = True
|
||||
self.emit(QtCore.SIGNAL("addMessage"), str(warn), 'warning')
|
||||
self.emit(QtCore.SIGNAL("addMessage"), 'Failed to create output file!', 'warning')
|
||||
self.emit(QtCore.SIGNAL("addTrayMessage"), 'Failed to create output file!', 'Critical')
|
||||
MW.addMessage.emit(str(warn), 'warning', False)
|
||||
MW.addMessage.emit('Failed to create output file!', 'warning', False)
|
||||
MW.addTrayMessage.emit('Failed to create output file!', 'Critical')
|
||||
except Exception as err:
|
||||
GUI.progress.content = ''
|
||||
self.errors = True
|
||||
type_, value_, traceback_ = sys.exc_info()
|
||||
self.emit(QtCore.SIGNAL("showDialog"), "Error during conversion %s:\n\n%s\n\nTraceback:\n%s"
|
||||
MW.showDialog.emit("Error during conversion %s:\n\n%s\n\nTraceback:\n%s"
|
||||
% (jobargv[-1], str(err), traceback.format_tb(traceback_)))
|
||||
self.emit(QtCore.SIGNAL("addMessage"), 'Failed to create EPUB!', 'error')
|
||||
self.emit(QtCore.SIGNAL("addTrayMessage"), 'Failed to create EPUB!', 'Critical')
|
||||
MW.addMessage.emit('Failed to create EPUB!', 'error', False)
|
||||
MW.addTrayMessage.emit('Failed to create EPUB!', 'Critical')
|
||||
if not self.conversionAlive:
|
||||
for item in outputPath:
|
||||
if os.path.exists(item):
|
||||
@@ -439,14 +441,14 @@ class WorkerThread(QtCore.QThread):
|
||||
if not self.errors:
|
||||
GUI.progress.content = ''
|
||||
if str(GUI.FormatBox.currentText()) == 'CBZ':
|
||||
self.emit(QtCore.SIGNAL("addMessage"), 'Creating CBZ files... <b>Done!</b>', 'info', True)
|
||||
MW.addMessage.emit('Creating CBZ files... <b>Done!</b>', 'info', True)
|
||||
else:
|
||||
self.emit(QtCore.SIGNAL("addMessage"), 'Creating EPUB files... <b>Done!</b>', 'info', True)
|
||||
MW.addMessage.emit('Creating EPUB files... <b>Done!</b>', 'info', True)
|
||||
if str(GUI.FormatBox.currentText()) == 'MOBI':
|
||||
self.emit(QtCore.SIGNAL("progressBarTick"), 'status', 'Creating MOBI files')
|
||||
self.emit(QtCore.SIGNAL("progressBarTick"), len(outputPath)*2+1)
|
||||
self.emit(QtCore.SIGNAL("progressBarTick"))
|
||||
self.emit(QtCore.SIGNAL("addMessage"), 'Creating MOBI files', 'info')
|
||||
MW.progressBarTick.emit('status', 'Creating MOBI files')
|
||||
MW.progressBarTick.emit(len(outputPath)*2+1, False)
|
||||
MW.progressBarTick.emit(False, False)
|
||||
MW.addMessage.emit('Creating MOBI files', 'info', False)
|
||||
GUI.progress.content = 'Creating MOBI files'
|
||||
self.workerOutput = []
|
||||
# Number of KindleGen threads depends on the size of RAM
|
||||
@@ -472,44 +474,42 @@ class WorkerThread(QtCore.QThread):
|
||||
return
|
||||
if self.kindlegenErrorCode[0] == 0:
|
||||
GUI.progress.content = ''
|
||||
self.emit(QtCore.SIGNAL("addMessage"), 'Creating MOBI files... <b>Done!</b>', 'info', True)
|
||||
self.emit(QtCore.SIGNAL("addMessage"), 'Cleaning MOBI files is currently disabled in this branch', 'info')
|
||||
MW.addMessage.emit('Creating MOBI files... <b>Done!</b>', 'info', True)
|
||||
MW.addMessage.emit('Cleaning MOBI files is currently disabled in this branch', 'info', False)
|
||||
GUI.progress.content = 'Cleaning MOBI files is currently disabled in this branch'
|
||||
#self.emit(QtCore.SIGNAL("addMessage"), 'Cleaning MOBI files', 'info')
|
||||
#GUI.progress.content = 'Cleaning MOBI files'
|
||||
#self.workerOutput = []
|
||||
## Multithreading KindleUnpack in current form is a waste of resources.
|
||||
## Unless we higly optimise KindleUnpack or drop 32bit support this will not change.
|
||||
#self.pool.setMaxThreadCount(1)
|
||||
#for item in outputPath:
|
||||
# worker = KindleUnpackThread([item, profile])
|
||||
# worker.signals.result.connect(self.addResult)
|
||||
# self.pool.start(worker)
|
||||
#self.pool.waitForDone()
|
||||
#sleep(0.5)
|
||||
#for success in self.workerOutput:
|
||||
# if not success[0]:
|
||||
# self.errors = True
|
||||
# print(success[1])
|
||||
# break
|
||||
#if not self.errors:
|
||||
# for item in outputPath:
|
||||
# GUI.completedWork[os.path.basename(mobiPath).encode('utf-8')] = mobiPath.encode('utf-8')
|
||||
# self.emit(QtCore.SIGNAL("addMessage"), 'Cleaning MOBI files... <b>Done!</b>', 'info', True)
|
||||
# mobiPath.encode('utf-8')
|
||||
# self.emit(QtCore.SIGNAL("addMessage"), 'Cleaning MOBI files... <b>Done!</b>', 'info',
|
||||
# True)
|
||||
#else:
|
||||
# GUI.progress.content = ''
|
||||
# for item in outputPath:
|
||||
# mobiPath = item.replace('.epub', '.mobi')
|
||||
# if os.path.exists(mobiPath):
|
||||
# os.remove(mobiPath)
|
||||
# if os.path.exists(mobiPath + '_toclean'):
|
||||
# os.remove(mobiPath + '_toclean')
|
||||
# self.emit(QtCore.SIGNAL("addMessage"), 'KindleUnpack failed to clean MOBI file!', 'error')
|
||||
# self.emit(QtCore.SIGNAL("addTrayMessage"), 'KindleUnpack failed to clean MOBI file!',
|
||||
# 'Critical')
|
||||
MW.addMessage.emit('Cleaning MOBI files', 'info', False)
|
||||
GUI.progress.content = 'Cleaning MOBI files'
|
||||
self.workerOutput = []
|
||||
# Multithreading KindleUnpack in current form is a waste of resources.
|
||||
# Unless we higly optimise KindleUnpack or drop 32bit support this will not change.
|
||||
self.pool.setMaxThreadCount(1)
|
||||
for item in outputPath:
|
||||
worker = KindleUnpackThread([item, profile])
|
||||
worker.signals.result.connect(self.addResult)
|
||||
self.pool.start(worker)
|
||||
self.pool.waitForDone()
|
||||
sleep(0.5)
|
||||
for success in self.workerOutput:
|
||||
if not success:
|
||||
self.errors = True
|
||||
break
|
||||
if not self.errors:
|
||||
for item in outputPath:
|
||||
GUI.progress.content = ''
|
||||
mobiPath = item.replace('.epub', '.mobi')
|
||||
os.remove(mobiPath + '_toclean')
|
||||
GUI.completedWork[os.path.basename(mobiPath).encode('utf-8')] = mobiPath.encode('utf-8')
|
||||
MW.addMessage.emit('Cleaning MOBI files... <b>Done!</b>', 'info', True)
|
||||
else:
|
||||
GUI.progress.content = ''
|
||||
for item in outputPath:
|
||||
mobiPath = item.replace('.epub', '.mobi')
|
||||
if os.path.exists(mobiPath):
|
||||
os.remove(mobiPath)
|
||||
if os.path.exists(mobiPath + '_toclean'):
|
||||
os.remove(mobiPath + '_toclean')
|
||||
MW.addMessage.emit('KindleUnpack failed to clean MOBI file!', 'error', False)
|
||||
MW.addTrayMessage.emit('KindleUnpack failed to clean MOBI file!', 'Critical')
|
||||
else:
|
||||
GUI.progress.content = ''
|
||||
epubSize = (os.path.getsize(self.kindlegenErrorCode[2]))/1024/1024
|
||||
@@ -518,32 +518,30 @@ class WorkerThread(QtCore.QThread):
|
||||
os.remove(item)
|
||||
if os.path.exists(item.replace('.epub', '.mobi')):
|
||||
os.remove(item.replace('.epub', '.mobi'))
|
||||
self.emit(QtCore.SIGNAL("addMessage"), 'KindleGen failed to create MOBI!', 'error')
|
||||
self.emit(QtCore.SIGNAL("addTrayMessage"), 'KindleGen failed to create MOBI!', 'Critical')
|
||||
MW.addMessage.emit('KindleGen failed to create MOBI!', 'error', False)
|
||||
MW.addTrayMessage.emit('KindleGen failed to create MOBI!', 'Critical')
|
||||
if self.kindlegenErrorCode[0] == 1 and self.kindlegenErrorCode[1] != '':
|
||||
self.emit(QtCore.SIGNAL("showDialog"), "KindleGen error:\n\n" +
|
||||
self.kindlegenErrorCode[1])
|
||||
MW.showDialog.emit("KindleGen error:\n\n" + self.kindlegenErrorCode[1])
|
||||
if self.kindlegenErrorCode[0] == 23026:
|
||||
self.emit(QtCore.SIGNAL("addMessage"), 'Created EPUB file was too big.',
|
||||
'error')
|
||||
self.emit(QtCore.SIGNAL("addMessage"), 'EPUB file: ' + str(epubSize) + 'MB.'
|
||||
' Supported size: ~300MB.', 'error')
|
||||
MW.addMessage.emit('Created EPUB file was too big.', 'error', False)
|
||||
MW.addMessage.emit('EPUB file: ' + str(epubSize) + 'MB. Supported size: ~300MB.', 'error',
|
||||
False)
|
||||
else:
|
||||
for item in outputPath:
|
||||
GUI.completedWork[os.path.basename(item).encode('utf-8')] = item.encode('utf-8')
|
||||
GUI.progress.content = ''
|
||||
GUI.progress.stop()
|
||||
self.emit(QtCore.SIGNAL("hideProgressBar"))
|
||||
MW.hideProgressBar.emit()
|
||||
GUI.needClean = True
|
||||
self.emit(QtCore.SIGNAL("addMessage"), '<b>All jobs completed.</b>', 'info')
|
||||
self.emit(QtCore.SIGNAL("addTrayMessage"), 'All jobs completed.', 'Information')
|
||||
self.emit(QtCore.SIGNAL("modeConvert"), True)
|
||||
MW.addMessage.emit('<b>All jobs completed.</b>', 'info', False)
|
||||
MW.addTrayMessage.emit('All jobs completed.', 'Information')
|
||||
MW.modeConvert.emit(True)
|
||||
|
||||
|
||||
class SystemTrayIcon(QtGui.QSystemTrayIcon):
|
||||
def __init__(self, parent=None):
|
||||
class SystemTrayIcon(QtWidgets.QSystemTrayIcon):
|
||||
def __init__(self):
|
||||
if not sys.platform.startswith('darwin') and self.isSystemTrayAvailable():
|
||||
QtGui.QSystemTrayIcon.__init__(self, GUI.icons.programIcon, MW)
|
||||
QtWidgets.QSystemTrayIcon.__init__(self, GUI.icons.programIcon, MW)
|
||||
self.activated.connect(self.catchClicks)
|
||||
|
||||
def catchClicks(self):
|
||||
@@ -559,21 +557,22 @@ class SystemTrayIcon(QtGui.QSystemTrayIcon):
|
||||
|
||||
|
||||
class KCCGUI(KCC_ui.Ui_KCC):
|
||||
# TODO: Check dialog
|
||||
def selectDir(self):
|
||||
if self.needClean:
|
||||
self.needClean = False
|
||||
GUI.JobList.clear()
|
||||
# Dirty, dirty way but OS native QFileDialogs don't support directory multiselect
|
||||
dirDialog = QtGui.QFileDialog(MW, 'Select directory', self.lastPath)
|
||||
dirDialog = QtWidgets.QFileDialog(MW, 'Select directory', self.lastPath)
|
||||
dirDialog.setFileMode(dirDialog.Directory)
|
||||
dirDialog.setOption(dirDialog.ShowDirsOnly, True)
|
||||
dirDialog.setOption(dirDialog.DontUseNativeDialog, True)
|
||||
l = dirDialog.findChild(QtGui.QListView, "listView")
|
||||
t = dirDialog.findChild(QtGui.QTreeView)
|
||||
l = dirDialog.findChild(QtWidgets.QListView, "listView")
|
||||
t = dirDialog.findChild(QtWidgets.QTreeView)
|
||||
if l:
|
||||
l.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection)
|
||||
l.setSelectionMode(QtWidgets.QAbstractItemView.ExtendedSelection)
|
||||
if t:
|
||||
t.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection)
|
||||
t.setSelectionMode(QtWidgets.QAbstractItemView.ExtendedSelection)
|
||||
if dirDialog.exec_() == 1:
|
||||
dnames = dirDialog.selectedFiles()
|
||||
else:
|
||||
@@ -586,23 +585,24 @@ class KCCGUI(KCC_ui.Ui_KCC):
|
||||
GUI.JobList.addItem(dname)
|
||||
MW.setFocus()
|
||||
|
||||
# TODO: Check dialog
|
||||
def selectFile(self):
|
||||
if self.needClean:
|
||||
self.needClean = False
|
||||
GUI.JobList.clear()
|
||||
if self.UnRAR:
|
||||
if self.sevenza:
|
||||
fnames = QtGui.QFileDialog.getOpenFileNames(MW, 'Select file', self.lastPath,
|
||||
fnames = QtWidgets.QFileDialog.getOpenFileNames(MW, 'Select file', self.lastPath,
|
||||
'*.cbz *.cbr *.cb7 *.zip *.rar *.7z *.pdf')
|
||||
else:
|
||||
fnames = QtGui.QFileDialog.getOpenFileNames(MW, 'Select file', self.lastPath,
|
||||
fnames = QtWidgets.QFileDialog.getOpenFileNames(MW, 'Select file', self.lastPath,
|
||||
'*.cbz *.cbr *.zip *.rar *.pdf')
|
||||
else:
|
||||
if self.sevenza:
|
||||
fnames = QtGui.QFileDialog.getOpenFileNames(MW, 'Select file', self.lastPath,
|
||||
fnames = QtWidgets.QFileDialog.getOpenFileNames(MW, 'Select file', self.lastPath,
|
||||
'*.cbz *.cb7 *.zip *.7z *.pdf')
|
||||
else:
|
||||
fnames = QtGui.QFileDialog.getOpenFileNames(MW, 'Select file', self.lastPath,
|
||||
fnames = QtWidgets.QFileDialog.getOpenFileNames(MW, 'Select file', self.lastPath,
|
||||
'*.cbz *.zip *.pdf')
|
||||
for fname in fnames:
|
||||
if str(fname) != "":
|
||||
@@ -864,16 +864,16 @@ class KCCGUI(KCC_ui.Ui_KCC):
|
||||
def addMessage(self, message, icon=None, replace=False):
|
||||
if icon:
|
||||
icon = eval('self.icons.' + icon)
|
||||
item = QtGui.QListWidgetItem(icon, ' ' + self.stripTags(message))
|
||||
item = QtWidgets.QListWidgetItem(icon, ' ' + self.stripTags(message))
|
||||
else:
|
||||
item = QtGui.QListWidgetItem(' ' + self.stripTags(message))
|
||||
item = QtWidgets.QListWidgetItem(' ' + self.stripTags(message))
|
||||
if replace:
|
||||
GUI.JobList.takeItem(GUI.JobList.count()-1)
|
||||
# Due to lack of HTML support in QListWidgetItem we overlay text field with QLabel
|
||||
# We still fill original text field with transparent content to trigger creation of horizontal scrollbar
|
||||
item.setTextColor(QtGui.QColor('transparent'))
|
||||
label = QtGui.QLabel(message)
|
||||
label.setStyleSheet('background-image:url('');background-color:rgba(255,0,0,0.5);')
|
||||
item.setForeground(QtGui.QColor('transparent'))
|
||||
label = QtWidgets.QLabel(message)
|
||||
label.setStyleSheet('background-image:url('');background-color:rgba(0,0,0,0);')
|
||||
label.setOpenExternalLinks(True)
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(self.listFontSize)
|
||||
@@ -883,7 +883,7 @@ class KCCGUI(KCC_ui.Ui_KCC):
|
||||
GUI.JobList.scrollToBottom()
|
||||
|
||||
def showDialog(self, message):
|
||||
QtGui.QMessageBox.critical(MW, 'KCC - Error', message, QtGui.QMessageBox.Ok)
|
||||
QtWidgets.QMessageBox.critical(MW, 'KCC - Error', message, QtWidgets.QMessageBox.Ok)
|
||||
|
||||
def updateProgressbar(self, new=False, status=False):
|
||||
if new == "status":
|
||||
@@ -982,6 +982,7 @@ class KCCGUI(KCC_ui.Ui_KCC):
|
||||
else:
|
||||
self.addMessage('This file type is unsupported!', 'error')
|
||||
|
||||
# noinspection PyArgumentList
|
||||
def __init__(self, KCCAplication, KCCWindow):
|
||||
global APP, MW, GUI
|
||||
APP = KCCAplication
|
||||
@@ -1085,11 +1086,10 @@ class KCCGUI(KCC_ui.Ui_KCC):
|
||||
"Kindle 2",
|
||||
]
|
||||
|
||||
statusBarLabel = QtGui.QLabel('<b><a href="http://kcc.vulturis.eu/">HOMEPAGE</a> - <a href="https://github.com/'
|
||||
'ciromattia/kcc/blob/master/README.md#issues--new-features--donations">DONATE</a>'
|
||||
' - <a href="https://github.com/ciromattia/kcc/wiki">WIKI</a>'
|
||||
' - <a href="http://www.mobileread.com/forums/showthread.php?t=207461">FORUM</a>'
|
||||
'</b>')
|
||||
statusBarLabel = QtWidgets.QLabel('<b><a href="http://kcc.vulturis.eu/">HOMEPAGE</a> - <a href="https://github.'
|
||||
'com/ciromattia/kcc/blob/master/README.md#issues--new-features--donations">DO'
|
||||
'NATE</a> - <a href="https://github.com/ciromattia/kcc/wiki">WIKI</a> - <a hr'
|
||||
'ef="http://www.mobileread.com/forums/showthread.php?t=207461">FORUM</a></b>')
|
||||
statusBarLabel.setAlignment(QtCore.Qt.AlignCenter)
|
||||
statusBarLabel.setStyleSheet(self.statusBarStyle)
|
||||
statusBarLabel.setOpenExternalLinks(True)
|
||||
@@ -1145,7 +1145,7 @@ class KCCGUI(KCC_ui.Ui_KCC):
|
||||
self.addMessage('Cannot find <a href="http://www.7-zip.org/download.html">7za</a>!'
|
||||
' Processing of CB7/7Z files will be disabled.', 'warning')
|
||||
|
||||
APP.connect(APP, QtCore.SIGNAL('messageFromOtherInstance'), self.handleMessage)
|
||||
APP.messageFromOtherInstance.connect(self.handleMessage)
|
||||
GUI.BasicModeButton.clicked.connect(self.modeBasic)
|
||||
GUI.AdvModeButton.clicked.connect(self.modeAdvanced)
|
||||
GUI.DirectoryButton.clicked.connect(self.selectDir)
|
||||
@@ -1158,15 +1158,12 @@ class KCCGUI(KCC_ui.Ui_KCC):
|
||||
GUI.ProcessingBox.stateChanged.connect(self.toggleProcessingBox)
|
||||
GUI.DeviceBox.activated.connect(self.changeDevice)
|
||||
GUI.FormatBox.activated.connect(self.changeFormat)
|
||||
MW.connect(self.worker, QtCore.SIGNAL("progressBarTick"), self.updateProgressbar)
|
||||
MW.connect(self.worker, QtCore.SIGNAL("modeConvert"), self.modeConvert)
|
||||
MW.connect(self.worker, QtCore.SIGNAL("addMessage"), self.addMessage)
|
||||
MW.connect(self.worker, QtCore.SIGNAL("addTrayMessage"), self.tray.addTrayMessage)
|
||||
MW.connect(self.worker, QtCore.SIGNAL("showDialog"), self.showDialog)
|
||||
MW.connect(self.worker, QtCore.SIGNAL("hideProgressBar"), self.hideProgressBar)
|
||||
MW.connect(self.versionCheck, QtCore.SIGNAL("addMessage"), self.addMessage)
|
||||
MW.connect(self.contentServer, QtCore.SIGNAL("addMessage"), self.addMessage)
|
||||
MW.connect(self.progress, QtCore.SIGNAL("addMessage"), self.addMessage)
|
||||
MW.progressBarTick.connect(self.updateProgressbar)
|
||||
MW.modeConvert.connect(self.modeConvert)
|
||||
MW.addMessage.connect(self.addMessage)
|
||||
MW.addTrayMessage.connect(self.tray.addTrayMessage)
|
||||
MW.showDialog.connect(self.showDialog)
|
||||
MW.hideProgressBar.connect(self.hideProgressBar)
|
||||
MW.closeEvent = self.saveSettings
|
||||
|
||||
for profile in profilesGUI:
|
||||
|
||||
5142
kcc/KCC_rc.py
5142
kcc/KCC_rc.py
File diff suppressed because it is too large
Load Diff
277
kcc/KCC_ui.py
277
kcc/KCC_ui.py
@@ -2,30 +2,16 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'KCC.ui'
|
||||
#
|
||||
# Created: Tue Jan 14 15:50:02 2014
|
||||
# by: PyQt4 UI code generator 4.10.3
|
||||
# Created: Wed Jan 15 11:34:09 2014
|
||||
# by: PyQt5 UI code generator 5.2
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
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)
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
class Ui_KCC(object):
|
||||
def setupUi(self, KCC):
|
||||
KCC.setObjectName(_fromUtf8("KCC"))
|
||||
KCC.setObjectName("KCC")
|
||||
KCC.resize(420, 397)
|
||||
KCC.setMinimumSize(QtCore.QSize(420, 397))
|
||||
KCC.setMaximumSize(QtCore.QSize(420, 397))
|
||||
@@ -33,62 +19,62 @@ class Ui_KCC(object):
|
||||
font.setPointSize(9)
|
||||
KCC.setFont(font)
|
||||
icon = QtGui.QIcon()
|
||||
icon.addPixmap(QtGui.QPixmap(_fromUtf8(":/Icon/icons/comic2ebook.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon.addPixmap(QtGui.QPixmap(":/Icon/icons/comic2ebook.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
KCC.setWindowIcon(icon)
|
||||
KCC.setLocale(QtCore.QLocale(QtCore.QLocale.C, QtCore.QLocale.AnyCountry))
|
||||
self.Form = QtGui.QWidget(KCC)
|
||||
self.Form.setObjectName(_fromUtf8("Form"))
|
||||
self.OptionsAdvanced = QtGui.QFrame(self.Form)
|
||||
self.Form = QtWidgets.QWidget(KCC)
|
||||
self.Form.setObjectName("Form")
|
||||
self.OptionsAdvanced = QtWidgets.QFrame(self.Form)
|
||||
self.OptionsAdvanced.setEnabled(True)
|
||||
self.OptionsAdvanced.setGeometry(QtCore.QRect(10, 254, 421, 61))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(9)
|
||||
self.OptionsAdvanced.setFont(font)
|
||||
self.OptionsAdvanced.setObjectName(_fromUtf8("OptionsAdvanced"))
|
||||
self.gridLayout = QtGui.QGridLayout(self.OptionsAdvanced)
|
||||
self.OptionsAdvanced.setObjectName("OptionsAdvanced")
|
||||
self.gridLayout = QtWidgets.QGridLayout(self.OptionsAdvanced)
|
||||
self.gridLayout.setContentsMargins(9, -1, -1, -1)
|
||||
self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
|
||||
self.ProcessingBox = QtGui.QCheckBox(self.OptionsAdvanced)
|
||||
self.gridLayout.setObjectName("gridLayout")
|
||||
self.ProcessingBox = QtWidgets.QCheckBox(self.OptionsAdvanced)
|
||||
self.ProcessingBox.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.ProcessingBox.setObjectName(_fromUtf8("ProcessingBox"))
|
||||
self.ProcessingBox.setObjectName("ProcessingBox")
|
||||
self.gridLayout.addWidget(self.ProcessingBox, 1, 0, 1, 1)
|
||||
self.UpscaleBox = QtGui.QCheckBox(self.OptionsAdvanced)
|
||||
self.UpscaleBox = QtWidgets.QCheckBox(self.OptionsAdvanced)
|
||||
self.UpscaleBox.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.UpscaleBox.setTristate(True)
|
||||
self.UpscaleBox.setObjectName(_fromUtf8("UpscaleBox"))
|
||||
self.UpscaleBox.setObjectName("UpscaleBox")
|
||||
self.gridLayout.addWidget(self.UpscaleBox, 1, 1, 1, 1)
|
||||
self.WebtoonBox = QtGui.QCheckBox(self.OptionsAdvanced)
|
||||
self.WebtoonBox = QtWidgets.QCheckBox(self.OptionsAdvanced)
|
||||
self.WebtoonBox.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.WebtoonBox.setObjectName(_fromUtf8("WebtoonBox"))
|
||||
self.WebtoonBox.setObjectName("WebtoonBox")
|
||||
self.gridLayout.addWidget(self.WebtoonBox, 3, 1, 1, 1)
|
||||
self.NoDitheringBox = QtGui.QCheckBox(self.OptionsAdvanced)
|
||||
self.NoDitheringBox = QtWidgets.QCheckBox(self.OptionsAdvanced)
|
||||
self.NoDitheringBox.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.NoDitheringBox.setObjectName(_fromUtf8("NoDitheringBox"))
|
||||
self.NoDitheringBox.setObjectName("NoDitheringBox")
|
||||
self.gridLayout.addWidget(self.NoDitheringBox, 3, 2, 1, 1)
|
||||
self.BorderBox = QtGui.QCheckBox(self.OptionsAdvanced)
|
||||
self.BorderBox = QtWidgets.QCheckBox(self.OptionsAdvanced)
|
||||
self.BorderBox.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.BorderBox.setTristate(True)
|
||||
self.BorderBox.setObjectName(_fromUtf8("BorderBox"))
|
||||
self.BorderBox.setObjectName("BorderBox")
|
||||
self.gridLayout.addWidget(self.BorderBox, 3, 0, 1, 1)
|
||||
self.NoRotateBox = QtGui.QCheckBox(self.OptionsAdvanced)
|
||||
self.NoRotateBox = QtWidgets.QCheckBox(self.OptionsAdvanced)
|
||||
self.NoRotateBox.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.NoRotateBox.setObjectName(_fromUtf8("NoRotateBox"))
|
||||
self.NoRotateBox.setObjectName("NoRotateBox")
|
||||
self.gridLayout.addWidget(self.NoRotateBox, 1, 2, 1, 1)
|
||||
self.DeviceBox = QtGui.QComboBox(self.Form)
|
||||
self.DeviceBox = QtWidgets.QComboBox(self.Form)
|
||||
self.DeviceBox.setGeometry(QtCore.QRect(10, 200, 141, 31))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(8)
|
||||
self.DeviceBox.setFont(font)
|
||||
self.DeviceBox.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.DeviceBox.setObjectName(_fromUtf8("DeviceBox"))
|
||||
self.FormatBox = QtGui.QComboBox(self.Form)
|
||||
self.DeviceBox.setObjectName("DeviceBox")
|
||||
self.FormatBox = QtWidgets.QComboBox(self.Form)
|
||||
self.FormatBox.setGeometry(QtCore.QRect(260, 200, 151, 31))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(8)
|
||||
self.FormatBox.setFont(font)
|
||||
self.FormatBox.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.FormatBox.setObjectName(_fromUtf8("FormatBox"))
|
||||
self.ConvertButton = QtGui.QPushButton(self.Form)
|
||||
self.FormatBox.setObjectName("FormatBox")
|
||||
self.ConvertButton = QtWidgets.QPushButton(self.Form)
|
||||
self.ConvertButton.setGeometry(QtCore.QRect(160, 200, 91, 32))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(9)
|
||||
@@ -97,99 +83,99 @@ class Ui_KCC(object):
|
||||
self.ConvertButton.setFont(font)
|
||||
self.ConvertButton.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
icon1 = QtGui.QIcon()
|
||||
icon1.addPixmap(QtGui.QPixmap(_fromUtf8(":/Other/icons/convert.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon1.addPixmap(QtGui.QPixmap(":/Other/icons/convert.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.ConvertButton.setIcon(icon1)
|
||||
self.ConvertButton.setObjectName(_fromUtf8("ConvertButton"))
|
||||
self.DirectoryButton = QtGui.QPushButton(self.Form)
|
||||
self.ConvertButton.setObjectName("ConvertButton")
|
||||
self.DirectoryButton = QtWidgets.QPushButton(self.Form)
|
||||
self.DirectoryButton.setGeometry(QtCore.QRect(10, 160, 141, 32))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(8)
|
||||
self.DirectoryButton.setFont(font)
|
||||
self.DirectoryButton.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
icon2 = QtGui.QIcon()
|
||||
icon2.addPixmap(QtGui.QPixmap(_fromUtf8(":/Other/icons/folder_new.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon2.addPixmap(QtGui.QPixmap(":/Other/icons/folder_new.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.DirectoryButton.setIcon(icon2)
|
||||
self.DirectoryButton.setObjectName(_fromUtf8("DirectoryButton"))
|
||||
self.FileButton = QtGui.QPushButton(self.Form)
|
||||
self.DirectoryButton.setObjectName("DirectoryButton")
|
||||
self.FileButton = QtWidgets.QPushButton(self.Form)
|
||||
self.FileButton.setGeometry(QtCore.QRect(260, 160, 151, 32))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(8)
|
||||
self.FileButton.setFont(font)
|
||||
self.FileButton.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
icon3 = QtGui.QIcon()
|
||||
icon3.addPixmap(QtGui.QPixmap(_fromUtf8(":/Other/icons/document_new.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon3.addPixmap(QtGui.QPixmap(":/Other/icons/document_new.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.FileButton.setIcon(icon3)
|
||||
self.FileButton.setObjectName(_fromUtf8("FileButton"))
|
||||
self.ClearButton = QtGui.QPushButton(self.Form)
|
||||
self.FileButton.setObjectName("FileButton")
|
||||
self.ClearButton = QtWidgets.QPushButton(self.Form)
|
||||
self.ClearButton.setGeometry(QtCore.QRect(160, 160, 91, 32))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(8)
|
||||
self.ClearButton.setFont(font)
|
||||
self.ClearButton.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
icon4 = QtGui.QIcon()
|
||||
icon4.addPixmap(QtGui.QPixmap(_fromUtf8(":/Other/icons/clear.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon4.addPixmap(QtGui.QPixmap(":/Other/icons/clear.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.ClearButton.setIcon(icon4)
|
||||
self.ClearButton.setObjectName(_fromUtf8("ClearButton"))
|
||||
self.OptionsBasic = QtGui.QFrame(self.Form)
|
||||
self.ClearButton.setObjectName("ClearButton")
|
||||
self.OptionsBasic = QtWidgets.QFrame(self.Form)
|
||||
self.OptionsBasic.setGeometry(QtCore.QRect(10, 230, 421, 41))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(9)
|
||||
self.OptionsBasic.setFont(font)
|
||||
self.OptionsBasic.setObjectName(_fromUtf8("OptionsBasic"))
|
||||
self.MangaBox = QtGui.QCheckBox(self.OptionsBasic)
|
||||
self.OptionsBasic.setObjectName("OptionsBasic")
|
||||
self.MangaBox = QtWidgets.QCheckBox(self.OptionsBasic)
|
||||
self.MangaBox.setGeometry(QtCore.QRect(9, 10, 130, 18))
|
||||
self.MangaBox.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.MangaBox.setObjectName(_fromUtf8("MangaBox"))
|
||||
self.QualityBox = QtGui.QCheckBox(self.OptionsBasic)
|
||||
self.MangaBox.setObjectName("MangaBox")
|
||||
self.QualityBox = QtWidgets.QCheckBox(self.OptionsBasic)
|
||||
self.QualityBox.setGeometry(QtCore.QRect(282, 10, 130, 18))
|
||||
self.QualityBox.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.QualityBox.setTristate(True)
|
||||
self.QualityBox.setObjectName(_fromUtf8("QualityBox"))
|
||||
self.RotateBox = QtGui.QCheckBox(self.OptionsBasic)
|
||||
self.QualityBox.setObjectName("QualityBox")
|
||||
self.RotateBox = QtWidgets.QCheckBox(self.OptionsBasic)
|
||||
self.RotateBox.setGeometry(QtCore.QRect(145, 10, 130, 18))
|
||||
self.RotateBox.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.RotateBox.setObjectName(_fromUtf8("RotateBox"))
|
||||
self.JobList = QtGui.QListWidget(self.Form)
|
||||
self.RotateBox.setObjectName("RotateBox")
|
||||
self.JobList = QtWidgets.QListWidget(self.Form)
|
||||
self.JobList.setGeometry(QtCore.QRect(10, 50, 401, 101))
|
||||
self.JobList.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.JobList.setStyleSheet(_fromUtf8("QListWidget#JobList {background:#ffffff;background-image:url(:/Other/icons/list_background.png);background-position:center center;background-repeat:no-repeat;}QScrollBar:vertical{border:1px solid #999;background:#FFF;width:5px;margin:0}QScrollBar::handle:vertical{background:DarkGray;min-height:0}QScrollBar::add-line:vertical{height:0;background:DarkGray;subcontrol-position:bottom;subcontrol-origin:margin}QScrollBar::sub-line:vertical{height:0;background:DarkGray;subcontrol-position:top;subcontrol-origin:margin}QScrollBar:horizontal{border:1px solid #999;background:#FFF;height:5px;margin:0}QScrollBar::handle:horizontal{background:DarkGray;min-width:0}QScrollBar::add-line:horizontal{width:0;background:DarkGray;subcontrol-position:bottom;subcontrol-origin:margin}QScrollBar::sub-line:horizontal{width:0;background:DarkGray;subcontrol-position:top;subcontrol-origin:margin}"))
|
||||
self.JobList.setStyleSheet("QListWidget#JobList {background:#ffffff;background-image:url(:/Other/icons/list_background.png);background-position:center center;background-repeat:no-repeat;}QScrollBar:vertical{border:1px solid #999;background:#FFF;width:5px;margin:0}QScrollBar::handle:vertical{background:DarkGray;min-height:0}QScrollBar::add-line:vertical{height:0;background:DarkGray;subcontrol-position:bottom;subcontrol-origin:margin}QScrollBar::sub-line:vertical{height:0;background:DarkGray;subcontrol-position:top;subcontrol-origin:margin}QScrollBar:horizontal{border:1px solid #999;background:#FFF;height:5px;margin:0}QScrollBar::handle:horizontal{background:DarkGray;min-width:0}QScrollBar::add-line:horizontal{width:0;background:DarkGray;subcontrol-position:bottom;subcontrol-origin:margin}QScrollBar::sub-line:horizontal{width:0;background:DarkGray;subcontrol-position:top;subcontrol-origin:margin}")
|
||||
self.JobList.setProperty("showDropIndicator", False)
|
||||
self.JobList.setSelectionMode(QtGui.QAbstractItemView.NoSelection)
|
||||
self.JobList.setVerticalScrollMode(QtGui.QAbstractItemView.ScrollPerPixel)
|
||||
self.JobList.setHorizontalScrollMode(QtGui.QAbstractItemView.ScrollPerPixel)
|
||||
self.JobList.setObjectName(_fromUtf8("JobList"))
|
||||
self.BasicModeButton = QtGui.QPushButton(self.Form)
|
||||
self.JobList.setSelectionMode(QtWidgets.QAbstractItemView.NoSelection)
|
||||
self.JobList.setVerticalScrollMode(QtWidgets.QAbstractItemView.ScrollPerPixel)
|
||||
self.JobList.setHorizontalScrollMode(QtWidgets.QAbstractItemView.ScrollPerPixel)
|
||||
self.JobList.setObjectName("JobList")
|
||||
self.BasicModeButton = QtWidgets.QPushButton(self.Form)
|
||||
self.BasicModeButton.setGeometry(QtCore.QRect(10, 10, 195, 32))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(9)
|
||||
self.BasicModeButton.setFont(font)
|
||||
self.BasicModeButton.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.BasicModeButton.setObjectName(_fromUtf8("BasicModeButton"))
|
||||
self.AdvModeButton = QtGui.QPushButton(self.Form)
|
||||
self.BasicModeButton.setObjectName("BasicModeButton")
|
||||
self.AdvModeButton = QtWidgets.QPushButton(self.Form)
|
||||
self.AdvModeButton.setGeometry(QtCore.QRect(217, 10, 195, 32))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(9)
|
||||
self.AdvModeButton.setFont(font)
|
||||
self.AdvModeButton.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.AdvModeButton.setObjectName(_fromUtf8("AdvModeButton"))
|
||||
self.OptionsAdvancedGamma = QtGui.QFrame(self.Form)
|
||||
self.AdvModeButton.setObjectName("AdvModeButton")
|
||||
self.OptionsAdvancedGamma = QtWidgets.QFrame(self.Form)
|
||||
self.OptionsAdvancedGamma.setEnabled(True)
|
||||
self.OptionsAdvancedGamma.setGeometry(QtCore.QRect(10, 305, 401, 41))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(9)
|
||||
self.OptionsAdvancedGamma.setFont(font)
|
||||
self.OptionsAdvancedGamma.setObjectName(_fromUtf8("OptionsAdvancedGamma"))
|
||||
self.GammaLabel = QtGui.QLabel(self.OptionsAdvancedGamma)
|
||||
self.OptionsAdvancedGamma.setObjectName("OptionsAdvancedGamma")
|
||||
self.GammaLabel = QtWidgets.QLabel(self.OptionsAdvancedGamma)
|
||||
self.GammaLabel.setGeometry(QtCore.QRect(15, 0, 100, 40))
|
||||
self.GammaLabel.setObjectName(_fromUtf8("GammaLabel"))
|
||||
self.GammaSlider = QtGui.QSlider(self.OptionsAdvancedGamma)
|
||||
self.GammaLabel.setObjectName("GammaLabel")
|
||||
self.GammaSlider = QtWidgets.QSlider(self.OptionsAdvancedGamma)
|
||||
self.GammaSlider.setGeometry(QtCore.QRect(110, 10, 270, 22))
|
||||
self.GammaSlider.setFocusPolicy(QtCore.Qt.ClickFocus)
|
||||
self.GammaSlider.setMaximum(500)
|
||||
self.GammaSlider.setSingleStep(5)
|
||||
self.GammaSlider.setOrientation(QtCore.Qt.Horizontal)
|
||||
self.GammaSlider.setObjectName(_fromUtf8("GammaSlider"))
|
||||
self.ProgressBar = QtGui.QProgressBar(self.Form)
|
||||
self.GammaSlider.setObjectName("GammaSlider")
|
||||
self.ProgressBar = QtWidgets.QProgressBar(self.Form)
|
||||
self.ProgressBar.setGeometry(QtCore.QRect(10, 10, 401, 31))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(10)
|
||||
@@ -198,28 +184,28 @@ class Ui_KCC(object):
|
||||
self.ProgressBar.setFont(font)
|
||||
self.ProgressBar.setProperty("value", 0)
|
||||
self.ProgressBar.setAlignment(QtCore.Qt.AlignJustify|QtCore.Qt.AlignVCenter)
|
||||
self.ProgressBar.setFormat(_fromUtf8(""))
|
||||
self.ProgressBar.setObjectName(_fromUtf8("ProgressBar"))
|
||||
self.OptionsExpert = QtGui.QFrame(self.Form)
|
||||
self.ProgressBar.setFormat("")
|
||||
self.ProgressBar.setObjectName("ProgressBar")
|
||||
self.OptionsExpert = QtWidgets.QFrame(self.Form)
|
||||
self.OptionsExpert.setGeometry(QtCore.QRect(10, 337, 421, 41))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(9)
|
||||
self.OptionsExpert.setFont(font)
|
||||
self.OptionsExpert.setObjectName(_fromUtf8("OptionsExpert"))
|
||||
self.ColorBox = QtGui.QCheckBox(self.OptionsExpert)
|
||||
self.OptionsExpert.setObjectName("OptionsExpert")
|
||||
self.ColorBox = QtWidgets.QCheckBox(self.OptionsExpert)
|
||||
self.ColorBox.setGeometry(QtCore.QRect(9, 11, 130, 18))
|
||||
self.ColorBox.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.ColorBox.setObjectName(_fromUtf8("ColorBox"))
|
||||
self.OptionsExpertInternal = QtGui.QFrame(self.OptionsExpert)
|
||||
self.ColorBox.setObjectName("ColorBox")
|
||||
self.OptionsExpertInternal = QtWidgets.QFrame(self.OptionsExpert)
|
||||
self.OptionsExpertInternal.setGeometry(QtCore.QRect(100, 0, 295, 40))
|
||||
self.OptionsExpertInternal.setObjectName(_fromUtf8("OptionsExpertInternal"))
|
||||
self.gridLayout_2 = QtGui.QGridLayout(self.OptionsExpertInternal)
|
||||
self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
|
||||
self.wLabel = QtGui.QLabel(self.OptionsExpertInternal)
|
||||
self.wLabel.setObjectName(_fromUtf8("wLabel"))
|
||||
self.OptionsExpertInternal.setObjectName("OptionsExpertInternal")
|
||||
self.gridLayout_2 = QtWidgets.QGridLayout(self.OptionsExpertInternal)
|
||||
self.gridLayout_2.setObjectName("gridLayout_2")
|
||||
self.wLabel = QtWidgets.QLabel(self.OptionsExpertInternal)
|
||||
self.wLabel.setObjectName("wLabel")
|
||||
self.gridLayout_2.addWidget(self.wLabel, 0, 0, 1, 1)
|
||||
self.customWidth = QtGui.QLineEdit(self.OptionsExpertInternal)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
|
||||
self.customWidth = QtWidgets.QLineEdit(self.OptionsExpertInternal)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.customWidth.sizePolicy().hasHeightForWidth())
|
||||
@@ -228,13 +214,13 @@ class Ui_KCC(object):
|
||||
self.customWidth.setFocusPolicy(QtCore.Qt.ClickFocus)
|
||||
self.customWidth.setAcceptDrops(False)
|
||||
self.customWidth.setMaxLength(4)
|
||||
self.customWidth.setObjectName(_fromUtf8("customWidth"))
|
||||
self.customWidth.setObjectName("customWidth")
|
||||
self.gridLayout_2.addWidget(self.customWidth, 0, 1, 1, 1)
|
||||
self.hLabel = QtGui.QLabel(self.OptionsExpertInternal)
|
||||
self.hLabel.setObjectName(_fromUtf8("hLabel"))
|
||||
self.hLabel = QtWidgets.QLabel(self.OptionsExpertInternal)
|
||||
self.hLabel.setObjectName("hLabel")
|
||||
self.gridLayout_2.addWidget(self.hLabel, 0, 2, 1, 1)
|
||||
self.customHeight = QtGui.QLineEdit(self.OptionsExpertInternal)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
|
||||
self.customHeight = QtWidgets.QLineEdit(self.OptionsExpertInternal)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.customHeight.sizePolicy().hasHeightForWidth())
|
||||
@@ -243,27 +229,27 @@ class Ui_KCC(object):
|
||||
self.customHeight.setFocusPolicy(QtCore.Qt.ClickFocus)
|
||||
self.customHeight.setAcceptDrops(False)
|
||||
self.customHeight.setMaxLength(4)
|
||||
self.customHeight.setObjectName(_fromUtf8("customHeight"))
|
||||
self.customHeight.setObjectName("customHeight")
|
||||
self.gridLayout_2.addWidget(self.customHeight, 0, 3, 1, 1)
|
||||
KCC.setCentralWidget(self.Form)
|
||||
self.statusBar = QtGui.QStatusBar(KCC)
|
||||
self.statusBar = QtWidgets.QStatusBar(KCC)
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("MS Shell Dlg 2"))
|
||||
font.setFamily("MS Shell Dlg 2")
|
||||
font.setPointSize(8)
|
||||
self.statusBar.setFont(font)
|
||||
self.statusBar.setSizeGripEnabled(False)
|
||||
self.statusBar.setObjectName(_fromUtf8("statusBar"))
|
||||
self.statusBar.setObjectName("statusBar")
|
||||
KCC.setStatusBar(self.statusBar)
|
||||
self.ActionBasic = QtGui.QAction(KCC)
|
||||
self.ActionBasic = QtWidgets.QAction(KCC)
|
||||
self.ActionBasic.setCheckable(True)
|
||||
self.ActionBasic.setChecked(False)
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(9)
|
||||
self.ActionBasic.setFont(font)
|
||||
self.ActionBasic.setObjectName(_fromUtf8("ActionBasic"))
|
||||
self.ActionAdvanced = QtGui.QAction(KCC)
|
||||
self.ActionBasic.setObjectName("ActionBasic")
|
||||
self.ActionAdvanced = QtWidgets.QAction(KCC)
|
||||
self.ActionAdvanced.setCheckable(True)
|
||||
self.ActionAdvanced.setObjectName(_fromUtf8("ActionAdvanced"))
|
||||
self.ActionAdvanced.setObjectName("ActionAdvanced")
|
||||
|
||||
self.retranslateUi(KCC)
|
||||
QtCore.QMetaObject.connectSlotsByName(KCC)
|
||||
@@ -272,51 +258,52 @@ class Ui_KCC(object):
|
||||
KCC.setTabOrder(self.ConvertButton, self.ClearButton)
|
||||
|
||||
def retranslateUi(self, KCC):
|
||||
KCC.setWindowTitle(_translate("KCC", "Kindle Comic Converter", None))
|
||||
self.ProcessingBox.setToolTip(_translate("KCC", "Disable image optimizations.", None))
|
||||
self.ProcessingBox.setText(_translate("KCC", "No optimisation", None))
|
||||
self.UpscaleBox.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-weight:600; text-decoration: underline;\">Unchecked - Nothing<br/></span>Images smaller than device resolution will not be resized.</p><p><span style=\" font-weight:600; text-decoration: underline;\">Indeterminate - Stretching<br/></span>Images smaller than device resolution will be resized. Aspect ratio will be not preserved.</p><p><span style=\" font-weight:600; text-decoration: underline;\">Checked - Upscaling<br/></span>Images smaller than device resolution will be resized. Aspect ratio will be preserved.</p></body></html>", None))
|
||||
self.UpscaleBox.setText(_translate("KCC", "Stretch/Upscale", None))
|
||||
self.WebtoonBox.setToolTip(_translate("KCC", "<html><head/><body><p>Enable auto-splitting of webtoons like <span style=\" font-style:italic;\">Tower of God</span> or <span style=\" font-style:italic;\">Noblesse</span>.<br/>Pages with a low width, high height and vertical panel flow.</p></body></html>", None))
|
||||
self.WebtoonBox.setText(_translate("KCC", "Webtoon mode", None))
|
||||
self.NoDitheringBox.setToolTip(_translate("KCC", "<html><head/><body><p>Create PNG files instead JPEG.<br/>Quality increase is not noticeable on most of devices.<br/>Output files <span style=\" font-weight:600;\">might</span> be smaller.<br/><span style=\" font-weight:600;\">MOBI conversion will be much slower.</span></p></body></html>", None))
|
||||
self.NoDitheringBox.setText(_translate("KCC", "PNG output", None))
|
||||
self.BorderBox.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-weight:600; text-decoration: underline;\">Unchecked - Autodetection<br/></span>Color of margins fill will be detected automatically.</p><p><span style=\" font-weight:600; text-decoration: underline;\">Indeterminate - White<br/></span>Margins will be filled with white color.</p><p><span style=\" font-weight:600; text-decoration: underline;\">Checked - Black<br/></span>Margins will be filled with black color.</p></body></html>", None))
|
||||
self.BorderBox.setText(_translate("KCC", "W/B margins", None))
|
||||
self.NoRotateBox.setToolTip(_translate("KCC", "<html><head/><body><p>Disable splitting and rotation.</p></body></html>", None))
|
||||
self.NoRotateBox.setText(_translate("KCC", "No split/rotate", None))
|
||||
self.DeviceBox.setToolTip(_translate("KCC", "Target device.", None))
|
||||
self.FormatBox.setToolTip(_translate("KCC", "Output format.", None))
|
||||
self.ConvertButton.setText(_translate("KCC", "Convert", None))
|
||||
self.DirectoryButton.setText(_translate("KCC", "Add directory", None))
|
||||
self.FileButton.setText(_translate("KCC", "Add file", None))
|
||||
self.ClearButton.setText(_translate("KCC", "Clear list", None))
|
||||
self.MangaBox.setToolTip(_translate("KCC", "Enable right-to-left reading.", None))
|
||||
self.MangaBox.setText(_translate("KCC", "Manga mode", None))
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
KCC.setWindowTitle(_translate("KCC", "Kindle Comic Converter"))
|
||||
self.ProcessingBox.setToolTip(_translate("KCC", "Disable image optimizations."))
|
||||
self.ProcessingBox.setText(_translate("KCC", "No optimisation"))
|
||||
self.UpscaleBox.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-weight:600; text-decoration: underline;\">Unchecked - Nothing<br/></span>Images smaller than device resolution will not be resized.</p><p><span style=\" font-weight:600; text-decoration: underline;\">Indeterminate - Stretching<br/></span>Images smaller than device resolution will be resized. Aspect ratio will be not preserved.</p><p><span style=\" font-weight:600; text-decoration: underline;\">Checked - Upscaling<br/></span>Images smaller than device resolution will be resized. Aspect ratio will be preserved.</p></body></html>"))
|
||||
self.UpscaleBox.setText(_translate("KCC", "Stretch/Upscale"))
|
||||
self.WebtoonBox.setToolTip(_translate("KCC", "<html><head/><body><p>Enable auto-splitting of webtoons like <span style=\" font-style:italic;\">Tower of God</span> or <span style=\" font-style:italic;\">Noblesse</span>.<br/>Pages with a low width, high height and vertical panel flow.</p></body></html>"))
|
||||
self.WebtoonBox.setText(_translate("KCC", "Webtoon mode"))
|
||||
self.NoDitheringBox.setToolTip(_translate("KCC", "<html><head/><body><p>Create PNG files instead JPEG.<br/>Quality increase is not noticeable on most of devices.<br/>Output files <span style=\" font-weight:600;\">might</span> be smaller.<br/><span style=\" font-weight:600;\">MOBI conversion will be much slower.</span></p></body></html>"))
|
||||
self.NoDitheringBox.setText(_translate("KCC", "PNG output"))
|
||||
self.BorderBox.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-weight:600; text-decoration: underline;\">Unchecked - Autodetection<br/></span>Color of margins fill will be detected automatically.</p><p><span style=\" font-weight:600; text-decoration: underline;\">Indeterminate - White<br/></span>Margins will be filled with white color.</p><p><span style=\" font-weight:600; text-decoration: underline;\">Checked - Black<br/></span>Margins will be filled with black color.</p></body></html>"))
|
||||
self.BorderBox.setText(_translate("KCC", "W/B margins"))
|
||||
self.NoRotateBox.setToolTip(_translate("KCC", "<html><head/><body><p>Disable splitting and rotation.</p></body></html>"))
|
||||
self.NoRotateBox.setText(_translate("KCC", "No split/rotate"))
|
||||
self.DeviceBox.setToolTip(_translate("KCC", "Target device."))
|
||||
self.FormatBox.setToolTip(_translate("KCC", "Output format."))
|
||||
self.ConvertButton.setText(_translate("KCC", "Convert"))
|
||||
self.DirectoryButton.setText(_translate("KCC", "Add directory"))
|
||||
self.FileButton.setText(_translate("KCC", "Add file"))
|
||||
self.ClearButton.setText(_translate("KCC", "Clear list"))
|
||||
self.MangaBox.setToolTip(_translate("KCC", "Enable right-to-left reading."))
|
||||
self.MangaBox.setText(_translate("KCC", "Manga mode"))
|
||||
self.QualityBox.setToolTip(_translate("KCC", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
|
||||
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
|
||||
"p, li { white-space: pre-wrap; }\n"
|
||||
"</style></head><body style=\" font-family:\'MS Shell Dlg 2\'; font-size:8pt; font-weight:400; font-style:normal;\">\n"
|
||||
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:600; text-decoration: underline;\">Unchecked - Normal quality mode<br /></span><span style=\" font-style:italic;\">Use it when Panel View support is not needed.</span><span style=\" font-weight:600; text-decoration: underline;\"><br /></span>- Maximum quality when zoom is not enabled.<br />- Poor quality when zoom is enabled.<br />- Lowest file size.</p>\n"
|
||||
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:600; text-decoration: underline;\">Indeterminate - High quality mode<br /></span><span style=\" font-style:italic;\">Not zoomed image </span><span style=\" font-weight:600; font-style:italic;\">might </span><span style=\" font-style:italic;\">be a little blurry.<br />Smaller images might be forcefully upscaled in this mode.</span><span style=\" font-weight:600; text-decoration: underline;\"><br /></span>- Medium/High quality when zoom is not enabled.<br />- Maximum quality when zoom is enabled.</p>\n"
|
||||
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:600; text-decoration: underline;\">Checked - Ultra quality mode<br /></span><span style=\" font-style:italic;\">Maximum possible quality.</span><span style=\" font-weight:600; text-decoration: underline;\"><br /></span>- Maximum quality when zoom is not enabled.<br />- Maximum quality when zoom is enabled.<br />- Very high file size.</p></body></html>", None))
|
||||
self.QualityBox.setText(_translate("KCC", "High/Ultra quality", None))
|
||||
self.RotateBox.setToolTip(_translate("KCC", "<html><head/><body><p>Disable splitting of two-page spreads.<br/>They will be rotated instead.</p></body></html>", None))
|
||||
self.RotateBox.setText(_translate("KCC", "Horizontal mode", None))
|
||||
self.BasicModeButton.setText(_translate("KCC", "Basic", None))
|
||||
self.AdvModeButton.setText(_translate("KCC", "Advanced", None))
|
||||
self.GammaLabel.setText(_translate("KCC", "Gamma: Auto", None))
|
||||
self.ColorBox.setToolTip(_translate("KCC", "<html><head/><body><p>Don\'t convert images to grayscale.</p></body></html>", None))
|
||||
self.ColorBox.setText(_translate("KCC", "Color mode", None))
|
||||
self.wLabel.setToolTip(_translate("KCC", "Resolution of target device.", None))
|
||||
self.wLabel.setText(_translate("KCC", "Custom width: ", None))
|
||||
self.customWidth.setToolTip(_translate("KCC", "Resolution of target device.", None))
|
||||
self.customWidth.setInputMask(_translate("KCC", "0000; ", None))
|
||||
self.hLabel.setToolTip(_translate("KCC", "Resolution of target device.", None))
|
||||
self.hLabel.setText(_translate("KCC", "Custom height: ", None))
|
||||
self.customHeight.setToolTip(_translate("KCC", "Resolution of target device.", None))
|
||||
self.customHeight.setInputMask(_translate("KCC", "0000; ", None))
|
||||
self.ActionBasic.setText(_translate("KCC", "Basic", None))
|
||||
self.ActionAdvanced.setText(_translate("KCC", "Advanced", None))
|
||||
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:600; text-decoration: underline;\">Checked - Ultra quality mode<br /></span><span style=\" font-style:italic;\">Maximum possible quality.</span><span style=\" font-weight:600; text-decoration: underline;\"><br /></span>- Maximum quality when zoom is not enabled.<br />- Maximum quality when zoom is enabled.<br />- Very high file size.</p></body></html>"))
|
||||
self.QualityBox.setText(_translate("KCC", "High/Ultra quality"))
|
||||
self.RotateBox.setToolTip(_translate("KCC", "<html><head/><body><p>Disable splitting of two-page spreads.<br/>They will be rotated instead.</p></body></html>"))
|
||||
self.RotateBox.setText(_translate("KCC", "Horizontal mode"))
|
||||
self.BasicModeButton.setText(_translate("KCC", "Basic"))
|
||||
self.AdvModeButton.setText(_translate("KCC", "Advanced"))
|
||||
self.GammaLabel.setText(_translate("KCC", "Gamma: Auto"))
|
||||
self.ColorBox.setToolTip(_translate("KCC", "<html><head/><body><p>Don\'t convert images to grayscale.</p></body></html>"))
|
||||
self.ColorBox.setText(_translate("KCC", "Color mode"))
|
||||
self.wLabel.setToolTip(_translate("KCC", "Resolution of target device."))
|
||||
self.wLabel.setText(_translate("KCC", "Custom width: "))
|
||||
self.customWidth.setToolTip(_translate("KCC", "Resolution of target device."))
|
||||
self.customWidth.setInputMask(_translate("KCC", "0000"))
|
||||
self.hLabel.setToolTip(_translate("KCC", "Resolution of target device."))
|
||||
self.hLabel.setText(_translate("KCC", "Custom height: "))
|
||||
self.customHeight.setToolTip(_translate("KCC", "Resolution of target device."))
|
||||
self.customHeight.setInputMask(_translate("KCC", "0000"))
|
||||
self.ActionBasic.setText(_translate("KCC", "Basic"))
|
||||
self.ActionAdvanced.setText(_translate("KCC", "Advanced"))
|
||||
|
||||
from . import KCC_rc
|
||||
|
||||
@@ -2,30 +2,16 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'KCC-Linux.ui'
|
||||
#
|
||||
# Created: Tue Jan 14 15:50:14 2014
|
||||
# by: PyQt4 UI code generator 4.10.3
|
||||
# Created: Wed Jan 15 11:34:18 2014
|
||||
# by: PyQt5 UI code generator 5.2
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
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)
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
class Ui_KCC(object):
|
||||
def setupUi(self, KCC):
|
||||
KCC.setObjectName(_fromUtf8("KCC"))
|
||||
KCC.setObjectName("KCC")
|
||||
KCC.resize(420, 397)
|
||||
KCC.setMinimumSize(QtCore.QSize(420, 397))
|
||||
KCC.setMaximumSize(QtCore.QSize(420, 397))
|
||||
@@ -33,306 +19,306 @@ class Ui_KCC(object):
|
||||
font.setPointSize(9)
|
||||
KCC.setFont(font)
|
||||
icon = QtGui.QIcon()
|
||||
icon.addPixmap(QtGui.QPixmap(_fromUtf8(":/Icon/icons/comic2ebook.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon.addPixmap(QtGui.QPixmap(":/Icon/icons/comic2ebook.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
KCC.setWindowIcon(icon)
|
||||
KCC.setLocale(QtCore.QLocale(QtCore.QLocale.C, QtCore.QLocale.AnyCountry))
|
||||
self.Form = QtGui.QWidget(KCC)
|
||||
self.Form.setObjectName(_fromUtf8("Form"))
|
||||
self.OptionsAdvanced = QtGui.QFrame(self.Form)
|
||||
self.Form = QtWidgets.QWidget(KCC)
|
||||
self.Form.setObjectName("Form")
|
||||
self.OptionsAdvanced = QtWidgets.QFrame(self.Form)
|
||||
self.OptionsAdvanced.setEnabled(True)
|
||||
self.OptionsAdvanced.setGeometry(QtCore.QRect(1, 254, 421, 61))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("DejaVu Sans"))
|
||||
font.setFamily("DejaVu Sans")
|
||||
font.setPointSize(9)
|
||||
self.OptionsAdvanced.setFont(font)
|
||||
self.OptionsAdvanced.setObjectName(_fromUtf8("OptionsAdvanced"))
|
||||
self.gridLayout = QtGui.QGridLayout(self.OptionsAdvanced)
|
||||
self.OptionsAdvanced.setObjectName("OptionsAdvanced")
|
||||
self.gridLayout = QtWidgets.QGridLayout(self.OptionsAdvanced)
|
||||
self.gridLayout.setContentsMargins(9, -1, -1, -1)
|
||||
self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
|
||||
self.ProcessingBox = QtGui.QCheckBox(self.OptionsAdvanced)
|
||||
self.gridLayout.setObjectName("gridLayout")
|
||||
self.ProcessingBox = QtWidgets.QCheckBox(self.OptionsAdvanced)
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("DejaVu Sans"))
|
||||
font.setFamily("DejaVu Sans")
|
||||
self.ProcessingBox.setFont(font)
|
||||
self.ProcessingBox.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.ProcessingBox.setObjectName(_fromUtf8("ProcessingBox"))
|
||||
self.ProcessingBox.setObjectName("ProcessingBox")
|
||||
self.gridLayout.addWidget(self.ProcessingBox, 1, 0, 1, 1)
|
||||
self.UpscaleBox = QtGui.QCheckBox(self.OptionsAdvanced)
|
||||
self.UpscaleBox = QtWidgets.QCheckBox(self.OptionsAdvanced)
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("DejaVu Sans"))
|
||||
font.setFamily("DejaVu Sans")
|
||||
self.UpscaleBox.setFont(font)
|
||||
self.UpscaleBox.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.UpscaleBox.setTristate(True)
|
||||
self.UpscaleBox.setObjectName(_fromUtf8("UpscaleBox"))
|
||||
self.UpscaleBox.setObjectName("UpscaleBox")
|
||||
self.gridLayout.addWidget(self.UpscaleBox, 1, 1, 1, 1)
|
||||
self.WebtoonBox = QtGui.QCheckBox(self.OptionsAdvanced)
|
||||
self.WebtoonBox = QtWidgets.QCheckBox(self.OptionsAdvanced)
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("DejaVu Sans"))
|
||||
font.setFamily("DejaVu Sans")
|
||||
self.WebtoonBox.setFont(font)
|
||||
self.WebtoonBox.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.WebtoonBox.setObjectName(_fromUtf8("WebtoonBox"))
|
||||
self.WebtoonBox.setObjectName("WebtoonBox")
|
||||
self.gridLayout.addWidget(self.WebtoonBox, 3, 1, 1, 1)
|
||||
self.NoDitheringBox = QtGui.QCheckBox(self.OptionsAdvanced)
|
||||
self.NoDitheringBox = QtWidgets.QCheckBox(self.OptionsAdvanced)
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("DejaVu Sans"))
|
||||
font.setFamily("DejaVu Sans")
|
||||
self.NoDitheringBox.setFont(font)
|
||||
self.NoDitheringBox.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.NoDitheringBox.setObjectName(_fromUtf8("NoDitheringBox"))
|
||||
self.NoDitheringBox.setObjectName("NoDitheringBox")
|
||||
self.gridLayout.addWidget(self.NoDitheringBox, 3, 2, 1, 1)
|
||||
self.BorderBox = QtGui.QCheckBox(self.OptionsAdvanced)
|
||||
self.BorderBox = QtWidgets.QCheckBox(self.OptionsAdvanced)
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("DejaVu Sans"))
|
||||
font.setFamily("DejaVu Sans")
|
||||
self.BorderBox.setFont(font)
|
||||
self.BorderBox.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.BorderBox.setTristate(True)
|
||||
self.BorderBox.setObjectName(_fromUtf8("BorderBox"))
|
||||
self.BorderBox.setObjectName("BorderBox")
|
||||
self.gridLayout.addWidget(self.BorderBox, 3, 0, 1, 1)
|
||||
self.NoRotateBox = QtGui.QCheckBox(self.OptionsAdvanced)
|
||||
self.NoRotateBox = QtWidgets.QCheckBox(self.OptionsAdvanced)
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("DejaVu Sans"))
|
||||
font.setFamily("DejaVu Sans")
|
||||
self.NoRotateBox.setFont(font)
|
||||
self.NoRotateBox.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.NoRotateBox.setObjectName(_fromUtf8("NoRotateBox"))
|
||||
self.NoRotateBox.setObjectName("NoRotateBox")
|
||||
self.gridLayout.addWidget(self.NoRotateBox, 1, 2, 1, 1)
|
||||
self.DeviceBox = QtGui.QComboBox(self.Form)
|
||||
self.DeviceBox = QtWidgets.QComboBox(self.Form)
|
||||
self.DeviceBox.setGeometry(QtCore.QRect(10, 200, 141, 31))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("DejaVu Sans"))
|
||||
font.setFamily("DejaVu Sans")
|
||||
font.setPointSize(8)
|
||||
self.DeviceBox.setFont(font)
|
||||
self.DeviceBox.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.DeviceBox.setObjectName(_fromUtf8("DeviceBox"))
|
||||
self.FormatBox = QtGui.QComboBox(self.Form)
|
||||
self.DeviceBox.setObjectName("DeviceBox")
|
||||
self.FormatBox = QtWidgets.QComboBox(self.Form)
|
||||
self.FormatBox.setGeometry(QtCore.QRect(260, 200, 151, 31))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("DejaVu Sans"))
|
||||
font.setFamily("DejaVu Sans")
|
||||
font.setPointSize(8)
|
||||
self.FormatBox.setFont(font)
|
||||
self.FormatBox.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.FormatBox.setObjectName(_fromUtf8("FormatBox"))
|
||||
self.ConvertButton = QtGui.QPushButton(self.Form)
|
||||
self.FormatBox.setObjectName("FormatBox")
|
||||
self.ConvertButton = QtWidgets.QPushButton(self.Form)
|
||||
self.ConvertButton.setGeometry(QtCore.QRect(160, 200, 91, 32))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("DejaVu Sans"))
|
||||
font.setFamily("DejaVu Sans")
|
||||
font.setPointSize(9)
|
||||
font.setBold(True)
|
||||
font.setWeight(75)
|
||||
self.ConvertButton.setFont(font)
|
||||
self.ConvertButton.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
icon1 = QtGui.QIcon()
|
||||
icon1.addPixmap(QtGui.QPixmap(_fromUtf8(":/Other/icons/convert.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon1.addPixmap(QtGui.QPixmap(":/Other/icons/convert.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.ConvertButton.setIcon(icon1)
|
||||
self.ConvertButton.setObjectName(_fromUtf8("ConvertButton"))
|
||||
self.DirectoryButton = QtGui.QPushButton(self.Form)
|
||||
self.ConvertButton.setObjectName("ConvertButton")
|
||||
self.DirectoryButton = QtWidgets.QPushButton(self.Form)
|
||||
self.DirectoryButton.setGeometry(QtCore.QRect(10, 160, 141, 32))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("DejaVu Sans"))
|
||||
font.setFamily("DejaVu Sans")
|
||||
font.setPointSize(8)
|
||||
self.DirectoryButton.setFont(font)
|
||||
self.DirectoryButton.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
icon2 = QtGui.QIcon()
|
||||
icon2.addPixmap(QtGui.QPixmap(_fromUtf8(":/Other/icons/folder_new.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon2.addPixmap(QtGui.QPixmap(":/Other/icons/folder_new.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.DirectoryButton.setIcon(icon2)
|
||||
self.DirectoryButton.setObjectName(_fromUtf8("DirectoryButton"))
|
||||
self.FileButton = QtGui.QPushButton(self.Form)
|
||||
self.DirectoryButton.setObjectName("DirectoryButton")
|
||||
self.FileButton = QtWidgets.QPushButton(self.Form)
|
||||
self.FileButton.setGeometry(QtCore.QRect(260, 160, 151, 32))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("DejaVu Sans"))
|
||||
font.setFamily("DejaVu Sans")
|
||||
font.setPointSize(8)
|
||||
self.FileButton.setFont(font)
|
||||
self.FileButton.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
icon3 = QtGui.QIcon()
|
||||
icon3.addPixmap(QtGui.QPixmap(_fromUtf8(":/Other/icons/document_new.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon3.addPixmap(QtGui.QPixmap(":/Other/icons/document_new.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.FileButton.setIcon(icon3)
|
||||
self.FileButton.setObjectName(_fromUtf8("FileButton"))
|
||||
self.ClearButton = QtGui.QPushButton(self.Form)
|
||||
self.FileButton.setObjectName("FileButton")
|
||||
self.ClearButton = QtWidgets.QPushButton(self.Form)
|
||||
self.ClearButton.setGeometry(QtCore.QRect(160, 160, 91, 32))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("DejaVu Sans"))
|
||||
font.setFamily("DejaVu Sans")
|
||||
font.setPointSize(8)
|
||||
self.ClearButton.setFont(font)
|
||||
self.ClearButton.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
icon4 = QtGui.QIcon()
|
||||
icon4.addPixmap(QtGui.QPixmap(_fromUtf8(":/Other/icons/clear.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon4.addPixmap(QtGui.QPixmap(":/Other/icons/clear.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.ClearButton.setIcon(icon4)
|
||||
self.ClearButton.setObjectName(_fromUtf8("ClearButton"))
|
||||
self.OptionsBasic = QtGui.QFrame(self.Form)
|
||||
self.ClearButton.setObjectName("ClearButton")
|
||||
self.OptionsBasic = QtWidgets.QFrame(self.Form)
|
||||
self.OptionsBasic.setGeometry(QtCore.QRect(1, 230, 421, 41))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("DejaVu Sans"))
|
||||
font.setFamily("DejaVu Sans")
|
||||
font.setPointSize(9)
|
||||
self.OptionsBasic.setFont(font)
|
||||
self.OptionsBasic.setObjectName(_fromUtf8("OptionsBasic"))
|
||||
self.MangaBox = QtGui.QCheckBox(self.OptionsBasic)
|
||||
self.OptionsBasic.setObjectName("OptionsBasic")
|
||||
self.MangaBox = QtWidgets.QCheckBox(self.OptionsBasic)
|
||||
self.MangaBox.setGeometry(QtCore.QRect(9, 10, 130, 18))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("DejaVu Sans"))
|
||||
font.setFamily("DejaVu Sans")
|
||||
self.MangaBox.setFont(font)
|
||||
self.MangaBox.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.MangaBox.setObjectName(_fromUtf8("MangaBox"))
|
||||
self.QualityBox = QtGui.QCheckBox(self.OptionsBasic)
|
||||
self.MangaBox.setObjectName("MangaBox")
|
||||
self.QualityBox = QtWidgets.QCheckBox(self.OptionsBasic)
|
||||
self.QualityBox.setGeometry(QtCore.QRect(282, 10, 135, 18))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("DejaVu Sans"))
|
||||
font.setFamily("DejaVu Sans")
|
||||
self.QualityBox.setFont(font)
|
||||
self.QualityBox.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.QualityBox.setTristate(True)
|
||||
self.QualityBox.setObjectName(_fromUtf8("QualityBox"))
|
||||
self.RotateBox = QtGui.QCheckBox(self.OptionsBasic)
|
||||
self.QualityBox.setObjectName("QualityBox")
|
||||
self.RotateBox = QtWidgets.QCheckBox(self.OptionsBasic)
|
||||
self.RotateBox.setGeometry(QtCore.QRect(145, 10, 130, 18))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("DejaVu Sans"))
|
||||
font.setFamily("DejaVu Sans")
|
||||
self.RotateBox.setFont(font)
|
||||
self.RotateBox.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.RotateBox.setObjectName(_fromUtf8("RotateBox"))
|
||||
self.JobList = QtGui.QListWidget(self.Form)
|
||||
self.RotateBox.setObjectName("RotateBox")
|
||||
self.JobList = QtWidgets.QListWidget(self.Form)
|
||||
self.JobList.setGeometry(QtCore.QRect(10, 50, 401, 101))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("DejaVu Sans"))
|
||||
font.setFamily("DejaVu Sans")
|
||||
font.setPointSize(8)
|
||||
font.setItalic(False)
|
||||
self.JobList.setFont(font)
|
||||
self.JobList.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.JobList.setStyleSheet(_fromUtf8("QListWidget#JobList {background:#ffffff;background-image:url(:/Other/icons/list_background.png);background-position:center center;background-repeat:no-repeat;}QScrollBar:vertical{border:1px solid #999;background:#FFF;width:5px;margin:0}QScrollBar::handle:vertical{background:DarkGray;min-height:0}QScrollBar::add-line:vertical{height:0;background:DarkGray;subcontrol-position:bottom;subcontrol-origin:margin}QScrollBar::sub-line:vertical{height:0;background:DarkGray;subcontrol-position:top;subcontrol-origin:margin}QScrollBar:horizontal{border:1px solid #999;background:#FFF;height:5px;margin:0}QScrollBar::handle:horizontal{background:DarkGray;min-width:0}QScrollBar::add-line:horizontal{width:0;background:DarkGray;subcontrol-position:bottom;subcontrol-origin:margin}QScrollBar::sub-line:horizontal{width:0;background:DarkGray;subcontrol-position:top;subcontrol-origin:margin}"))
|
||||
self.JobList.setStyleSheet("QListWidget#JobList {background:#ffffff;background-image:url(:/Other/icons/list_background.png);background-position:center center;background-repeat:no-repeat;}QScrollBar:vertical{border:1px solid #999;background:#FFF;width:5px;margin:0}QScrollBar::handle:vertical{background:DarkGray;min-height:0}QScrollBar::add-line:vertical{height:0;background:DarkGray;subcontrol-position:bottom;subcontrol-origin:margin}QScrollBar::sub-line:vertical{height:0;background:DarkGray;subcontrol-position:top;subcontrol-origin:margin}QScrollBar:horizontal{border:1px solid #999;background:#FFF;height:5px;margin:0}QScrollBar::handle:horizontal{background:DarkGray;min-width:0}QScrollBar::add-line:horizontal{width:0;background:DarkGray;subcontrol-position:bottom;subcontrol-origin:margin}QScrollBar::sub-line:horizontal{width:0;background:DarkGray;subcontrol-position:top;subcontrol-origin:margin}")
|
||||
self.JobList.setProperty("showDropIndicator", False)
|
||||
self.JobList.setSelectionMode(QtGui.QAbstractItemView.NoSelection)
|
||||
self.JobList.setSelectionMode(QtWidgets.QAbstractItemView.NoSelection)
|
||||
self.JobList.setIconSize(QtCore.QSize(18, 18))
|
||||
self.JobList.setVerticalScrollMode(QtGui.QAbstractItemView.ScrollPerPixel)
|
||||
self.JobList.setHorizontalScrollMode(QtGui.QAbstractItemView.ScrollPerPixel)
|
||||
self.JobList.setObjectName(_fromUtf8("JobList"))
|
||||
self.BasicModeButton = QtGui.QPushButton(self.Form)
|
||||
self.JobList.setVerticalScrollMode(QtWidgets.QAbstractItemView.ScrollPerPixel)
|
||||
self.JobList.setHorizontalScrollMode(QtWidgets.QAbstractItemView.ScrollPerPixel)
|
||||
self.JobList.setObjectName("JobList")
|
||||
self.BasicModeButton = QtWidgets.QPushButton(self.Form)
|
||||
self.BasicModeButton.setGeometry(QtCore.QRect(10, 10, 195, 32))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("DejaVu Sans"))
|
||||
font.setFamily("DejaVu Sans")
|
||||
font.setPointSize(9)
|
||||
self.BasicModeButton.setFont(font)
|
||||
self.BasicModeButton.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.BasicModeButton.setObjectName(_fromUtf8("BasicModeButton"))
|
||||
self.AdvModeButton = QtGui.QPushButton(self.Form)
|
||||
self.BasicModeButton.setObjectName("BasicModeButton")
|
||||
self.AdvModeButton = QtWidgets.QPushButton(self.Form)
|
||||
self.AdvModeButton.setGeometry(QtCore.QRect(217, 10, 195, 32))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("DejaVu Sans"))
|
||||
font.setFamily("DejaVu Sans")
|
||||
font.setPointSize(9)
|
||||
self.AdvModeButton.setFont(font)
|
||||
self.AdvModeButton.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.AdvModeButton.setObjectName(_fromUtf8("AdvModeButton"))
|
||||
self.OptionsAdvancedGamma = QtGui.QFrame(self.Form)
|
||||
self.AdvModeButton.setObjectName("AdvModeButton")
|
||||
self.OptionsAdvancedGamma = QtWidgets.QFrame(self.Form)
|
||||
self.OptionsAdvancedGamma.setEnabled(True)
|
||||
self.OptionsAdvancedGamma.setGeometry(QtCore.QRect(10, 305, 401, 41))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("DejaVu Sans"))
|
||||
font.setFamily("DejaVu Sans")
|
||||
font.setPointSize(9)
|
||||
self.OptionsAdvancedGamma.setFont(font)
|
||||
self.OptionsAdvancedGamma.setObjectName(_fromUtf8("OptionsAdvancedGamma"))
|
||||
self.GammaLabel = QtGui.QLabel(self.OptionsAdvancedGamma)
|
||||
self.OptionsAdvancedGamma.setObjectName("OptionsAdvancedGamma")
|
||||
self.GammaLabel = QtWidgets.QLabel(self.OptionsAdvancedGamma)
|
||||
self.GammaLabel.setGeometry(QtCore.QRect(15, 0, 100, 40))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("DejaVu Sans"))
|
||||
font.setFamily("DejaVu Sans")
|
||||
self.GammaLabel.setFont(font)
|
||||
self.GammaLabel.setObjectName(_fromUtf8("GammaLabel"))
|
||||
self.GammaSlider = QtGui.QSlider(self.OptionsAdvancedGamma)
|
||||
self.GammaLabel.setObjectName("GammaLabel")
|
||||
self.GammaSlider = QtWidgets.QSlider(self.OptionsAdvancedGamma)
|
||||
self.GammaSlider.setGeometry(QtCore.QRect(110, 10, 275, 22))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("DejaVu Sans"))
|
||||
font.setFamily("DejaVu Sans")
|
||||
self.GammaSlider.setFont(font)
|
||||
self.GammaSlider.setFocusPolicy(QtCore.Qt.ClickFocus)
|
||||
self.GammaSlider.setMaximum(500)
|
||||
self.GammaSlider.setSingleStep(5)
|
||||
self.GammaSlider.setOrientation(QtCore.Qt.Horizontal)
|
||||
self.GammaSlider.setObjectName(_fromUtf8("GammaSlider"))
|
||||
self.ProgressBar = QtGui.QProgressBar(self.Form)
|
||||
self.GammaSlider.setObjectName("GammaSlider")
|
||||
self.ProgressBar = QtWidgets.QProgressBar(self.Form)
|
||||
self.ProgressBar.setGeometry(QtCore.QRect(10, 10, 401, 31))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("DejaVu Sans"))
|
||||
font.setFamily("DejaVu Sans")
|
||||
font.setPointSize(10)
|
||||
font.setBold(True)
|
||||
font.setWeight(75)
|
||||
self.ProgressBar.setFont(font)
|
||||
self.ProgressBar.setProperty("value", 0)
|
||||
self.ProgressBar.setAlignment(QtCore.Qt.AlignJustify|QtCore.Qt.AlignVCenter)
|
||||
self.ProgressBar.setFormat(_fromUtf8(""))
|
||||
self.ProgressBar.setObjectName(_fromUtf8("ProgressBar"))
|
||||
self.OptionsExpert = QtGui.QFrame(self.Form)
|
||||
self.ProgressBar.setFormat("")
|
||||
self.ProgressBar.setObjectName("ProgressBar")
|
||||
self.OptionsExpert = QtWidgets.QFrame(self.Form)
|
||||
self.OptionsExpert.setGeometry(QtCore.QRect(1, 337, 421, 41))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("DejaVu Sans"))
|
||||
font.setFamily("DejaVu Sans")
|
||||
font.setPointSize(9)
|
||||
self.OptionsExpert.setFont(font)
|
||||
self.OptionsExpert.setObjectName(_fromUtf8("OptionsExpert"))
|
||||
self.ColorBox = QtGui.QCheckBox(self.OptionsExpert)
|
||||
self.OptionsExpert.setObjectName("OptionsExpert")
|
||||
self.ColorBox = QtWidgets.QCheckBox(self.OptionsExpert)
|
||||
self.ColorBox.setGeometry(QtCore.QRect(9, 11, 130, 18))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("DejaVu Sans"))
|
||||
font.setFamily("DejaVu Sans")
|
||||
self.ColorBox.setFont(font)
|
||||
self.ColorBox.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.ColorBox.setObjectName(_fromUtf8("ColorBox"))
|
||||
self.OptionsExpertInternal = QtGui.QFrame(self.OptionsExpert)
|
||||
self.ColorBox.setObjectName("ColorBox")
|
||||
self.OptionsExpertInternal = QtWidgets.QFrame(self.OptionsExpert)
|
||||
self.OptionsExpertInternal.setGeometry(QtCore.QRect(105, 0, 295, 40))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("DejaVu Sans"))
|
||||
font.setFamily("DejaVu Sans")
|
||||
self.OptionsExpertInternal.setFont(font)
|
||||
self.OptionsExpertInternal.setObjectName(_fromUtf8("OptionsExpertInternal"))
|
||||
self.gridLayout_2 = QtGui.QGridLayout(self.OptionsExpertInternal)
|
||||
self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
|
||||
self.wLabel = QtGui.QLabel(self.OptionsExpertInternal)
|
||||
self.OptionsExpertInternal.setObjectName("OptionsExpertInternal")
|
||||
self.gridLayout_2 = QtWidgets.QGridLayout(self.OptionsExpertInternal)
|
||||
self.gridLayout_2.setObjectName("gridLayout_2")
|
||||
self.wLabel = QtWidgets.QLabel(self.OptionsExpertInternal)
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("DejaVu Sans"))
|
||||
font.setFamily("DejaVu Sans")
|
||||
self.wLabel.setFont(font)
|
||||
self.wLabel.setObjectName(_fromUtf8("wLabel"))
|
||||
self.wLabel.setObjectName("wLabel")
|
||||
self.gridLayout_2.addWidget(self.wLabel, 0, 0, 1, 1)
|
||||
self.customWidth = QtGui.QLineEdit(self.OptionsExpertInternal)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
|
||||
self.customWidth = QtWidgets.QLineEdit(self.OptionsExpertInternal)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.customWidth.sizePolicy().hasHeightForWidth())
|
||||
self.customWidth.setSizePolicy(sizePolicy)
|
||||
self.customWidth.setMaximumSize(QtCore.QSize(40, 16777215))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("DejaVu Sans"))
|
||||
font.setFamily("DejaVu Sans")
|
||||
self.customWidth.setFont(font)
|
||||
self.customWidth.setFocusPolicy(QtCore.Qt.ClickFocus)
|
||||
self.customWidth.setAcceptDrops(False)
|
||||
self.customWidth.setMaxLength(4)
|
||||
self.customWidth.setObjectName(_fromUtf8("customWidth"))
|
||||
self.customWidth.setObjectName("customWidth")
|
||||
self.gridLayout_2.addWidget(self.customWidth, 0, 1, 1, 1)
|
||||
self.hLabel = QtGui.QLabel(self.OptionsExpertInternal)
|
||||
self.hLabel = QtWidgets.QLabel(self.OptionsExpertInternal)
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("DejaVu Sans"))
|
||||
font.setFamily("DejaVu Sans")
|
||||
self.hLabel.setFont(font)
|
||||
self.hLabel.setObjectName(_fromUtf8("hLabel"))
|
||||
self.hLabel.setObjectName("hLabel")
|
||||
self.gridLayout_2.addWidget(self.hLabel, 0, 2, 1, 1)
|
||||
self.customHeight = QtGui.QLineEdit(self.OptionsExpertInternal)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
|
||||
self.customHeight = QtWidgets.QLineEdit(self.OptionsExpertInternal)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.customHeight.sizePolicy().hasHeightForWidth())
|
||||
self.customHeight.setSizePolicy(sizePolicy)
|
||||
self.customHeight.setMaximumSize(QtCore.QSize(40, 16777215))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("DejaVu Sans"))
|
||||
font.setFamily("DejaVu Sans")
|
||||
self.customHeight.setFont(font)
|
||||
self.customHeight.setFocusPolicy(QtCore.Qt.ClickFocus)
|
||||
self.customHeight.setAcceptDrops(False)
|
||||
self.customHeight.setMaxLength(4)
|
||||
self.customHeight.setObjectName(_fromUtf8("customHeight"))
|
||||
self.customHeight.setObjectName("customHeight")
|
||||
self.gridLayout_2.addWidget(self.customHeight, 0, 3, 1, 1)
|
||||
KCC.setCentralWidget(self.Form)
|
||||
self.statusBar = QtGui.QStatusBar(KCC)
|
||||
self.statusBar = QtWidgets.QStatusBar(KCC)
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("DejaVu Sans"))
|
||||
font.setFamily("DejaVu Sans")
|
||||
font.setPointSize(8)
|
||||
self.statusBar.setFont(font)
|
||||
self.statusBar.setSizeGripEnabled(False)
|
||||
self.statusBar.setObjectName(_fromUtf8("statusBar"))
|
||||
self.statusBar.setObjectName("statusBar")
|
||||
KCC.setStatusBar(self.statusBar)
|
||||
self.ActionBasic = QtGui.QAction(KCC)
|
||||
self.ActionBasic = QtWidgets.QAction(KCC)
|
||||
self.ActionBasic.setCheckable(True)
|
||||
self.ActionBasic.setChecked(False)
|
||||
font = QtGui.QFont()
|
||||
self.ActionBasic.setFont(font)
|
||||
self.ActionBasic.setObjectName(_fromUtf8("ActionBasic"))
|
||||
self.ActionAdvanced = QtGui.QAction(KCC)
|
||||
self.ActionBasic.setObjectName("ActionBasic")
|
||||
self.ActionAdvanced = QtWidgets.QAction(KCC)
|
||||
self.ActionAdvanced.setCheckable(True)
|
||||
self.ActionAdvanced.setObjectName(_fromUtf8("ActionAdvanced"))
|
||||
self.ActionAdvanced.setObjectName("ActionAdvanced")
|
||||
|
||||
self.retranslateUi(KCC)
|
||||
QtCore.QMetaObject.connectSlotsByName(KCC)
|
||||
@@ -341,51 +327,52 @@ class Ui_KCC(object):
|
||||
KCC.setTabOrder(self.ConvertButton, self.ClearButton)
|
||||
|
||||
def retranslateUi(self, KCC):
|
||||
KCC.setWindowTitle(_translate("KCC", "Kindle Comic Converter", None))
|
||||
self.ProcessingBox.setToolTip(_translate("KCC", "Disable image optimizations.", None))
|
||||
self.ProcessingBox.setText(_translate("KCC", "No optimisation", None))
|
||||
self.UpscaleBox.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-weight:600; text-decoration: underline;\">Unchecked - Nothing<br/></span>Images smaller than device resolution will not be resized.</p><p><span style=\" font-weight:600; text-decoration: underline;\">Indeterminate - Stretching<br/></span>Images smaller than device resolution will be resized. Aspect ratio will be not preserved.</p><p><span style=\" font-weight:600; text-decoration: underline;\">Checked - Upscaling<br/></span>Images smaller than device resolution will be resized. Aspect ratio will be preserved.</p></body></html>", None))
|
||||
self.UpscaleBox.setText(_translate("KCC", "Stretch/Upscale", None))
|
||||
self.WebtoonBox.setToolTip(_translate("KCC", "<html><head/><body><p>Enable auto-splitting of webtoons like <span style=\" font-style:italic;\">Tower of God</span> or <span style=\" font-style:italic;\">Noblesse</span>.<br/>Pages with a low width, high height and vertical panel flow.</p></body></html>", None))
|
||||
self.WebtoonBox.setText(_translate("KCC", "Webtoon mode", None))
|
||||
self.NoDitheringBox.setToolTip(_translate("KCC", "<html><head/><body><p>Create PNG files instead JPEG.<br/>Quality increase is not noticeable on most of devices.<br/>Output files <span style=\" font-weight:600;\">might</span> be smaller.<br/><span style=\" font-weight:600;\">MOBI conversion will be much slower.</span></p></body></html>", None))
|
||||
self.NoDitheringBox.setText(_translate("KCC", "PNG output", None))
|
||||
self.BorderBox.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-weight:600; text-decoration: underline;\">Unchecked - Autodetection<br/></span>Color of margins fill will be detected automatically.</p><p><span style=\" font-weight:600; text-decoration: underline;\">Indeterminate - White<br/></span>Margins will be filled with white color.</p><p><span style=\" font-weight:600; text-decoration: underline;\">Checked - Black<br/></span>Margins will be filled with black color.</p></body></html>", None))
|
||||
self.BorderBox.setText(_translate("KCC", "W/B margins", None))
|
||||
self.NoRotateBox.setToolTip(_translate("KCC", "<html><head/><body><p>Disable splitting and rotation.</p></body></html>", None))
|
||||
self.NoRotateBox.setText(_translate("KCC", "No split/rotate", None))
|
||||
self.DeviceBox.setToolTip(_translate("KCC", "Target device.", None))
|
||||
self.FormatBox.setToolTip(_translate("KCC", "Output format.", None))
|
||||
self.ConvertButton.setText(_translate("KCC", "Convert", None))
|
||||
self.DirectoryButton.setText(_translate("KCC", "Add directory", None))
|
||||
self.FileButton.setText(_translate("KCC", "Add file", None))
|
||||
self.ClearButton.setText(_translate("KCC", "Clear list", None))
|
||||
self.MangaBox.setToolTip(_translate("KCC", "Enable right-to-left reading.", None))
|
||||
self.MangaBox.setText(_translate("KCC", "Manga mode", None))
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
KCC.setWindowTitle(_translate("KCC", "Kindle Comic Converter"))
|
||||
self.ProcessingBox.setToolTip(_translate("KCC", "Disable image optimizations."))
|
||||
self.ProcessingBox.setText(_translate("KCC", "No optimisation"))
|
||||
self.UpscaleBox.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-weight:600; text-decoration: underline;\">Unchecked - Nothing<br/></span>Images smaller than device resolution will not be resized.</p><p><span style=\" font-weight:600; text-decoration: underline;\">Indeterminate - Stretching<br/></span>Images smaller than device resolution will be resized. Aspect ratio will be not preserved.</p><p><span style=\" font-weight:600; text-decoration: underline;\">Checked - Upscaling<br/></span>Images smaller than device resolution will be resized. Aspect ratio will be preserved.</p></body></html>"))
|
||||
self.UpscaleBox.setText(_translate("KCC", "Stretch/Upscale"))
|
||||
self.WebtoonBox.setToolTip(_translate("KCC", "<html><head/><body><p>Enable auto-splitting of webtoons like <span style=\" font-style:italic;\">Tower of God</span> or <span style=\" font-style:italic;\">Noblesse</span>.<br/>Pages with a low width, high height and vertical panel flow.</p></body></html>"))
|
||||
self.WebtoonBox.setText(_translate("KCC", "Webtoon mode"))
|
||||
self.NoDitheringBox.setToolTip(_translate("KCC", "<html><head/><body><p>Create PNG files instead JPEG.<br/>Quality increase is not noticeable on most of devices.<br/>Output files <span style=\" font-weight:600;\">might</span> be smaller.<br/><span style=\" font-weight:600;\">MOBI conversion will be much slower.</span></p></body></html>"))
|
||||
self.NoDitheringBox.setText(_translate("KCC", "PNG output"))
|
||||
self.BorderBox.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-weight:600; text-decoration: underline;\">Unchecked - Autodetection<br/></span>Color of margins fill will be detected automatically.</p><p><span style=\" font-weight:600; text-decoration: underline;\">Indeterminate - White<br/></span>Margins will be filled with white color.</p><p><span style=\" font-weight:600; text-decoration: underline;\">Checked - Black<br/></span>Margins will be filled with black color.</p></body></html>"))
|
||||
self.BorderBox.setText(_translate("KCC", "W/B margins"))
|
||||
self.NoRotateBox.setToolTip(_translate("KCC", "<html><head/><body><p>Disable splitting and rotation.</p></body></html>"))
|
||||
self.NoRotateBox.setText(_translate("KCC", "No split/rotate"))
|
||||
self.DeviceBox.setToolTip(_translate("KCC", "Target device."))
|
||||
self.FormatBox.setToolTip(_translate("KCC", "Output format."))
|
||||
self.ConvertButton.setText(_translate("KCC", "Convert"))
|
||||
self.DirectoryButton.setText(_translate("KCC", "Add directory"))
|
||||
self.FileButton.setText(_translate("KCC", "Add file"))
|
||||
self.ClearButton.setText(_translate("KCC", "Clear list"))
|
||||
self.MangaBox.setToolTip(_translate("KCC", "Enable right-to-left reading."))
|
||||
self.MangaBox.setText(_translate("KCC", "Manga mode"))
|
||||
self.QualityBox.setToolTip(_translate("KCC", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
|
||||
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
|
||||
"p, li { white-space: pre-wrap; }\n"
|
||||
"</style></head><body style=\" font-family:\'Sans\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
|
||||
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\'; font-weight:600; text-decoration: underline;\">Unchecked - Normal quality mode<br /></span><span style=\" font-family:\'MS Shell Dlg 2\'; font-style:italic;\">Use it when Panel View support is not needed.</span><span style=\" font-family:\'MS Shell Dlg 2\'; font-weight:600; text-decoration: underline;\"><br /></span><span style=\" font-family:\'MS Shell Dlg 2\';\">- Maximum quality when zoom is not enabled.<br />- Poor quality when zoom is enabled.<br />- Lowest file size.</span></p>\n"
|
||||
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\'; font-weight:600; text-decoration: underline;\">Indeterminate - High quality mode<br /></span><span style=\" font-family:\'MS Shell Dlg 2\'; font-style:italic;\">Not zoomed image </span><span style=\" font-family:\'MS Shell Dlg 2\'; font-weight:600; font-style:italic;\">might </span><span style=\" font-family:\'MS Shell Dlg 2\'; font-style:italic;\">be a little blurry.<br /></span><span style=\" font-family:\'MS Shell Dlg 2\'; font-style:italic;\">Smaller images might be forcefully upscaled in this mode.</span><span style=\" font-family:\'MS Shell Dlg 2\'; font-weight:600; text-decoration: underline;\"><br /></span><span style=\" font-family:\'MS Shell Dlg 2\';\">- Medium/High quality when zoom is not enabled.<br />- Maximum quality when zoom is enabled.</span></p>\n"
|
||||
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\'; font-weight:600; text-decoration: underline;\">Checked - Ultra quality mode<br /></span><span style=\" font-family:\'MS Shell Dlg 2\'; font-style:italic;\">Maximum possible quality.</span><span style=\" font-family:\'MS Shell Dlg 2\'; font-weight:600; text-decoration: underline;\"><br /></span><span style=\" font-family:\'MS Shell Dlg 2\';\">- Maximum quality when zoom is not enabled.<br />- Maximum quality when zoom is enabled.<br />- Very high file size.</span></p></body></html>", None))
|
||||
self.QualityBox.setText(_translate("KCC", "High/Ultra quality", None))
|
||||
self.RotateBox.setToolTip(_translate("KCC", "<html><head/><body><p>Disable splitting of two-page spreads.<br/>They will be rotated instead.</p></body></html>", None))
|
||||
self.RotateBox.setText(_translate("KCC", "Horizontal mode", None))
|
||||
self.BasicModeButton.setText(_translate("KCC", "Basic", None))
|
||||
self.AdvModeButton.setText(_translate("KCC", "Advanced", None))
|
||||
self.GammaLabel.setText(_translate("KCC", "Gamma: Auto", None))
|
||||
self.ColorBox.setToolTip(_translate("KCC", "<html><head/><body><p>Don\'t convert images to grayscale.</p></body></html>", None))
|
||||
self.ColorBox.setText(_translate("KCC", "Color mode", None))
|
||||
self.wLabel.setToolTip(_translate("KCC", "Resolution of target device.", None))
|
||||
self.wLabel.setText(_translate("KCC", "Custom width: ", None))
|
||||
self.customWidth.setToolTip(_translate("KCC", "Resolution of target device.", None))
|
||||
self.customWidth.setInputMask(_translate("KCC", "0000; ", None))
|
||||
self.hLabel.setToolTip(_translate("KCC", "Resolution of target device.", None))
|
||||
self.hLabel.setText(_translate("KCC", "Custom height: ", None))
|
||||
self.customHeight.setToolTip(_translate("KCC", "Resolution of target device.", None))
|
||||
self.customHeight.setInputMask(_translate("KCC", "0000; ", None))
|
||||
self.ActionBasic.setText(_translate("KCC", "Basic", None))
|
||||
self.ActionAdvanced.setText(_translate("KCC", "Advanced", None))
|
||||
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\'; font-weight:600; text-decoration: underline;\">Checked - Ultra quality mode<br /></span><span style=\" font-family:\'MS Shell Dlg 2\'; font-style:italic;\">Maximum possible quality.</span><span style=\" font-family:\'MS Shell Dlg 2\'; font-weight:600; text-decoration: underline;\"><br /></span><span style=\" font-family:\'MS Shell Dlg 2\';\">- Maximum quality when zoom is not enabled.<br />- Maximum quality when zoom is enabled.<br />- Very high file size.</span></p></body></html>"))
|
||||
self.QualityBox.setText(_translate("KCC", "High/Ultra quality"))
|
||||
self.RotateBox.setToolTip(_translate("KCC", "<html><head/><body><p>Disable splitting of two-page spreads.<br/>They will be rotated instead.</p></body></html>"))
|
||||
self.RotateBox.setText(_translate("KCC", "Horizontal mode"))
|
||||
self.BasicModeButton.setText(_translate("KCC", "Basic"))
|
||||
self.AdvModeButton.setText(_translate("KCC", "Advanced"))
|
||||
self.GammaLabel.setText(_translate("KCC", "Gamma: Auto"))
|
||||
self.ColorBox.setToolTip(_translate("KCC", "<html><head/><body><p>Don\'t convert images to grayscale.</p></body></html>"))
|
||||
self.ColorBox.setText(_translate("KCC", "Color mode"))
|
||||
self.wLabel.setToolTip(_translate("KCC", "Resolution of target device."))
|
||||
self.wLabel.setText(_translate("KCC", "Custom width: "))
|
||||
self.customWidth.setToolTip(_translate("KCC", "Resolution of target device."))
|
||||
self.customWidth.setInputMask(_translate("KCC", "0000"))
|
||||
self.hLabel.setToolTip(_translate("KCC", "Resolution of target device."))
|
||||
self.hLabel.setText(_translate("KCC", "Custom height: "))
|
||||
self.customHeight.setToolTip(_translate("KCC", "Resolution of target device."))
|
||||
self.customHeight.setInputMask(_translate("KCC", "0000"))
|
||||
self.ActionBasic.setText(_translate("KCC", "Basic"))
|
||||
self.ActionAdvanced.setText(_translate("KCC", "Advanced"))
|
||||
|
||||
from . import KCC_rc
|
||||
import KCC_rc
|
||||
|
||||
@@ -2,30 +2,16 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'KCC-OSX.ui'
|
||||
#
|
||||
# Created: Tue Jan 14 15:50:25 2014
|
||||
# by: PyQt4 UI code generator 4.10.3
|
||||
# Created: Wed Jan 15 11:34:51 2014
|
||||
# by: PyQt5 UI code generator 5.2
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
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)
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
class Ui_KCC(object):
|
||||
def setupUi(self, KCC):
|
||||
KCC.setObjectName(_fromUtf8("KCC"))
|
||||
KCC.setObjectName("KCC")
|
||||
KCC.resize(420, 397)
|
||||
KCC.setMinimumSize(QtCore.QSize(420, 397))
|
||||
KCC.setMaximumSize(QtCore.QSize(420, 397))
|
||||
@@ -33,229 +19,229 @@ class Ui_KCC(object):
|
||||
font.setPointSize(9)
|
||||
KCC.setFont(font)
|
||||
icon = QtGui.QIcon()
|
||||
icon.addPixmap(QtGui.QPixmap(_fromUtf8(":/Icon/icons/comic2ebook.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon.addPixmap(QtGui.QPixmap(":/Icon/icons/comic2ebook.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
KCC.setWindowIcon(icon)
|
||||
KCC.setLocale(QtCore.QLocale(QtCore.QLocale.C, QtCore.QLocale.AnyCountry))
|
||||
self.Form = QtGui.QWidget(KCC)
|
||||
self.Form.setObjectName(_fromUtf8("Form"))
|
||||
self.OptionsAdvanced = QtGui.QFrame(self.Form)
|
||||
self.Form = QtWidgets.QWidget(KCC)
|
||||
self.Form.setObjectName("Form")
|
||||
self.OptionsAdvanced = QtWidgets.QFrame(self.Form)
|
||||
self.OptionsAdvanced.setEnabled(True)
|
||||
self.OptionsAdvanced.setGeometry(QtCore.QRect(4, 253, 421, 61))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("Lucida Grande"))
|
||||
font.setFamily("Lucida Grande")
|
||||
font.setPointSize(9)
|
||||
self.OptionsAdvanced.setFont(font)
|
||||
self.OptionsAdvanced.setObjectName(_fromUtf8("OptionsAdvanced"))
|
||||
self.gridLayout = QtGui.QGridLayout(self.OptionsAdvanced)
|
||||
self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
|
||||
self.ProcessingBox = QtGui.QCheckBox(self.OptionsAdvanced)
|
||||
self.OptionsAdvanced.setObjectName("OptionsAdvanced")
|
||||
self.gridLayout = QtWidgets.QGridLayout(self.OptionsAdvanced)
|
||||
self.gridLayout.setObjectName("gridLayout")
|
||||
self.ProcessingBox = QtWidgets.QCheckBox(self.OptionsAdvanced)
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("Lucida Grande"))
|
||||
font.setFamily("Lucida Grande")
|
||||
font.setPointSize(12)
|
||||
self.ProcessingBox.setFont(font)
|
||||
self.ProcessingBox.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.ProcessingBox.setObjectName(_fromUtf8("ProcessingBox"))
|
||||
self.ProcessingBox.setObjectName("ProcessingBox")
|
||||
self.gridLayout.addWidget(self.ProcessingBox, 1, 0, 1, 1)
|
||||
self.UpscaleBox = QtGui.QCheckBox(self.OptionsAdvanced)
|
||||
self.UpscaleBox = QtWidgets.QCheckBox(self.OptionsAdvanced)
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("Lucida Grande"))
|
||||
font.setFamily("Lucida Grande")
|
||||
font.setPointSize(12)
|
||||
self.UpscaleBox.setFont(font)
|
||||
self.UpscaleBox.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.UpscaleBox.setTristate(True)
|
||||
self.UpscaleBox.setObjectName(_fromUtf8("UpscaleBox"))
|
||||
self.UpscaleBox.setObjectName("UpscaleBox")
|
||||
self.gridLayout.addWidget(self.UpscaleBox, 1, 1, 1, 1)
|
||||
self.WebtoonBox = QtGui.QCheckBox(self.OptionsAdvanced)
|
||||
self.WebtoonBox = QtWidgets.QCheckBox(self.OptionsAdvanced)
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("Lucida Grande"))
|
||||
font.setFamily("Lucida Grande")
|
||||
font.setPointSize(12)
|
||||
self.WebtoonBox.setFont(font)
|
||||
self.WebtoonBox.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.WebtoonBox.setObjectName(_fromUtf8("WebtoonBox"))
|
||||
self.WebtoonBox.setObjectName("WebtoonBox")
|
||||
self.gridLayout.addWidget(self.WebtoonBox, 3, 1, 1, 1)
|
||||
self.NoDitheringBox = QtGui.QCheckBox(self.OptionsAdvanced)
|
||||
self.NoDitheringBox = QtWidgets.QCheckBox(self.OptionsAdvanced)
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("Lucida Grande"))
|
||||
font.setFamily("Lucida Grande")
|
||||
font.setPointSize(12)
|
||||
self.NoDitheringBox.setFont(font)
|
||||
self.NoDitheringBox.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.NoDitheringBox.setObjectName(_fromUtf8("NoDitheringBox"))
|
||||
self.NoDitheringBox.setObjectName("NoDitheringBox")
|
||||
self.gridLayout.addWidget(self.NoDitheringBox, 3, 2, 1, 1)
|
||||
self.BorderBox = QtGui.QCheckBox(self.OptionsAdvanced)
|
||||
self.BorderBox = QtWidgets.QCheckBox(self.OptionsAdvanced)
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("Lucida Grande"))
|
||||
font.setFamily("Lucida Grande")
|
||||
font.setPointSize(12)
|
||||
self.BorderBox.setFont(font)
|
||||
self.BorderBox.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.BorderBox.setTristate(True)
|
||||
self.BorderBox.setObjectName(_fromUtf8("BorderBox"))
|
||||
self.BorderBox.setObjectName("BorderBox")
|
||||
self.gridLayout.addWidget(self.BorderBox, 3, 0, 1, 1)
|
||||
self.NoRotateBox = QtGui.QCheckBox(self.OptionsAdvanced)
|
||||
self.NoRotateBox = QtWidgets.QCheckBox(self.OptionsAdvanced)
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("Lucida Grande"))
|
||||
font.setFamily("Lucida Grande")
|
||||
font.setPointSize(12)
|
||||
self.NoRotateBox.setFont(font)
|
||||
self.NoRotateBox.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.NoRotateBox.setObjectName(_fromUtf8("NoRotateBox"))
|
||||
self.NoRotateBox.setObjectName("NoRotateBox")
|
||||
self.gridLayout.addWidget(self.NoRotateBox, 1, 2, 1, 1)
|
||||
self.DeviceBox = QtGui.QComboBox(self.Form)
|
||||
self.DeviceBox = QtWidgets.QComboBox(self.Form)
|
||||
self.DeviceBox.setGeometry(QtCore.QRect(8, 201, 151, 34))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("Lucida Grande"))
|
||||
font.setFamily("Lucida Grande")
|
||||
font.setPointSize(11)
|
||||
self.DeviceBox.setFont(font)
|
||||
self.DeviceBox.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.DeviceBox.setObjectName(_fromUtf8("DeviceBox"))
|
||||
self.FormatBox = QtGui.QComboBox(self.Form)
|
||||
self.DeviceBox.setObjectName("DeviceBox")
|
||||
self.FormatBox = QtWidgets.QComboBox(self.Form)
|
||||
self.FormatBox.setGeometry(QtCore.QRect(262, 201, 152, 34))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("Lucida Grande"))
|
||||
font.setFamily("Lucida Grande")
|
||||
font.setPointSize(11)
|
||||
self.FormatBox.setFont(font)
|
||||
self.FormatBox.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.FormatBox.setObjectName(_fromUtf8("FormatBox"))
|
||||
self.ConvertButton = QtGui.QPushButton(self.Form)
|
||||
self.FormatBox.setObjectName("FormatBox")
|
||||
self.ConvertButton = QtWidgets.QPushButton(self.Form)
|
||||
self.ConvertButton.setGeometry(QtCore.QRect(160, 200, 101, 41))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("Lucida Grande"))
|
||||
font.setFamily("Lucida Grande")
|
||||
font.setPointSize(11)
|
||||
font.setBold(True)
|
||||
font.setWeight(75)
|
||||
self.ConvertButton.setFont(font)
|
||||
self.ConvertButton.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
icon1 = QtGui.QIcon()
|
||||
icon1.addPixmap(QtGui.QPixmap(_fromUtf8(":/Other/icons/convert.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon1.addPixmap(QtGui.QPixmap(":/Other/icons/convert.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.ConvertButton.setIcon(icon1)
|
||||
self.ConvertButton.setObjectName(_fromUtf8("ConvertButton"))
|
||||
self.DirectoryButton = QtGui.QPushButton(self.Form)
|
||||
self.ConvertButton.setObjectName("ConvertButton")
|
||||
self.DirectoryButton = QtWidgets.QPushButton(self.Form)
|
||||
self.DirectoryButton.setGeometry(QtCore.QRect(5, 160, 156, 41))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("Lucida Grande"))
|
||||
font.setFamily("Lucida Grande")
|
||||
font.setPointSize(11)
|
||||
self.DirectoryButton.setFont(font)
|
||||
self.DirectoryButton.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
icon2 = QtGui.QIcon()
|
||||
icon2.addPixmap(QtGui.QPixmap(_fromUtf8(":/Other/icons/folder_new.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon2.addPixmap(QtGui.QPixmap(":/Other/icons/folder_new.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.DirectoryButton.setIcon(icon2)
|
||||
self.DirectoryButton.setObjectName(_fromUtf8("DirectoryButton"))
|
||||
self.FileButton = QtGui.QPushButton(self.Form)
|
||||
self.DirectoryButton.setObjectName("DirectoryButton")
|
||||
self.FileButton = QtWidgets.QPushButton(self.Form)
|
||||
self.FileButton.setGeometry(QtCore.QRect(260, 160, 157, 41))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("Lucida Grande"))
|
||||
font.setFamily("Lucida Grande")
|
||||
font.setPointSize(11)
|
||||
self.FileButton.setFont(font)
|
||||
self.FileButton.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
icon3 = QtGui.QIcon()
|
||||
icon3.addPixmap(QtGui.QPixmap(_fromUtf8(":/Other/icons/document_new.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon3.addPixmap(QtGui.QPixmap(":/Other/icons/document_new.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.FileButton.setIcon(icon3)
|
||||
self.FileButton.setObjectName(_fromUtf8("FileButton"))
|
||||
self.ClearButton = QtGui.QPushButton(self.Form)
|
||||
self.FileButton.setObjectName("FileButton")
|
||||
self.ClearButton = QtWidgets.QPushButton(self.Form)
|
||||
self.ClearButton.setGeometry(QtCore.QRect(160, 160, 101, 41))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("Lucida Grande"))
|
||||
font.setFamily("Lucida Grande")
|
||||
font.setPointSize(11)
|
||||
self.ClearButton.setFont(font)
|
||||
self.ClearButton.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
icon4 = QtGui.QIcon()
|
||||
icon4.addPixmap(QtGui.QPixmap(_fromUtf8(":/Other/icons/clear.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon4.addPixmap(QtGui.QPixmap(":/Other/icons/clear.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.ClearButton.setIcon(icon4)
|
||||
self.ClearButton.setObjectName(_fromUtf8("ClearButton"))
|
||||
self.OptionsBasic = QtGui.QFrame(self.Form)
|
||||
self.ClearButton.setObjectName("ClearButton")
|
||||
self.OptionsBasic = QtWidgets.QFrame(self.Form)
|
||||
self.OptionsBasic.setGeometry(QtCore.QRect(5, 233, 421, 41))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("Lucida Grande"))
|
||||
font.setFamily("Lucida Grande")
|
||||
font.setPointSize(12)
|
||||
self.OptionsBasic.setFont(font)
|
||||
self.OptionsBasic.setObjectName(_fromUtf8("OptionsBasic"))
|
||||
self.MangaBox = QtGui.QCheckBox(self.OptionsBasic)
|
||||
self.OptionsBasic.setObjectName("OptionsBasic")
|
||||
self.MangaBox = QtWidgets.QCheckBox(self.OptionsBasic)
|
||||
self.MangaBox.setGeometry(QtCore.QRect(9, 10, 130, 18))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("Lucida Grande"))
|
||||
font.setFamily("Lucida Grande")
|
||||
font.setPointSize(12)
|
||||
self.MangaBox.setFont(font)
|
||||
self.MangaBox.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.MangaBox.setObjectName(_fromUtf8("MangaBox"))
|
||||
self.QualityBox = QtGui.QCheckBox(self.OptionsBasic)
|
||||
self.MangaBox.setObjectName("MangaBox")
|
||||
self.QualityBox = QtWidgets.QCheckBox(self.OptionsBasic)
|
||||
self.QualityBox.setGeometry(QtCore.QRect(282, 10, 135, 18))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("Lucida Grande"))
|
||||
font.setFamily("Lucida Grande")
|
||||
font.setPointSize(12)
|
||||
self.QualityBox.setFont(font)
|
||||
self.QualityBox.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.QualityBox.setTristate(True)
|
||||
self.QualityBox.setObjectName(_fromUtf8("QualityBox"))
|
||||
self.RotateBox = QtGui.QCheckBox(self.OptionsBasic)
|
||||
self.QualityBox.setObjectName("QualityBox")
|
||||
self.RotateBox = QtWidgets.QCheckBox(self.OptionsBasic)
|
||||
self.RotateBox.setGeometry(QtCore.QRect(145, 10, 130, 18))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("Lucida Grande"))
|
||||
font.setFamily("Lucida Grande")
|
||||
font.setPointSize(12)
|
||||
self.RotateBox.setFont(font)
|
||||
self.RotateBox.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.RotateBox.setObjectName(_fromUtf8("RotateBox"))
|
||||
self.JobList = QtGui.QListWidget(self.Form)
|
||||
self.RotateBox.setObjectName("RotateBox")
|
||||
self.JobList = QtWidgets.QListWidget(self.Form)
|
||||
self.JobList.setGeometry(QtCore.QRect(10, 50, 401, 101))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("Lucida Grande"))
|
||||
font.setFamily("Lucida Grande")
|
||||
font.setPointSize(11)
|
||||
self.JobList.setFont(font)
|
||||
self.JobList.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.JobList.setStyleSheet(_fromUtf8("QListWidget#JobList {background:#ffffff;background-image:url(:/Other/icons/list_background.png);background-position:center center;background-repeat:no-repeat;}QScrollBar:vertical{border:1px solid #999;background:#FFF;width:5px;margin:0}QScrollBar::handle:vertical{background:DarkGray;min-height:0}QScrollBar::add-line:vertical{height:0;background:DarkGray;subcontrol-position:bottom;subcontrol-origin:margin}QScrollBar::sub-line:vertical{height:0;background:DarkGray;subcontrol-position:top;subcontrol-origin:margin}QScrollBar:horizontal{border:1px solid #999;background:#FFF;height:5px;margin:0}QScrollBar::handle:horizontal{background:DarkGray;min-width:0}QScrollBar::add-line:horizontal{width:0;background:DarkGray;subcontrol-position:bottom;subcontrol-origin:margin}QScrollBar::sub-line:horizontal{width:0;background:DarkGray;subcontrol-position:top;subcontrol-origin:margin}"))
|
||||
self.JobList.setStyleSheet("QListWidget#JobList {background:#ffffff;background-image:url(:/Other/icons/list_background.png);background-position:center center;background-repeat:no-repeat;}QScrollBar:vertical{border:1px solid #999;background:#FFF;width:5px;margin:0}QScrollBar::handle:vertical{background:DarkGray;min-height:0}QScrollBar::add-line:vertical{height:0;background:DarkGray;subcontrol-position:bottom;subcontrol-origin:margin}QScrollBar::sub-line:vertical{height:0;background:DarkGray;subcontrol-position:top;subcontrol-origin:margin}QScrollBar:horizontal{border:1px solid #999;background:#FFF;height:5px;margin:0}QScrollBar::handle:horizontal{background:DarkGray;min-width:0}QScrollBar::add-line:horizontal{width:0;background:DarkGray;subcontrol-position:bottom;subcontrol-origin:margin}QScrollBar::sub-line:horizontal{width:0;background:DarkGray;subcontrol-position:top;subcontrol-origin:margin}")
|
||||
self.JobList.setProperty("showDropIndicator", False)
|
||||
self.JobList.setSelectionMode(QtGui.QAbstractItemView.NoSelection)
|
||||
self.JobList.setVerticalScrollMode(QtGui.QAbstractItemView.ScrollPerPixel)
|
||||
self.JobList.setHorizontalScrollMode(QtGui.QAbstractItemView.ScrollPerPixel)
|
||||
self.JobList.setObjectName(_fromUtf8("JobList"))
|
||||
self.BasicModeButton = QtGui.QPushButton(self.Form)
|
||||
self.JobList.setSelectionMode(QtWidgets.QAbstractItemView.NoSelection)
|
||||
self.JobList.setVerticalScrollMode(QtWidgets.QAbstractItemView.ScrollPerPixel)
|
||||
self.JobList.setHorizontalScrollMode(QtWidgets.QAbstractItemView.ScrollPerPixel)
|
||||
self.JobList.setObjectName("JobList")
|
||||
self.BasicModeButton = QtWidgets.QPushButton(self.Form)
|
||||
self.BasicModeButton.setGeometry(QtCore.QRect(5, 10, 210, 41))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("Lucida Grande"))
|
||||
font.setFamily("Lucida Grande")
|
||||
font.setPointSize(12)
|
||||
font.setBold(False)
|
||||
font.setWeight(50)
|
||||
self.BasicModeButton.setFont(font)
|
||||
self.BasicModeButton.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.BasicModeButton.setObjectName(_fromUtf8("BasicModeButton"))
|
||||
self.AdvModeButton = QtGui.QPushButton(self.Form)
|
||||
self.BasicModeButton.setObjectName("BasicModeButton")
|
||||
self.AdvModeButton = QtWidgets.QPushButton(self.Form)
|
||||
self.AdvModeButton.setGeometry(QtCore.QRect(207, 10, 210, 41))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("Lucida Grande"))
|
||||
font.setFamily("Lucida Grande")
|
||||
font.setPointSize(12)
|
||||
font.setBold(False)
|
||||
font.setWeight(50)
|
||||
self.AdvModeButton.setFont(font)
|
||||
self.AdvModeButton.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.AdvModeButton.setObjectName(_fromUtf8("AdvModeButton"))
|
||||
self.OptionsAdvancedGamma = QtGui.QFrame(self.Form)
|
||||
self.AdvModeButton.setObjectName("AdvModeButton")
|
||||
self.OptionsAdvancedGamma = QtWidgets.QFrame(self.Form)
|
||||
self.OptionsAdvancedGamma.setEnabled(True)
|
||||
self.OptionsAdvancedGamma.setGeometry(QtCore.QRect(5, 303, 401, 41))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("Lucida Grande"))
|
||||
font.setFamily("Lucida Grande")
|
||||
font.setPointSize(9)
|
||||
self.OptionsAdvancedGamma.setFont(font)
|
||||
self.OptionsAdvancedGamma.setObjectName(_fromUtf8("OptionsAdvancedGamma"))
|
||||
self.GammaLabel = QtGui.QLabel(self.OptionsAdvancedGamma)
|
||||
self.OptionsAdvancedGamma.setObjectName("OptionsAdvancedGamma")
|
||||
self.GammaLabel = QtWidgets.QLabel(self.OptionsAdvancedGamma)
|
||||
self.GammaLabel.setGeometry(QtCore.QRect(20, 0, 100, 40))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("Lucida Grande"))
|
||||
font.setFamily("Lucida Grande")
|
||||
font.setPointSize(12)
|
||||
font.setBold(False)
|
||||
font.setWeight(50)
|
||||
self.GammaLabel.setFont(font)
|
||||
self.GammaLabel.setObjectName(_fromUtf8("GammaLabel"))
|
||||
self.GammaSlider = QtGui.QSlider(self.OptionsAdvancedGamma)
|
||||
self.GammaLabel.setObjectName("GammaLabel")
|
||||
self.GammaSlider = QtWidgets.QSlider(self.OptionsAdvancedGamma)
|
||||
self.GammaSlider.setGeometry(QtCore.QRect(110, 10, 290, 22))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("Lucida Grande"))
|
||||
font.setFamily("Lucida Grande")
|
||||
self.GammaSlider.setFont(font)
|
||||
self.GammaSlider.setFocusPolicy(QtCore.Qt.ClickFocus)
|
||||
self.GammaSlider.setMaximum(500)
|
||||
self.GammaSlider.setSingleStep(5)
|
||||
self.GammaSlider.setOrientation(QtCore.Qt.Horizontal)
|
||||
self.GammaSlider.setObjectName(_fromUtf8("GammaSlider"))
|
||||
self.ProgressBar = QtGui.QProgressBar(self.Form)
|
||||
self.GammaSlider.setObjectName("GammaSlider")
|
||||
self.ProgressBar = QtWidgets.QProgressBar(self.Form)
|
||||
self.ProgressBar.setGeometry(QtCore.QRect(10, 10, 401, 35))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("Lucida Grande"))
|
||||
font.setFamily("Lucida Grande")
|
||||
font.setPointSize(10)
|
||||
font.setBold(True)
|
||||
font.setWeight(75)
|
||||
@@ -263,100 +249,100 @@ class Ui_KCC(object):
|
||||
self.ProgressBar.setAutoFillBackground(True)
|
||||
self.ProgressBar.setProperty("value", 0)
|
||||
self.ProgressBar.setAlignment(QtCore.Qt.AlignJustify|QtCore.Qt.AlignVCenter)
|
||||
self.ProgressBar.setFormat(_fromUtf8(""))
|
||||
self.ProgressBar.setObjectName(_fromUtf8("ProgressBar"))
|
||||
self.OptionsExpert = QtGui.QFrame(self.Form)
|
||||
self.ProgressBar.setFormat("")
|
||||
self.ProgressBar.setObjectName("ProgressBar")
|
||||
self.OptionsExpert = QtWidgets.QFrame(self.Form)
|
||||
self.OptionsExpert.setGeometry(QtCore.QRect(5, 335, 421, 41))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("Lucida Grande"))
|
||||
font.setFamily("Lucida Grande")
|
||||
font.setPointSize(9)
|
||||
self.OptionsExpert.setFont(font)
|
||||
self.OptionsExpert.setObjectName(_fromUtf8("OptionsExpert"))
|
||||
self.ColorBox = QtGui.QCheckBox(self.OptionsExpert)
|
||||
self.OptionsExpert.setObjectName("OptionsExpert")
|
||||
self.ColorBox = QtWidgets.QCheckBox(self.OptionsExpert)
|
||||
self.ColorBox.setGeometry(QtCore.QRect(9, 11, 130, 18))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("Lucida Grande"))
|
||||
font.setFamily("Lucida Grande")
|
||||
font.setPointSize(12)
|
||||
self.ColorBox.setFont(font)
|
||||
self.ColorBox.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.ColorBox.setObjectName(_fromUtf8("ColorBox"))
|
||||
self.OptionsExpertInternal = QtGui.QFrame(self.OptionsExpert)
|
||||
self.ColorBox.setObjectName("ColorBox")
|
||||
self.OptionsExpertInternal = QtWidgets.QFrame(self.OptionsExpert)
|
||||
self.OptionsExpertInternal.setGeometry(QtCore.QRect(95, 0, 315, 40))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("Lucida Grande"))
|
||||
font.setFamily("Lucida Grande")
|
||||
self.OptionsExpertInternal.setFont(font)
|
||||
self.OptionsExpertInternal.setObjectName(_fromUtf8("OptionsExpertInternal"))
|
||||
self.gridLayout_2 = QtGui.QGridLayout(self.OptionsExpertInternal)
|
||||
self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
|
||||
self.wLabel = QtGui.QLabel(self.OptionsExpertInternal)
|
||||
self.OptionsExpertInternal.setObjectName("OptionsExpertInternal")
|
||||
self.gridLayout_2 = QtWidgets.QGridLayout(self.OptionsExpertInternal)
|
||||
self.gridLayout_2.setObjectName("gridLayout_2")
|
||||
self.wLabel = QtWidgets.QLabel(self.OptionsExpertInternal)
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("Lucida Grande"))
|
||||
font.setFamily("Lucida Grande")
|
||||
font.setPointSize(12)
|
||||
font.setBold(False)
|
||||
font.setWeight(50)
|
||||
self.wLabel.setFont(font)
|
||||
self.wLabel.setObjectName(_fromUtf8("wLabel"))
|
||||
self.wLabel.setObjectName("wLabel")
|
||||
self.gridLayout_2.addWidget(self.wLabel, 0, 0, 1, 1)
|
||||
self.customWidth = QtGui.QLineEdit(self.OptionsExpertInternal)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
|
||||
self.customWidth = QtWidgets.QLineEdit(self.OptionsExpertInternal)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.customWidth.sizePolicy().hasHeightForWidth())
|
||||
self.customWidth.setSizePolicy(sizePolicy)
|
||||
self.customWidth.setMaximumSize(QtCore.QSize(45, 16777215))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("Lucida Grande"))
|
||||
font.setFamily("Lucida Grande")
|
||||
font.setPointSize(12)
|
||||
self.customWidth.setFont(font)
|
||||
self.customWidth.setFocusPolicy(QtCore.Qt.ClickFocus)
|
||||
self.customWidth.setAcceptDrops(False)
|
||||
self.customWidth.setMaxLength(4)
|
||||
self.customWidth.setObjectName(_fromUtf8("customWidth"))
|
||||
self.customWidth.setObjectName("customWidth")
|
||||
self.gridLayout_2.addWidget(self.customWidth, 0, 1, 1, 1)
|
||||
self.hLabel = QtGui.QLabel(self.OptionsExpertInternal)
|
||||
self.hLabel = QtWidgets.QLabel(self.OptionsExpertInternal)
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("Lucida Grande"))
|
||||
font.setFamily("Lucida Grande")
|
||||
font.setPointSize(12)
|
||||
font.setBold(False)
|
||||
font.setWeight(50)
|
||||
self.hLabel.setFont(font)
|
||||
self.hLabel.setObjectName(_fromUtf8("hLabel"))
|
||||
self.hLabel.setObjectName("hLabel")
|
||||
self.gridLayout_2.addWidget(self.hLabel, 0, 2, 1, 1)
|
||||
self.customHeight = QtGui.QLineEdit(self.OptionsExpertInternal)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
|
||||
self.customHeight = QtWidgets.QLineEdit(self.OptionsExpertInternal)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.customHeight.sizePolicy().hasHeightForWidth())
|
||||
self.customHeight.setSizePolicy(sizePolicy)
|
||||
self.customHeight.setMaximumSize(QtCore.QSize(45, 16777215))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("Lucida Grande"))
|
||||
font.setFamily("Lucida Grande")
|
||||
font.setPointSize(12)
|
||||
self.customHeight.setFont(font)
|
||||
self.customHeight.setFocusPolicy(QtCore.Qt.ClickFocus)
|
||||
self.customHeight.setAcceptDrops(False)
|
||||
self.customHeight.setMaxLength(4)
|
||||
self.customHeight.setObjectName(_fromUtf8("customHeight"))
|
||||
self.customHeight.setObjectName("customHeight")
|
||||
self.gridLayout_2.addWidget(self.customHeight, 0, 3, 1, 1)
|
||||
KCC.setCentralWidget(self.Form)
|
||||
self.statusBar = QtGui.QStatusBar(KCC)
|
||||
self.statusBar = QtWidgets.QStatusBar(KCC)
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("Aharoni"))
|
||||
font.setFamily("Aharoni")
|
||||
font.setPointSize(8)
|
||||
self.statusBar.setFont(font)
|
||||
self.statusBar.setSizeGripEnabled(False)
|
||||
self.statusBar.setObjectName(_fromUtf8("statusBar"))
|
||||
self.statusBar.setObjectName("statusBar")
|
||||
KCC.setStatusBar(self.statusBar)
|
||||
self.ActionBasic = QtGui.QAction(KCC)
|
||||
self.ActionBasic = QtWidgets.QAction(KCC)
|
||||
self.ActionBasic.setCheckable(True)
|
||||
self.ActionBasic.setChecked(False)
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(9)
|
||||
self.ActionBasic.setFont(font)
|
||||
self.ActionBasic.setObjectName(_fromUtf8("ActionBasic"))
|
||||
self.ActionAdvanced = QtGui.QAction(KCC)
|
||||
self.ActionBasic.setObjectName("ActionBasic")
|
||||
self.ActionAdvanced = QtWidgets.QAction(KCC)
|
||||
self.ActionAdvanced.setCheckable(True)
|
||||
self.ActionAdvanced.setObjectName(_fromUtf8("ActionAdvanced"))
|
||||
self.ActionAdvanced.setObjectName("ActionAdvanced")
|
||||
|
||||
self.retranslateUi(KCC)
|
||||
QtCore.QMetaObject.connectSlotsByName(KCC)
|
||||
@@ -365,45 +351,46 @@ class Ui_KCC(object):
|
||||
KCC.setTabOrder(self.ConvertButton, self.ClearButton)
|
||||
|
||||
def retranslateUi(self, KCC):
|
||||
KCC.setWindowTitle(_translate("KCC", "Kindle Comic Converter", None))
|
||||
self.ProcessingBox.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-size:12pt;\">Disable image optimizations.</span></p></body></html>", None))
|
||||
self.ProcessingBox.setText(_translate("KCC", "No optimisation", None))
|
||||
self.UpscaleBox.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-size:12pt; font-weight:600; text-decoration: underline;\">Unchecked - Nothing<br/></span><span style=\" font-size:12pt;\">Images smaller than device resolution will not be resized.</span></p><p><span style=\" font-size:12pt; font-weight:600; text-decoration: underline;\">Indeterminate - Stretching<br/></span><span style=\" font-size:12pt;\">Images smaller than device resolution will be resized. Aspect ratio will be not preserved.</span></p><p><span style=\" font-size:12pt; font-weight:600; text-decoration: underline;\">Checked - Upscaling<br/></span><span style=\" font-size:12pt;\">Images smaller than device resolution will be resized. Aspect ratio will be preserved.</span></p></body></html>", None))
|
||||
self.UpscaleBox.setText(_translate("KCC", "Stretch/Upscale", None))
|
||||
self.WebtoonBox.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-size:12pt;\">Enable auto-splitting of webtoons like </span><span style=\" font-size:12pt; font-style:italic;\">Tower of God</span><span style=\" font-size:12pt;\"> or </span><span style=\" font-size:12pt; font-style:italic;\">Noblesse</span><span style=\" font-size:12pt;\">.<br/>Pages with a low width, high height and vertical panel flow.</span></p></body></html>", None))
|
||||
self.WebtoonBox.setText(_translate("KCC", "Webtoon mode", None))
|
||||
self.NoDitheringBox.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-size:12pt;\">Create PNG files instead JPEG.<br/>Quality increase is not noticeable on most of devices.<br/>Output files </span><span style=\" font-size:12pt; font-weight:600;\">might</span><span style=\" font-size:12pt;\"> be smaller.<br/></span><span style=\" font-size:12pt; font-weight:600;\">MOBI conversion will be much slower.</span></p></body></html>", None))
|
||||
self.NoDitheringBox.setText(_translate("KCC", "PNG output", None))
|
||||
self.BorderBox.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-size:12pt; font-weight:600; text-decoration: underline;\">Unchecked - Autodetection<br/></span><span style=\" font-size:12pt;\">Color of margins fill will be detected automatically.</span></p><p><span style=\" font-size:12pt; font-weight:600; text-decoration: underline;\">Indeterminate - White<br/></span><span style=\" font-size:12pt;\">Margins will be filled with white color.</span></p><p><span style=\" font-size:12pt; font-weight:600; text-decoration: underline;\">Checked - Black<br/></span><span style=\" font-size:12pt;\">Margins will be filled with black color.</span></p></body></html>", None))
|
||||
self.BorderBox.setText(_translate("KCC", "W/B margins", None))
|
||||
self.NoRotateBox.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-size:12pt;\">Disable splitting and rotation.</span></p></body></html>", None))
|
||||
self.NoRotateBox.setText(_translate("KCC", "No split/rotate", None))
|
||||
self.DeviceBox.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-size:12pt;\">Target device.</span></p></body></html>", None))
|
||||
self.FormatBox.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-size:12pt;\">Output format.</span></p></body></html>", None))
|
||||
self.ConvertButton.setText(_translate("KCC", "Convert", None))
|
||||
self.DirectoryButton.setText(_translate("KCC", "Add directory", None))
|
||||
self.FileButton.setText(_translate("KCC", "Add file", None))
|
||||
self.ClearButton.setText(_translate("KCC", "Clear list", None))
|
||||
self.MangaBox.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-size:12pt;\">Enable right-to-left reading.</span></p></body></html>", None))
|
||||
self.MangaBox.setText(_translate("KCC", "Manga mode", None))
|
||||
self.QualityBox.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-size:12pt; font-weight:600; text-decoration: underline;\">Unchecked - Normal quality mode<br/></span><span style=\" font-size:12pt; font-style:italic;\">Use it when Panel View support is not needed.</span><span style=\" font-size:12pt; font-weight:600; text-decoration: underline;\"><br/></span><span style=\" font-size:12pt;\">- Maximum quality when zoom is not enabled.<br/>- Poor quality when zoom is enabled.<br/>- Lowest file size.</span></p><p><span style=\" font-size:12pt; font-weight:600; text-decoration: underline;\">Indeterminate - High quality mode<br/></span><span style=\" font-size:12pt; font-style:italic;\">Not zoomed image </span><span style=\" font-size:12pt; font-weight:600; font-style:italic;\">might </span><span style=\" font-size:12pt; font-style:italic;\">be a little blurry.<br/>Smaller images might be forcefully upscaled in this mode.</span><span style=\" font-size:12pt; font-weight:600; text-decoration: underline;\"><br/></span><span style=\" font-size:12pt;\">- Medium/High quality when zoom is not enabled.<br/>- Maximum quality when zoom is enabled.</span></p><p><span style=\" font-size:12pt; font-weight:600; text-decoration: underline;\">Checked - Ultra quality mode<br/></span><span style=\" font-size:12pt; font-style:italic;\">Maximum possible quality.</span><span style=\" font-size:12pt; font-weight:600; text-decoration: underline;\"><br/></span><span style=\" font-size:12pt;\">- Maximum quality when zoom is not enabled.<br/>- Maximum quality when zoom is enabled.<br/>- Very high file size.</span></p></body></html>", None))
|
||||
self.QualityBox.setText(_translate("KCC", "High/Ultra quality", None))
|
||||
self.RotateBox.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-size:12pt;\">Disable splitting of two-page spreads.<br/>They will be rotated instead.</span></p></body></html>", None))
|
||||
self.RotateBox.setText(_translate("KCC", "Horizontal mode", None))
|
||||
self.BasicModeButton.setText(_translate("KCC", "Basic", None))
|
||||
self.AdvModeButton.setText(_translate("KCC", "Advanced", None))
|
||||
self.GammaLabel.setText(_translate("KCC", "Gamma: Auto", None))
|
||||
self.ColorBox.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-size:12pt;\">Don\'t convert images to grayscale.</span></p></body></html>", None))
|
||||
self.ColorBox.setText(_translate("KCC", "Color mode", None))
|
||||
self.wLabel.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-size:12pt;\">Resolution of target device.</span></p></body></html>", None))
|
||||
self.wLabel.setText(_translate("KCC", "Custom width: ", None))
|
||||
self.customWidth.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-size:12pt;\">Resolution of target device.</span></p></body></html>", None))
|
||||
self.customWidth.setInputMask(_translate("KCC", "0000; ", None))
|
||||
self.hLabel.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-size:12pt;\">Resolution of target device.</span></p></body></html>", None))
|
||||
self.hLabel.setText(_translate("KCC", "Custom height: ", None))
|
||||
self.customHeight.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-size:12pt;\">Resolution of target device.</span></p></body></html>", None))
|
||||
self.customHeight.setInputMask(_translate("KCC", "0000; ", None))
|
||||
self.ActionBasic.setText(_translate("KCC", "Basic", None))
|
||||
self.ActionAdvanced.setText(_translate("KCC", "Advanced", None))
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
KCC.setWindowTitle(_translate("KCC", "Kindle Comic Converter"))
|
||||
self.ProcessingBox.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-size:12pt;\">Disable image optimizations.</span></p></body></html>"))
|
||||
self.ProcessingBox.setText(_translate("KCC", "No optimisation"))
|
||||
self.UpscaleBox.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-size:12pt; font-weight:600; text-decoration: underline;\">Unchecked - Nothing<br/></span><span style=\" font-size:12pt;\">Images smaller than device resolution will not be resized.</span></p><p><span style=\" font-size:12pt; font-weight:600; text-decoration: underline;\">Indeterminate - Stretching<br/></span><span style=\" font-size:12pt;\">Images smaller than device resolution will be resized. Aspect ratio will be not preserved.</span></p><p><span style=\" font-size:12pt; font-weight:600; text-decoration: underline;\">Checked - Upscaling<br/></span><span style=\" font-size:12pt;\">Images smaller than device resolution will be resized. Aspect ratio will be preserved.</span></p></body></html>"))
|
||||
self.UpscaleBox.setText(_translate("KCC", "Stretch/Upscale"))
|
||||
self.WebtoonBox.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-size:12pt;\">Enable auto-splitting of webtoons like </span><span style=\" font-size:12pt; font-style:italic;\">Tower of God</span><span style=\" font-size:12pt;\"> or </span><span style=\" font-size:12pt; font-style:italic;\">Noblesse</span><span style=\" font-size:12pt;\">.<br/>Pages with a low width, high height and vertical panel flow.</span></p></body></html>"))
|
||||
self.WebtoonBox.setText(_translate("KCC", "Webtoon mode"))
|
||||
self.NoDitheringBox.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-size:12pt;\">Create PNG files instead JPEG.<br/>Quality increase is not noticeable on most of devices.<br/>Output files </span><span style=\" font-size:12pt; font-weight:600;\">might</span><span style=\" font-size:12pt;\"> be smaller.<br/></span><span style=\" font-size:12pt; font-weight:600;\">MOBI conversion will be much slower.</span></p></body></html>"))
|
||||
self.NoDitheringBox.setText(_translate("KCC", "PNG output"))
|
||||
self.BorderBox.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-size:12pt; font-weight:600; text-decoration: underline;\">Unchecked - Autodetection<br/></span><span style=\" font-size:12pt;\">Color of margins fill will be detected automatically.</span></p><p><span style=\" font-size:12pt; font-weight:600; text-decoration: underline;\">Indeterminate - White<br/></span><span style=\" font-size:12pt;\">Margins will be filled with white color.</span></p><p><span style=\" font-size:12pt; font-weight:600; text-decoration: underline;\">Checked - Black<br/></span><span style=\" font-size:12pt;\">Margins will be filled with black color.</span></p></body></html>"))
|
||||
self.BorderBox.setText(_translate("KCC", "W/B margins"))
|
||||
self.NoRotateBox.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-size:12pt;\">Disable splitting and rotation.</span></p></body></html>"))
|
||||
self.NoRotateBox.setText(_translate("KCC", "No split/rotate"))
|
||||
self.DeviceBox.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-size:12pt;\">Target device.</span></p></body></html>"))
|
||||
self.FormatBox.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-size:12pt;\">Output format.</span></p></body></html>"))
|
||||
self.ConvertButton.setText(_translate("KCC", "Convert"))
|
||||
self.DirectoryButton.setText(_translate("KCC", "Add directory"))
|
||||
self.FileButton.setText(_translate("KCC", "Add file"))
|
||||
self.ClearButton.setText(_translate("KCC", "Clear list"))
|
||||
self.MangaBox.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-size:12pt;\">Enable right-to-left reading.</span></p></body></html>"))
|
||||
self.MangaBox.setText(_translate("KCC", "Manga mode"))
|
||||
self.QualityBox.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-size:12pt; font-weight:600; text-decoration: underline;\">Unchecked - Normal quality mode<br/></span><span style=\" font-size:12pt; font-style:italic;\">Use it when Panel View support is not needed.</span><span style=\" font-size:12pt; font-weight:600; text-decoration: underline;\"><br/></span><span style=\" font-size:12pt;\">- Maximum quality when zoom is not enabled.<br/>- Poor quality when zoom is enabled.<br/>- Lowest file size.</span></p><p><span style=\" font-size:12pt; font-weight:600; text-decoration: underline;\">Indeterminate - High quality mode<br/></span><span style=\" font-size:12pt; font-style:italic;\">Not zoomed image </span><span style=\" font-size:12pt; font-weight:600; font-style:italic;\">might </span><span style=\" font-size:12pt; font-style:italic;\">be a little blurry.<br/>Smaller images might be forcefully upscaled in this mode.</span><span style=\" font-size:12pt; font-weight:600; text-decoration: underline;\"><br/></span><span style=\" font-size:12pt;\">- Medium/High quality when zoom is not enabled.<br/>- Maximum quality when zoom is enabled.</span></p><p><span style=\" font-size:12pt; font-weight:600; text-decoration: underline;\">Checked - Ultra quality mode<br/></span><span style=\" font-size:12pt; font-style:italic;\">Maximum possible quality.</span><span style=\" font-size:12pt; font-weight:600; text-decoration: underline;\"><br/></span><span style=\" font-size:12pt;\">- Maximum quality when zoom is not enabled.<br/>- Maximum quality when zoom is enabled.<br/>- Very high file size.</span></p></body></html>"))
|
||||
self.QualityBox.setText(_translate("KCC", "High/Ultra quality"))
|
||||
self.RotateBox.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-size:12pt;\">Disable splitting of two-page spreads.<br/>They will be rotated instead.</span></p></body></html>"))
|
||||
self.RotateBox.setText(_translate("KCC", "Horizontal mode"))
|
||||
self.BasicModeButton.setText(_translate("KCC", "Basic"))
|
||||
self.AdvModeButton.setText(_translate("KCC", "Advanced"))
|
||||
self.GammaLabel.setText(_translate("KCC", "Gamma: Auto"))
|
||||
self.ColorBox.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-size:12pt;\">Don\'t convert images to grayscale.</span></p></body></html>"))
|
||||
self.ColorBox.setText(_translate("KCC", "Color mode"))
|
||||
self.wLabel.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-size:12pt;\">Resolution of target device.</span></p></body></html>"))
|
||||
self.wLabel.setText(_translate("KCC", "Custom width: "))
|
||||
self.customWidth.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-size:12pt;\">Resolution of target device.</span></p></body></html>"))
|
||||
self.customWidth.setInputMask(_translate("KCC", "0000"))
|
||||
self.hLabel.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-size:12pt;\">Resolution of target device.</span></p></body></html>"))
|
||||
self.hLabel.setText(_translate("KCC", "Custom height: "))
|
||||
self.customHeight.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-size:12pt;\">Resolution of target device.</span></p></body></html>"))
|
||||
self.customHeight.setInputMask(_translate("KCC", "0000"))
|
||||
self.ActionBasic.setText(_translate("KCC", "Basic"))
|
||||
self.ActionAdvanced.setText(_translate("KCC", "Advanced"))
|
||||
|
||||
from . import KCC_rc
|
||||
import KCC_rc
|
||||
|
||||
@@ -363,7 +363,7 @@ def dirImgProcess(path):
|
||||
pagenumber += 1
|
||||
work.append([afile, dirpath, options])
|
||||
if GUI:
|
||||
GUI.emit(QtCore.SIGNAL("progressBarTick"), pagenumber)
|
||||
GUI.progressBarTick.emit(pagenumber, False)
|
||||
if len(work) > 0:
|
||||
for i in work:
|
||||
workerPool.apply_async(func=fileImgProcess, args=(i, ), callback=fileImgProcess_tick)
|
||||
@@ -385,7 +385,7 @@ def fileImgProcess_tick(output):
|
||||
workerOutput.append(output)
|
||||
workerPool.terminate()
|
||||
if GUI:
|
||||
GUI.emit(QtCore.SIGNAL("progressBarTick"))
|
||||
GUI.progressBarTick.emit(False, False)
|
||||
if not GUI.conversionAlive:
|
||||
workerPool.terminate()
|
||||
|
||||
@@ -813,11 +813,11 @@ def preSplitDirectory(path):
|
||||
if filesNumber > 0:
|
||||
print('\nWARNING: Automatic output splitting failed.')
|
||||
if GUI:
|
||||
GUI.emit(QtCore.SIGNAL("addMessage"), 'Automatic output splitting failed. <a href='
|
||||
GUI.progressBarTick.emit('Automatic output splitting failed. <a href='
|
||||
'"https://github.com/ciromattia/kcc/wiki'
|
||||
'/Automatic-output-splitting">'
|
||||
'More details.</a>', 'warning')
|
||||
GUI.emit(QtCore.SIGNAL("addMessage"), '')
|
||||
'More details.</a>', 'warning', False)
|
||||
GUI.progressBarTick.emit('', False, False)
|
||||
return [path]
|
||||
detectedSubSubdirectories = False
|
||||
detectedFilesInSubdirectories = False
|
||||
@@ -828,11 +828,11 @@ def preSplitDirectory(path):
|
||||
elif len(dirs) == 0 and detectedSubSubdirectories:
|
||||
print('\nWARNING: Automatic output splitting failed.')
|
||||
if GUI:
|
||||
GUI.emit(QtCore.SIGNAL("addMessage"), 'Automatic output splitting failed. <a href='
|
||||
GUI.progressBarTick.emit('Automatic output splitting failed. <a href='
|
||||
'"https://github.com/ciromattia/kcc/wiki'
|
||||
'/Automatic-output-splitting">'
|
||||
'More details.</a>', 'warning')
|
||||
GUI.emit(QtCore.SIGNAL("addMessage"), '')
|
||||
'More details.</a>', 'warning', False)
|
||||
GUI.progressBarTick.emit('', False, False)
|
||||
return [path]
|
||||
if len(files) != 0:
|
||||
detectedFilesInSubdirectories = True
|
||||
@@ -845,11 +845,11 @@ def preSplitDirectory(path):
|
||||
if detectedFilesInSubdirectories and detectedSubSubdirectories:
|
||||
print('\nWARNING: Automatic output splitting failed.')
|
||||
if GUI:
|
||||
GUI.emit(QtCore.SIGNAL("addMessage"), 'Automatic output splitting failed. <a href='
|
||||
GUI.progressBarTick.emit('Automatic output splitting failed. <a href='
|
||||
'"https://github.com/ciromattia/kcc/wiki'
|
||||
'/Automatic-output-splitting">'
|
||||
'More details.</a>', 'warning')
|
||||
GUI.emit(QtCore.SIGNAL("addMessage"), '')
|
||||
'More details.</a>', 'warning', False)
|
||||
GUI.progressBarTick.emit('', False, False)
|
||||
return [path]
|
||||
# Split directories
|
||||
split = splitDirectory(os.path.join(path, 'OEBPS', 'Images'), mode)
|
||||
@@ -876,7 +876,7 @@ def detectCorruption(tmpPath, orgPath):
|
||||
img.verify()
|
||||
img = Image.open(path)
|
||||
img.load()
|
||||
except:
|
||||
except Exception:
|
||||
rmtree(os.path.join(tmpPath, '..', '..'), True)
|
||||
raise RuntimeError('Image file %s is corrupted.' % pathOrg)
|
||||
|
||||
@@ -969,7 +969,7 @@ def main(argv=None, qtGUI=None):
|
||||
checkOptions()
|
||||
if qtGUI:
|
||||
GUI = qtGUI
|
||||
GUI.emit(QtCore.SIGNAL("progressBarTick"), 1)
|
||||
GUI.progressBarTick.emit(1, False)
|
||||
else:
|
||||
GUI = None
|
||||
if len(args) != 1:
|
||||
@@ -986,10 +986,10 @@ def main(argv=None, qtGUI=None):
|
||||
if options.imgproc:
|
||||
print("\nProcessing images...")
|
||||
if GUI:
|
||||
GUI.emit(QtCore.SIGNAL("progressBarTick"), 'status', 'Processing images')
|
||||
GUI.progressBarTick.emit('status', 'Processing images')
|
||||
dirImgProcess(path + "/OEBPS/Images/")
|
||||
if GUI:
|
||||
GUI.emit(QtCore.SIGNAL("progressBarTick"), 1)
|
||||
GUI.progressBarTick.emit(1, False)
|
||||
sanitizeTree(os.path.join(path, 'OEBPS', 'Images'))
|
||||
if options.batchsplit:
|
||||
tomes = preSplitDirectory(path)
|
||||
@@ -999,11 +999,11 @@ def main(argv=None, qtGUI=None):
|
||||
tomeNumber = 0
|
||||
if GUI:
|
||||
if options.cbzoutput:
|
||||
GUI.emit(QtCore.SIGNAL("progressBarTick"), 'status', 'Compressing CBZ files')
|
||||
GUI.progressBarTick.emit('status', 'Compressing CBZ files')
|
||||
else:
|
||||
GUI.emit(QtCore.SIGNAL("progressBarTick"), 'status', 'Compressing EPUB files')
|
||||
GUI.emit(QtCore.SIGNAL("progressBarTick"), len(tomes) + 1)
|
||||
GUI.emit(QtCore.SIGNAL("progressBarTick"))
|
||||
GUI.progressBarTick.emit('status', 'Compressing EPUB files')
|
||||
GUI.progressBarTick.emit(len(tomes) + 1, False)
|
||||
GUI.progressBarTick.emit(False, False)
|
||||
options.baseTitle = options.title
|
||||
for tome in tomes:
|
||||
if len(tomes) > 1:
|
||||
@@ -1029,7 +1029,7 @@ def main(argv=None, qtGUI=None):
|
||||
move(tome + '_comic.zip', filepath[-1])
|
||||
rmtree(tome, True)
|
||||
if GUI:
|
||||
GUI.emit(QtCore.SIGNAL("progressBarTick"))
|
||||
GUI.progressBarTick.emit(False, False)
|
||||
return filepath
|
||||
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ def mergeDirectory_tick(output):
|
||||
mergeWorkerOutput.append(output)
|
||||
mergeWorkerPool.terminate()
|
||||
if GUI:
|
||||
GUI.emit(QtCore.SIGNAL("progressBarTick"))
|
||||
GUI.progressBarTick.emit(False, False)
|
||||
if not GUI.conversionAlive:
|
||||
mergeWorkerPool.terminate()
|
||||
|
||||
@@ -152,7 +152,7 @@ def splitImage_tick(output):
|
||||
splitWorkerOutput.append(output)
|
||||
splitWorkerPool.terminate()
|
||||
if GUI:
|
||||
GUI.emit(QtCore.SIGNAL("progressBarTick"))
|
||||
GUI.progressBarTick.emit(False, False)
|
||||
if not GUI.conversionAlive:
|
||||
splitWorkerPool.terminate()
|
||||
|
||||
@@ -298,8 +298,8 @@ def main(argv=None, qtGUI=None):
|
||||
directoryNumer += 1
|
||||
mergeWork.append([os.path.join(root, directory)])
|
||||
if GUI:
|
||||
GUI.emit(QtCore.SIGNAL("progressBarTick"), 'status', 'Combining images')
|
||||
GUI.emit(QtCore.SIGNAL("progressBarTick"), directoryNumer)
|
||||
GUI.progressBarTick.emit('status', 'Combining images')
|
||||
GUI.progressBarTick.emit(directoryNumer, False)
|
||||
for i in mergeWork:
|
||||
mergeWorkerPool.apply_async(func=mergeDirectory, args=(i, ), callback=mergeDirectory_tick)
|
||||
mergeWorkerPool.close()
|
||||
@@ -318,9 +318,9 @@ def main(argv=None, qtGUI=None):
|
||||
else:
|
||||
os.remove(os.path.join(root, name))
|
||||
if GUI:
|
||||
GUI.emit(QtCore.SIGNAL("progressBarTick"), 'status', 'Splitting images')
|
||||
GUI.emit(QtCore.SIGNAL("progressBarTick"), pagenumber)
|
||||
GUI.emit(QtCore.SIGNAL("progressBarTick"))
|
||||
GUI.progressBarTick.emit('status', 'Splitting images')
|
||||
GUI.progressBarTick.emit(pagenumber, False)
|
||||
GUI.progressBarTick.emit(False, False)
|
||||
if len(work) > 0:
|
||||
for i in work:
|
||||
splitWorkerPool.apply_async(func=splitImage, args=(i, ), callback=splitImage_tick)
|
||||
|
||||
Reference in New Issue
Block a user