diff options
author | Paweł Jastrzębski <pawelj@iosphe.re> | 2017-03-22 10:46:58 +0100 |
---|---|---|
committer | Paweł Jastrzębski <pawelj@iosphe.re> | 2017-03-22 10:46:58 +0100 |
commit | 283d6101cdc43921b6190d831a1908245836f230 (patch) | |
tree | 2cbe84af5971a653717678a6d6bad542f21471ef /kindlecomicconverter/KCC_gui.py | |
parent | Overhauled webtoon splitter (diff) | |
download | kcc-283d6101cdc43921b6190d831a1908245836f230.tar.gz kcc-283d6101cdc43921b6190d831a1908245836f230.tar.bz2 kcc-283d6101cdc43921b6190d831a1908245836f230.zip |
Reimplemented HQ Panel View (close #223)
Diffstat (limited to 'kindlecomicconverter/KCC_gui.py')
-rw-r--r-- | kindlecomicconverter/KCC_gui.py | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/kindlecomicconverter/KCC_gui.py b/kindlecomicconverter/KCC_gui.py index 5cf29d7..a8c7449 100644 --- a/kindlecomicconverter/KCC_gui.py +++ b/kindlecomicconverter/KCC_gui.py @@ -254,8 +254,10 @@ class WorkerThread(QtCore.QThread): options.splitter = 2 elif GUI.rotateBox.checkState() == 2: options.splitter = 1 - if GUI.qualityBox.isChecked(): + if GUI.qualityBox.checkState() == 1: options.autoscale = True + elif GUI.qualityBox.checkState() == 2: + options.hq = True if GUI.webtoonBox.isChecked(): options.webtoon = True if GUI.upscaleBox.checkState() == 1: @@ -613,6 +615,18 @@ class KCCGUI(KCC_ui.Ui_mainWindow): GUI.rotateBox.setEnabled(True) GUI.upscaleBox.setEnabled(True) + def togglequalityBox(self, value): + profile = GUI.profiles[str(GUI.deviceBox.currentText())] + if value == 2: + if profile['Label'] in ['KV']: + self.addMessage('This option is intended for older Kindle models.', 'warning') + self.addMessage('It might not provide any quality increase in this case.', 'warning') + GUI.upscaleBox.setEnabled(False) + GUI.upscaleBox.setChecked(True) + else: + GUI.upscaleBox.setEnabled(True) + GUI.upscaleBox.setChecked(profile['DefaultUpscale']) + def changeGamma(self, value): valueRaw = int(5 * round(float(value) / 5)) value = '%.2f' % (float(valueRaw) / 100) @@ -634,7 +648,8 @@ class KCCGUI(KCC_ui.Ui_mainWindow): self.changeFormat() GUI.gammaSlider.setValue(0) self.changeGamma(0) - GUI.qualityBox.setEnabled(profile['PVOptions']) + if not GUI.webtoonBox.isChecked(): + GUI.qualityBox.setEnabled(profile['PVOptions']) GUI.upscaleBox.setChecked(profile['DefaultUpscale']) if not profile['PVOptions']: GUI.qualityBox.setChecked(False) @@ -648,7 +663,8 @@ class KCCGUI(KCC_ui.Ui_mainWindow): GUI.formatBox.setCurrentIndex(outputFormat) else: GUI.formatBox.setCurrentIndex(profile['DefaultFormat']) - GUI.qualityBox.setEnabled(profile['PVOptions']) + if not GUI.webtoonBox.isChecked(): + GUI.qualityBox.setEnabled(profile['PVOptions']) if str(GUI.formatBox.currentText()) == 'MOBI/AZW3': GUI.outputSplit.setEnabled(True) else: @@ -1002,6 +1018,7 @@ class KCCGUI(KCC_ui.Ui_mainWindow): GUI.gammaSlider.valueChanged.connect(self.changeGamma) GUI.gammaBox.stateChanged.connect(self.togglegammaBox) GUI.webtoonBox.stateChanged.connect(self.togglewebtoonBox) + GUI.qualityBox.stateChanged.connect(self.togglequalityBox) GUI.deviceBox.activated.connect(self.changeDevice) GUI.formatBox.activated.connect(self.changeFormat) MW.progressBarTick.connect(self.updateProgressbar) |