mirror of
https://github.com/ciromattia/kcc
synced 2026-09-22 02:37:09 +00:00
add Legacy Panel View option from KCC 6 (#1445)
This commit is contained in:
@@ -282,7 +282,8 @@ MAIN:
|
||||
--invertdirection Invert page turn direction
|
||||
-q, --hq Try to increase the quality of magnification
|
||||
-2, --two-panel Display two not four panels in Panel View mode
|
||||
--vertical4panel Show side panels first in virtual panel view
|
||||
--vertical4panel Show side panels first in virtual panel view
|
||||
--legacypanelview Use legacy panel view method from KCC 6
|
||||
-w, --webtoon Webtoon processing mode
|
||||
--ts TARGETSIZE, --targetsize TARGETSIZE
|
||||
the maximal size of output file in MB. [Default=100MB for webtoon and 400MB for others]
|
||||
|
||||
+22
-10
@@ -419,16 +419,6 @@ Use if standard extraction fails for whatever reason.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="2">
|
||||
<widget class="QCheckBox" name="tempDirBox">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p><span style=" font-weight:600; text-decoration: underline;">Unchecked - Main Drive<br/></span>Use dedicated temporary directory on main OS drive.</p><p><span style=" font-weight:600; text-decoration: underline;">Checked - Source File Drive<br/></span>Create temporary file directory on source file drive.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Temp Directory</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="3">
|
||||
<widget class="QCheckBox" name="disableProcessingBox">
|
||||
<property name="toolTip">
|
||||
@@ -984,6 +974,28 @@ Keeping this file may crash some readers like the Kobo native CBZ reader.</strin
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="2">
|
||||
<widget class="QCheckBox" name="tempDirBox">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p><span style=" font-weight:600; text-decoration: underline;">Unchecked - Main Drive<br/></span>Use dedicated temporary directory on main OS drive.</p><p><span style=" font-weight:600; text-decoration: underline;">Checked - Source File Drive<br/></span>Create temporary file directory on source file drive.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Temp Directory</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="2">
|
||||
<widget class="QCheckBox" name="legacyPanelViewBox">
|
||||
<property name="toolTip">
|
||||
<string>Use legacy panel view method from KCC 6.
|
||||
|
||||
Kind of works on firmwares 5.19.2 (before revert) and 5.19.3+</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Legacy Panel View</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -270,6 +270,8 @@ def get_options():
|
||||
options.autoscale = True
|
||||
elif GUI.qualityBox.checkState() == Qt.CheckState.Checked:
|
||||
options.hq = True
|
||||
if GUI.legacyPanelViewBox.isChecked():
|
||||
options.legacypanelview = True
|
||||
if GUI.vertical4PanelBox.isChecked():
|
||||
options.vertical4panel = True
|
||||
if GUI.webtoonBox.isChecked():
|
||||
@@ -859,6 +861,7 @@ class KCCGUI(KCC_ui.Ui_mainWindow):
|
||||
GUI.autoLevelBox.show()
|
||||
GUI.autocontrastBox.show()
|
||||
GUI.vertical4PanelBox.show()
|
||||
GUI.legacyPanelViewBox.show()
|
||||
GUI.tempDirBox.show()
|
||||
GUI.deleteBox.show()
|
||||
GUI.metadataTitleBox.show()
|
||||
@@ -897,6 +900,7 @@ class KCCGUI(KCC_ui.Ui_mainWindow):
|
||||
GUI.autoLevelBox.hide()
|
||||
GUI.autocontrastBox.hide()
|
||||
GUI.vertical4PanelBox.hide()
|
||||
GUI.legacyPanelViewBox.hide()
|
||||
GUI.tempDirBox.hide()
|
||||
GUI.deleteBox.hide()
|
||||
GUI.metadataTitleBox.hide()
|
||||
@@ -1295,6 +1299,7 @@ class KCCGUI(KCC_ui.Ui_mainWindow):
|
||||
'rotateBox': GUI.rotateBox.checkState(),
|
||||
'qualityBox': GUI.qualityBox.checkState(),
|
||||
'vertical4PanelBox': GUI.vertical4PanelBox.checkState(),
|
||||
'legacyPanelViewBox': GUI.vertical4PanelBox.checkState(),
|
||||
'gammaBox': GUI.gammaBox.checkState(),
|
||||
'autoLevelBox': GUI.autoLevelBox.checkState(),
|
||||
'autocontrastBox': GUI.autocontrastBox.checkState(),
|
||||
|
||||
@@ -240,11 +240,6 @@ class Ui_mainWindow(object):
|
||||
|
||||
self.gridLayout_2.addWidget(self.outputSplit, 4, 1, 1, 1)
|
||||
|
||||
self.tempDirBox = QCheckBox(self.optionWidget)
|
||||
self.tempDirBox.setObjectName(u"tempDirBox")
|
||||
|
||||
self.gridLayout_2.addWidget(self.tempDirBox, 10, 2, 1, 1)
|
||||
|
||||
self.disableProcessingBox = QCheckBox(self.optionWidget)
|
||||
self.disableProcessingBox.setObjectName(u"disableProcessingBox")
|
||||
|
||||
@@ -499,6 +494,16 @@ class Ui_mainWindow(object):
|
||||
|
||||
self.gridLayout_2.addWidget(self.keepComicInfoBox, 3, 3, 1, 1)
|
||||
|
||||
self.tempDirBox = QCheckBox(self.optionWidget)
|
||||
self.tempDirBox.setObjectName(u"tempDirBox")
|
||||
|
||||
self.gridLayout_2.addWidget(self.tempDirBox, 11, 2, 1, 1)
|
||||
|
||||
self.legacyPanelViewBox = QCheckBox(self.optionWidget)
|
||||
self.legacyPanelViewBox.setObjectName(u"legacyPanelViewBox")
|
||||
|
||||
self.gridLayout_2.addWidget(self.legacyPanelViewBox, 10, 2, 1, 1)
|
||||
|
||||
|
||||
self.gridLayout.addWidget(self.optionWidget, 5, 0, 1, 2)
|
||||
|
||||
@@ -715,10 +720,6 @@ class Ui_mainWindow(object):
|
||||
self.outputSplit.setToolTip(QCoreApplication.translate("mainWindow", u"<html><head/><body><p style='white-space:pre'><span style=\" font-weight:600; text-decoration: underline;\">Unchecked - Automatic mode<br/></span>The output will be split automatically.</p><p style='white-space:pre'><span style=\" font-weight:600; text-decoration: underline;\">Checked - Volume mode<br/></span>Every subdirectory will be considered as a separate volume.</p></body></html>", None))
|
||||
#endif // QT_CONFIG(tooltip)
|
||||
self.outputSplit.setText(QCoreApplication.translate("mainWindow", u"Output split", None))
|
||||
#if QT_CONFIG(tooltip)
|
||||
self.tempDirBox.setToolTip(QCoreApplication.translate("mainWindow", u"<html><head/><body><p><span style=\" font-weight:600; text-decoration: underline;\">Unchecked - Main Drive<br/></span>Use dedicated temporary directory on main OS drive.</p><p><span style=\" font-weight:600; text-decoration: underline;\">Checked - Source File Drive<br/></span>Create temporary file directory on source file drive.</p></body></html>", None))
|
||||
#endif // QT_CONFIG(tooltip)
|
||||
self.tempDirBox.setText(QCoreApplication.translate("mainWindow", u"Temp Directory", None))
|
||||
#if QT_CONFIG(tooltip)
|
||||
self.disableProcessingBox.setToolTip(QCoreApplication.translate("mainWindow", u"<html><head/><body><p style='white-space:pre'>Do not process any image, ignore profile and processing options.</p></body></html>", None))
|
||||
#endif // QT_CONFIG(tooltip)
|
||||
@@ -910,6 +911,16 @@ class Ui_mainWindow(object):
|
||||
"Keeping this file may crash some readers like the Kobo native CBZ reader.", None))
|
||||
#endif // QT_CONFIG(tooltip)
|
||||
self.keepComicInfoBox.setText(QCoreApplication.translate("mainWindow", u"Keep ComicInfo.xml", None))
|
||||
#if QT_CONFIG(tooltip)
|
||||
self.tempDirBox.setToolTip(QCoreApplication.translate("mainWindow", u"<html><head/><body><p><span style=\" font-weight:600; text-decoration: underline;\">Unchecked - Main Drive<br/></span>Use dedicated temporary directory on main OS drive.</p><p><span style=\" font-weight:600; text-decoration: underline;\">Checked - Source File Drive<br/></span>Create temporary file directory on source file drive.</p></body></html>", None))
|
||||
#endif // QT_CONFIG(tooltip)
|
||||
self.tempDirBox.setText(QCoreApplication.translate("mainWindow", u"Temp Directory", None))
|
||||
#if QT_CONFIG(tooltip)
|
||||
self.legacyPanelViewBox.setToolTip(QCoreApplication.translate("mainWindow", u"Use legacy panel view method from KCC 6.\n"
|
||||
"\n"
|
||||
"Kind of works on firmwares 5.19.2 (before revert) and 5.19.3+", None))
|
||||
#endif // QT_CONFIG(tooltip)
|
||||
self.legacyPanelViewBox.setText(QCoreApplication.translate("mainWindow", u"Legacy Panel View", None))
|
||||
self.jpegQualityLabel.setText(QCoreApplication.translate("mainWindow", u"JPEG Quality:", None))
|
||||
#if QT_CONFIG(tooltip)
|
||||
self.labelSpreadsButton.setToolTip(QCoreApplication.translate("mainWindow", u"Hold shift while clicking for a low quality preview.", None))
|
||||
|
||||
@@ -1498,6 +1498,8 @@ def makeParser():
|
||||
help="Display two not four panels in Panel View mode")
|
||||
main_options.add_argument("--vertical4panel", action="store_true", dest="vertical4panel", default=False,
|
||||
help="Display side panels first in virtual panel view")
|
||||
main_options.add_argument("--legacypanelview", action="store_true", dest="legacypanelview", default=False,
|
||||
help="Use legacy panel view method from KCC 6")
|
||||
main_options.add_argument("-w", "--webtoon", action="store_true", dest="webtoon", default=False,
|
||||
help="Webtoon processing mode"),
|
||||
main_options.add_argument("--ts", "--targetsize", type=int, dest="targetsize", default=None,
|
||||
@@ -1679,7 +1681,7 @@ def checkOptions(options):
|
||||
if options.profile == 'K1' or options.profile == 'K2' or options.profile == 'K34' or options.profile == 'KDX':
|
||||
options.panelview = False
|
||||
options.hq = False
|
||||
if not options.hq and not options.autoscale:
|
||||
if not options.hq and not options.autoscale and not options.legacypanelview:
|
||||
options.panelview = False
|
||||
# Webtoon mode mandatory options
|
||||
if options.webtoon:
|
||||
|
||||
Reference in New Issue
Block a user