diff --git a/KCC.ui b/KCC.ui
index dc97e1a..6a27a95 100644
--- a/KCC.ui
+++ b/KCC.ui
@@ -7,19 +7,19 @@
0
0
420
- 345
+ 380
420
- 345
+ 380
420
- 345
+ 380
@@ -426,9 +426,6 @@
-
- false
-
260
@@ -492,7 +489,7 @@
- Qt::NoFocus
+ Qt::ClickFocus
<html><head/><body><p>When converting color images setting this option to 1.0 <span style=" font-weight:600;">might</span> improve readability.</p></body></html>
@@ -507,6 +504,86 @@
Qt::Horizontal
+ GammaLabel
+ GammaSlider
+ OptionsExpert
+ OptionsExpert
+
+
+
+
+ 20
+ 340
+ 381
+ 40
+
+
+
+ QFrame::StyledPanel
+
+
+ QFrame::Raised
+
+
+ -
+
+
+ Device profile width will be overwritten by this value.
+
+
+ Custom width:
+
+
+
+ -
+
+
+ Qt::ClickFocus
+
+
+ false
+
+
+ Device profile width will be overwritten by this value.
+
+
+ 0000;
+
+
+ 4
+
+
+
+ -
+
+
+ Device profile height will be overwritten by this value.
+
+
+ Custom height:
+
+
+
+ -
+
+
+ Qt::ClickFocus
+
+
+ false
+
+
+ Device profile height will be overwritten by this value.
+
+
+ 0000;
+
+
+ 4
+
+
+
+
diff --git a/kcc/KCC_gui.py b/kcc/KCC_gui.py
index 23979cd..06d574c 100644
--- a/kcc/KCC_gui.py
+++ b/kcc/KCC_gui.py
@@ -36,8 +36,8 @@ from PyQt4 import QtGui, QtCore
# noinspection PyBroadException
class Ui_KCC(object):
def selectDir(self):
- if self.firstStart:
- self.firstStart = False
+ if self.needClean:
+ self.needClean = False
GUI.JobList.clear()
dname = QtGui.QFileDialog.getExistingDirectory(MainWindow, 'Select directory', '')
# Lame UTF-8 security measure
@@ -51,8 +51,8 @@ class Ui_KCC(object):
self.clearEmptyJobs()
def selectFile(self):
- if self.firstStart:
- self.firstStart = False
+ if self.needClean:
+ self.needClean = False
GUI.JobList.clear()
if self.UnRAR:
fname = QtGui.QFileDialog.getOpenFileName(MainWindow, 'Select file', '', '*.cbz *.cbr *.zip *.rar *.pdf')
@@ -87,6 +87,7 @@ class Ui_KCC(object):
GUI.FormatBox.setEnabled(False)
GUI.OptionsAdvanced.setEnabled(False)
GUI.OptionsAdvancedGamma.setEnabled(False)
+ GUI.OptionsExpert.setEnabled(False)
GUI.ProcessingBox.hide()
GUI.UpscaleBox.hide()
GUI.NoRotateBox.hide()
@@ -97,6 +98,8 @@ class Ui_KCC(object):
GUI.StretchBox.setChecked(False)
GUI.NoDitheringBox.setChecked(False)
GUI.GammaSlider.setValue(0)
+ GUI.customWidth.setText('')
+ GUI.customHeight.setText('')
def modeAdvanced(self):
MainWindow.setMinimumSize(QtCore.QSize(420, 345))
@@ -111,10 +114,19 @@ class Ui_KCC(object):
GUI.NoRotateBox.show()
GUI.OptionsAdvancedGamma.setEnabled(True)
GUI.OptionsAdvanced.setEnabled(True)
+ GUI.OptionsExpert.setEnabled(False)
+ GUI.customWidth.setText('')
+ GUI.customHeight.setText('')
def modeExpert(self):
- #TODO
- pass
+ self.modeAdvanced()
+ MainWindow.setMinimumSize(QtCore.QSize(420, 380))
+ MainWindow.setMaximumSize(QtCore.QSize(420, 380))
+ MainWindow.resize(420, 380)
+ GUI.BasicModeButton.setStyleSheet('font-weight:Normal;')
+ GUI.AdvModeButton.setStyleSheet('font-weight:Normal;')
+ GUI.ExpertModeButton.setStyleSheet('font-weight:Bold;')
+ GUI.OptionsExpert.setEnabled(True)
def modeConvert(self, enable):
GUI.BasicModeButton.setEnabled(enable)
@@ -150,12 +162,12 @@ class Ui_KCC(object):
MainWindow.repaint()
def convertStart(self):
- if self.firstStart:
- self.firstStart = False
+ if self.needClean:
+ self.needClean = False
GUI.JobList.clear()
if GUI.JobList.count() == 0:
self.addMessage('No files selected! Please choose files to convert.', self.errorIcon)
- self.firstStart = True
+ self.needClean = True
return
self.modeConvert(False)
profile = ProfileData.ProfileLabels[str(GUI.DeviceBox.currentText())]
@@ -248,7 +260,7 @@ class Ui_KCC(object):
os.remove(outputPath)
self.addMessage('Created EPUB file is too big for KindleGen!', self.errorIcon)
self.addMessage('Try converting smaller batch.', self.errorIcon)
- self.firstStart = True
+ self.needClean = True
self.addMessage('All jobs completed.', self.warningIcon)
self.modeConvert(True)
@@ -259,7 +271,7 @@ class Ui_KCC(object):
profiles = sorted(ProfileData.ProfileLabels.iterkeys())
kindleIcon = QtGui.QIcon()
kindleIcon.addPixmap(QtGui.QPixmap(":/Devices/icons/Kindle.ico"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
- self.firstStart = True
+ self.needClean = True
self.GammaValue = 0
self.infoIcon = QtGui.QIcon()
self.infoIcon.addPixmap(QtGui.QPixmap(":/Status/icons/info.ico"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
diff --git a/kcc/KCC_ui.py b/kcc/KCC_ui.py
index abf4fac..bfa9862 100644
--- a/kcc/KCC_ui.py
+++ b/kcc/KCC_ui.py
@@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'KCC.ui'
#
-# Created: Mon Jun 10 17:51:15 2013
+# Created: Mon Jun 10 20:06:36 2013
# by: PyQt4 UI code generator 4.10.1
#
# WARNING! All changes made in this file will be lost!
@@ -26,9 +26,9 @@ except AttributeError:
class Ui_KCC(object):
def setupUi(self, KCC):
KCC.setObjectName(_fromUtf8("KCC"))
- KCC.resize(420, 345)
- KCC.setMinimumSize(QtCore.QSize(420, 345))
- KCC.setMaximumSize(QtCore.QSize(420, 345))
+ KCC.resize(420, 380)
+ KCC.setMinimumSize(QtCore.QSize(420, 380))
+ KCC.setMaximumSize(QtCore.QSize(420, 380))
font = QtGui.QFont()
font.setPointSize(9)
KCC.setFont(font)
@@ -167,7 +167,6 @@ class Ui_KCC(object):
self.AdvModeButton.setFocusPolicy(QtCore.Qt.NoFocus)
self.AdvModeButton.setObjectName(_fromUtf8("AdvModeButton"))
self.ExpertModeButton = QtGui.QPushButton(self.Form)
- self.ExpertModeButton.setEnabled(False)
self.ExpertModeButton.setGeometry(QtCore.QRect(260, 10, 151, 32))
font = QtGui.QFont()
font.setPointSize(9)
@@ -186,11 +185,36 @@ class Ui_KCC(object):
self.GammaLabel.setObjectName(_fromUtf8("GammaLabel"))
self.GammaSlider = QtGui.QSlider(self.OptionsAdvancedGamma)
self.GammaSlider.setGeometry(QtCore.QRect(140, 10, 261, 22))
- self.GammaSlider.setFocusPolicy(QtCore.Qt.NoFocus)
+ 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.OptionsExpert = QtGui.QFrame(self.Form)
+ self.OptionsExpert.setGeometry(QtCore.QRect(20, 340, 381, 40))
+ self.OptionsExpert.setFrameShape(QtGui.QFrame.StyledPanel)
+ self.OptionsExpert.setFrameShadow(QtGui.QFrame.Raised)
+ self.OptionsExpert.setObjectName(_fromUtf8("OptionsExpert"))
+ self.gridLayout_2 = QtGui.QGridLayout(self.OptionsExpert)
+ self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
+ self.wLabel = QtGui.QLabel(self.OptionsExpert)
+ self.wLabel.setObjectName(_fromUtf8("wLabel"))
+ self.gridLayout_2.addWidget(self.wLabel, 0, 0, 1, 1)
+ self.customWidth = QtGui.QLineEdit(self.OptionsExpert)
+ self.customWidth.setFocusPolicy(QtCore.Qt.ClickFocus)
+ self.customWidth.setAcceptDrops(False)
+ self.customWidth.setMaxLength(4)
+ self.customWidth.setObjectName(_fromUtf8("customWidth"))
+ self.gridLayout_2.addWidget(self.customWidth, 0, 1, 1, 1)
+ self.hLabel = QtGui.QLabel(self.OptionsExpert)
+ self.hLabel.setObjectName(_fromUtf8("hLabel"))
+ self.gridLayout_2.addWidget(self.hLabel, 0, 2, 1, 1)
+ self.customHeight = QtGui.QLineEdit(self.OptionsExpert)
+ self.customHeight.setFocusPolicy(QtCore.Qt.ClickFocus)
+ self.customHeight.setAcceptDrops(False)
+ self.customHeight.setMaxLength(4)
+ self.customHeight.setObjectName(_fromUtf8("customHeight"))
+ self.gridLayout_2.addWidget(self.customHeight, 0, 3, 1, 1)
KCC.setCentralWidget(self.Form)
self.ActionBasic = QtGui.QAction(KCC)
self.ActionBasic.setCheckable(True)
@@ -241,6 +265,14 @@ class Ui_KCC(object):
self.GammaLabel.setToolTip(_translate("KCC", "When converting color images setting this option to 1.0 MIGHT improve readability.", None))
self.GammaLabel.setText(_translate("KCC", "Gamma correction: Auto", None))
self.GammaSlider.setToolTip(_translate("KCC", "
When converting color images setting this option to 1.0 might improve readability.
", None))
+ self.wLabel.setToolTip(_translate("KCC", "Device profile width will be overwritten by this value.", None))
+ self.wLabel.setText(_translate("KCC", "Custom width: ", None))
+ self.customWidth.setToolTip(_translate("KCC", "Device profile width will be overwritten by this value.", None))
+ self.customWidth.setInputMask(_translate("KCC", "0000; ", None))
+ self.hLabel.setToolTip(_translate("KCC", "Device profile height will be overwritten by this value.", None))
+ self.hLabel.setText(_translate("KCC", "Custom height: ", None))
+ self.customHeight.setToolTip(_translate("KCC", "Device profile height will be overwritten by this value.", None))
+ self.customHeight.setInputMask(_translate("KCC", "0000; ", None))
self.ActionBasic.setText(_translate("KCC", "Basic", None))
self.ActionAdvanced.setText(_translate("KCC", "Advanced", None))