mirror of
https://github.com/ciromattia/kcc
synced 2026-01-09 14:59:38 +00:00
Merged Kindle 3, 4 and 5 profiles
This commit is contained in:
@@ -457,13 +457,13 @@ class Ui_KCC(object):
|
||||
GUI.RotateBox.setEnabled(True)
|
||||
|
||||
def changeDevice(self, value):
|
||||
if value == 12:
|
||||
if value == 8:
|
||||
GUI.BasicModeButton.setEnabled(False)
|
||||
GUI.AdvModeButton.setEnabled(False)
|
||||
self.addMessage('<a href="https://github.com/ciromattia/kcc/wiki/NonKindle-devices">'
|
||||
'List of supported Non-Kindle devices</a>', 'info')
|
||||
self.modeExpert()
|
||||
elif value == 11:
|
||||
elif value == 7:
|
||||
GUI.BasicModeButton.setEnabled(False)
|
||||
GUI.AdvModeButton.setEnabled(False)
|
||||
self.modeExpert(True)
|
||||
@@ -471,7 +471,7 @@ class Ui_KCC(object):
|
||||
GUI.BasicModeButton.setEnabled(True)
|
||||
GUI.AdvModeButton.setEnabled(True)
|
||||
self.modeBasic()
|
||||
if value in [0, 1, 5, 6, 12]:
|
||||
if value in [8, 9, 10, 11, 12]:
|
||||
GUI.QualityBox.setCheckState(0)
|
||||
GUI.QualityBox.setEnabled(False)
|
||||
else:
|
||||
@@ -570,7 +570,6 @@ class Ui_KCC(object):
|
||||
global GUI, MainWindow
|
||||
GUI = UI
|
||||
MainWindow = KCC
|
||||
profiles = sorted(ProfileData.ProfileLabels.iterkeys())
|
||||
self.icons = Icons()
|
||||
self.settings = QtCore.QSettings('KindleComicConverter', 'KindleComicConverter')
|
||||
self.lastPath = self.settings.value('lastPath', '', type=str)
|
||||
@@ -630,12 +629,18 @@ class Ui_KCC(object):
|
||||
KCC.connect(self.versionCheck, QtCore.SIGNAL("addMessage"), self.addMessage)
|
||||
KCC.closeEvent = self.saveSettings
|
||||
|
||||
for profile in profiles:
|
||||
if profile != "Other":
|
||||
GUI.DeviceBox.addItem(self.icons.deviceKindle, profile)
|
||||
else:
|
||||
for profile in ProfileData.ProfileLabelsGUI:
|
||||
if profile == "Other":
|
||||
GUI.DeviceBox.addItem(self.icons.deviceOther, profile)
|
||||
GUI.DeviceBox.setCurrentIndex(self.lastDevice)
|
||||
elif profile == "Separator":
|
||||
GUI.DeviceBox.insertSeparator(GUI.DeviceBox.count()+1)
|
||||
else:
|
||||
GUI.DeviceBox.addItem(self.icons.deviceKindle, profile)
|
||||
if self.lastDevice > GUI.DeviceBox.count():
|
||||
GUI.DeviceBox.setCurrentIndex(0)
|
||||
self.lastDevice = 0
|
||||
else:
|
||||
GUI.DeviceBox.setCurrentIndex(self.lastDevice)
|
||||
|
||||
for f in formats:
|
||||
GUI.FormatBox.addItem(eval('self.icons.' + f + 'Format'), f)
|
||||
|
||||
@@ -787,8 +787,8 @@ def main(argv=None, qtGUI=None):
|
||||
customProfileOptions = OptionGroup(parser, "CUSTOM PROFILE")
|
||||
otherOptions = OptionGroup(parser, "OTHER")
|
||||
mainOptions.add_option("-p", "--profile", action="store", dest="profile", default="KHD",
|
||||
help="Device profile (Choose one among K1, K2, K3, K4NT, K4T, KDX, KDXG, KHD, KF, KFHD,"
|
||||
" KFHD8, KFA) [Default=KHD]")
|
||||
help="Device profile (Choose one among K1, K2, K345, KDX, KDXG, KHD, KF, KFHD, KFHD8, KFA)"
|
||||
"[Default=KHD]")
|
||||
mainOptions.add_option("-q", "--quality", type="int", dest="quality", default="0",
|
||||
help="Quality of Panel View. 0 - Normal 1 - High 2 - Ultra [Default=0]")
|
||||
mainOptions.add_option("-m", "--manga-style", action="store_true", dest="righttoleft", default=False,
|
||||
|
||||
25
kcc/image.py
25
kcc/image.py
@@ -76,9 +76,7 @@ class ProfileData:
|
||||
Profiles = {
|
||||
'K1': ("Kindle 1", (600, 800), Palette4, 1.8, (900, 1200)),
|
||||
'K2': ("Kindle 2", (600, 800), Palette15, 1.8, (900, 1200)),
|
||||
'K3': ("Kindle Keyboard", (600, 800), Palette16, 1.8, (900, 1200)),
|
||||
'K4NT': ("Kindle Non-Touch", (600, 800), Palette16, 1.8, (900, 1200)),
|
||||
'K4T': ("Kindle Touch", (600, 800), Palette16, 1.8, (900, 1200)),
|
||||
'K345': ("Kindle", (600, 800), Palette16, 1.8, (900, 1200)),
|
||||
'KHD': ("Kindle Paperwhite", (758, 1024), Palette16, 1.8, (1137, 1536)),
|
||||
'KDX': ("Kindle DX", (824, 1200), Palette15, 1.8, (1236, 1800)),
|
||||
'KDXG': ("Kindle DXG", (824, 1200), Palette16, 1.8, (1236, 1800)),
|
||||
@@ -92,9 +90,7 @@ class ProfileData:
|
||||
ProfileLabels = {
|
||||
"Kindle 1": 'K1',
|
||||
"Kindle 2": 'K2',
|
||||
"Kindle 3/Keyboard": 'K3',
|
||||
"Kindle 4/Non-Touch": 'K4NT',
|
||||
"Kindle 4/Touch": 'K4T',
|
||||
"Kindle": 'K345',
|
||||
"Kindle Paperwhite": 'KHD',
|
||||
"Kindle DX": 'KDX',
|
||||
"Kindle DXG": 'KDXG',
|
||||
@@ -105,6 +101,23 @@ class ProfileData:
|
||||
"Other": 'OTHER'
|
||||
}
|
||||
|
||||
ProfileLabelsGUI = [
|
||||
"Kindle Paperwhite",
|
||||
"Kindle",
|
||||
"Separator",
|
||||
"Kindle Fire",
|
||||
"Kindle Fire HD 7\"",
|
||||
"Kindle Fire HD 8.9\"",
|
||||
"Separator",
|
||||
"Kindle for Android",
|
||||
"Other",
|
||||
"Separator",
|
||||
"Kindle 1",
|
||||
"Kindle 2",
|
||||
"Kindle DX",
|
||||
"Kindle DXG"
|
||||
]
|
||||
|
||||
|
||||
class ComicPage:
|
||||
def __init__(self, source, device):
|
||||
|
||||
Reference in New Issue
Block a user