diff options
-rw-r--r-- | gui/KCC.ui | 300 | ||||
-rw-r--r-- | kcc/KCC_gui.py | 10 | ||||
-rw-r--r-- | kcc/KCC_ui.py | 166 |
3 files changed, 293 insertions, 183 deletions
diff --git a/gui/KCC.ui b/gui/KCC.ui index 062e5a5..eb8b84e 100644 --- a/gui/KCC.ui +++ b/gui/KCC.ui @@ -7,7 +7,7 @@ <x>0</x> <y>0</y> <width>450</width> - <height>450</height> + <height>400</height> </rect> </property> <property name="windowTitle"> @@ -22,64 +22,7 @@ <property name="bottomMargin"> <number>5</number> </property> - <item row="3" column="0"> - <widget class="QPushButton" name="directoryButton"> - <property name="minimumSize"> - <size> - <width>130</width> - <height>30</height> - </size> - </property> - <property name="toolTip"> - <string><html><head/><body><p style='white-space:pre'>Add directory containing JPG, PNG or GIF files to queue.<br/><span style=" font-weight:600;">CBR, CBZ and CB7 files inside will not be processed!</span></p></body></html></string> - </property> - <property name="text"> - <string>Add directory</string> - </property> - <property name="icon"> - <iconset resource="KCC.qrc"> - <normaloff>:/Other/icons/folder_new.png</normaloff>:/Other/icons/folder_new.png</iconset> - </property> - </widget> - </item> - <item row="3" column="1"> - <widget class="QPushButton" name="clearButton"> - <property name="minimumSize"> - <size> - <width>0</width> - <height>30</height> - </size> - </property> - <property name="text"> - <string>Clear list</string> - </property> - <property name="icon"> - <iconset resource="KCC.qrc"> - <normaloff>:/Other/icons/clear.png</normaloff>:/Other/icons/clear.png</iconset> - </property> - </widget> - </item> - <item row="3" column="2"> - <widget class="QPushButton" name="fileButton"> - <property name="minimumSize"> - <size> - <width>130</width> - <height>30</height> - </size> - </property> - <property name="toolTip"> - <string><html><head/><body><p style='white-space:pre'>Add CBR, CBZ, CB7 or PDF file to queue.</p></body></html></string> - </property> - <property name="text"> - <string>Add file</string> - </property> - <property name="icon"> - <iconset resource="KCC.qrc"> - <normaloff>:/Other/icons/document_new.png</normaloff>:/Other/icons/document_new.png</iconset> - </property> - </widget> - </item> - <item row="1" column="0" colspan="3"> + <item row="1" column="0" colspan="2"> <widget class="QProgressBar" name="progressBar"> <property name="minimumSize"> <size> @@ -101,59 +44,7 @@ </property> </widget> </item> - <item row="4" column="0"> - <widget class="QComboBox" name="deviceBox"> - <property name="minimumSize"> - <size> - <width>0</width> - <height>28</height> - </size> - </property> - <property name="toolTip"> - <string><html><head/><body><p style='white-space:pre'>Target device.</p></body></html></string> - </property> - </widget> - </item> - <item row="4" column="1"> - <widget class="QPushButton" name="convertButton"> - <property name="minimumSize"> - <size> - <width>0</width> - <height>30</height> - </size> - </property> - <property name="font"> - <font> - <weight>75</weight> - <bold>true</bold> - </font> - </property> - <property name="toolTip"> - <string><html><head/><body><p style='white-space:pre'>Shift+Click to select the output directory.</p></body></html></string> - </property> - <property name="text"> - <string>Convert</string> - </property> - <property name="icon"> - <iconset resource="KCC.qrc"> - <normaloff>:/Other/icons/convert.png</normaloff>:/Other/icons/convert.png</iconset> - </property> - </widget> - </item> - <item row="4" column="2"> - <widget class="QComboBox" name="formatBox"> - <property name="minimumSize"> - <size> - <width>0</width> - <height>28</height> - </size> - </property> - <property name="toolTip"> - <string><html><head/><body><p style='white-space:pre'>Output format.</p></body></html></string> - </property> - </widget> - </item> - <item row="2" column="0" colspan="3"> + <item row="2" column="0" colspan="2"> <widget class="QListWidget" name="jobList"> <property name="styleSheet"> <string notr="true">QListWidget#jobList {background:#ffffff;background-image:url(:/Other/icons/list_background.png);background-position:center center;background-repeat:no-repeat;}</string> @@ -169,7 +60,7 @@ </property> </widget> </item> - <item row="7" column="0" colspan="3"> + <item row="6" column="0" colspan="2"> <widget class="QWidget" name="customWidget" native="true"> <property name="visible"> <bool>false</bool> @@ -242,7 +133,7 @@ </layout> </widget> </item> - <item row="5" column="0" colspan="3"> + <item row="4" column="0" colspan="2"> <widget class="QWidget" name="optionWidget" native="true"> <layout class="QGridLayout" name="gridLayout_2"> <property name="leftMargin"> @@ -275,6 +166,9 @@ <property name="text"> <string>Spread splitter</string> </property> + <property name="tristate"> + <bool>true</bool> + </property> </widget> </item> <item row="0" column="2"> @@ -305,6 +199,9 @@ <property name="text"> <string>Stretch/Upscale</string> </property> + <property name="tristate"> + <bool>true</bool> + </property> </widget> </item> <item row="1" column="2"> @@ -325,6 +222,9 @@ <property name="text"> <string>W/B margins</string> </property> + <property name="tristate"> + <bool>true</bool> + </property> </widget> </item> <item row="2" column="1"> @@ -350,7 +250,7 @@ </layout> </widget> </item> - <item row="6" column="0" colspan="3"> + <item row="5" column="0" colspan="2"> <widget class="QWidget" name="gammaWidget" native="true"> <property name="visible"> <bool>false</bool> @@ -391,7 +291,7 @@ </layout> </widget> </item> - <item row="0" column="0" colspan="3"> + <item row="0" column="0" colspan="2"> <widget class="QWidget" name="toolWidget" native="true"> <layout class="QHBoxLayout" name="horizontalLayout"> <property name="leftMargin"> @@ -443,6 +343,151 @@ </layout> </widget> </item> + <item row="3" column="0" colspan="2"> + <widget class="QWidget" name="buttonWidget" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <layout class="QGridLayout" name="gridLayout_4"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item row="0" column="0"> + <widget class="QPushButton" name="directoryButton"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>30</height> + </size> + </property> + <property name="toolTip"> + <string><html><head/><body><p style='white-space:pre'>Add directory containing JPG, PNG or GIF files to queue.<br/><span style=" font-weight:600;">CBR, CBZ and CB7 files inside will not be processed!</span></p></body></html></string> + </property> + <property name="text"> + <string>Add directory</string> + </property> + <property name="icon"> + <iconset resource="KCC.qrc"> + <normaloff>:/Other/icons/folder_new.png</normaloff>:/Other/icons/folder_new.png</iconset> + </property> + </widget> + </item> + <item row="0" column="3"> + <widget class="QPushButton" name="fileButton"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>30</height> + </size> + </property> + <property name="toolTip"> + <string><html><head/><body><p style='white-space:pre'>Add CBR, CBZ, CB7 or PDF file to queue.</p></body></html></string> + </property> + <property name="text"> + <string>Add file</string> + </property> + <property name="icon"> + <iconset resource="KCC.qrc"> + <normaloff>:/Other/icons/document_new.png</normaloff>:/Other/icons/document_new.png</iconset> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QComboBox" name="deviceBox"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>28</height> + </size> + </property> + <property name="toolTip"> + <string><html><head/><body><p style='white-space:pre'>Target device.</p></body></html></string> + </property> + <property name="sizeAdjustPolicy"> + <enum>QComboBox::AdjustToMinimumContentsLength</enum> + </property> + </widget> + </item> + <item row="1" column="3"> + <widget class="QComboBox" name="formatBox"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>28</height> + </size> + </property> + <property name="toolTip"> + <string><html><head/><body><p style='white-space:pre'>Output format.</p></body></html></string> + </property> + <property name="sizeAdjustPolicy"> + <enum>QComboBox::AdjustToMinimumContentsLength</enum> + </property> + </widget> + </item> + <item row="1" column="2"> + <widget class="QPushButton" name="convertButton"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>30</height> + </size> + </property> + <property name="font"> + <font> + <weight>75</weight> + <bold>true</bold> + </font> + </property> + <property name="toolTip"> + <string><html><head/><body><p style='white-space:pre'>Shift+Click to select the output directory.</p></body></html></string> + </property> + <property name="text"> + <string>Convert</string> + </property> + <property name="icon"> + <iconset resource="KCC.qrc"> + <normaloff>:/Other/icons/convert.png</normaloff>:/Other/icons/convert.png</iconset> + </property> + </widget> + </item> + <item row="0" column="2"> + <widget class="QPushButton" name="clearButton"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>30</height> + </size> + </property> + <property name="text"> + <string>Clear list</string> + </property> + <property name="icon"> + <iconset resource="KCC.qrc"> + <normaloff>:/Other/icons/clear.png</normaloff>:/Other/icons/clear.png</iconset> + </property> + </widget> + </item> + </layout> + <zorder>directoryButton</zorder> + <zorder>clearButton</zorder> + <zorder>fileButton</zorder> + <zorder>deviceBox</zorder> + <zorder>convertButton</zorder> + <zorder>formatBox</zorder> + </widget> + </item> </layout> </widget> <widget class="QStatusBar" name="statusBar"> @@ -451,6 +496,29 @@ </property> </widget> </widget> + <tabstops> + <tabstop>convertButton</tabstop> + <tabstop>clearButton</tabstop> + <tabstop>directoryButton</tabstop> + <tabstop>fileButton</tabstop> + <tabstop>deviceBox</tabstop> + <tabstop>formatBox</tabstop> + <tabstop>mangaBox</tabstop> + <tabstop>rotateBox</tabstop> + <tabstop>qualityBox</tabstop> + <tabstop>webtoonBox</tabstop> + <tabstop>upscaleBox</tabstop> + <tabstop>gammaBox</tabstop> + <tabstop>borderBox</tabstop> + <tabstop>noDitheringBox</tabstop> + <tabstop>colorBox</tabstop> + <tabstop>editorButton</tabstop> + <tabstop>wikiButton</tabstop> + <tabstop>jobList</tabstop> + <tabstop>gammaSlider</tabstop> + <tabstop>widthBox</tabstop> + <tabstop>heightBox</tabstop> + </tabstops> <resources> <include location="KCC.qrc"/> </resources> diff --git a/kcc/KCC_gui.py b/kcc/KCC_gui.py index 06bddf0..9445088 100644 --- a/kcc/KCC_gui.py +++ b/kcc/KCC_gui.py @@ -883,12 +883,12 @@ class KCCGUI(KCC_ui.Ui_mainWindow): if self.windowSize == '0x0': MW.resize(500, 500) elif sys.platform.startswith('darwin'): - GUI.deviceBox.setMinimumSize(QtCore.QSize(0, 0)) - GUI.formatBox.setMinimumSize(QtCore.QSize(0, 0)) - GUI.directoryButton.setMinimumSize(QtCore.QSize(190, 0)) - GUI.fileButton.setMinimumSize(QtCore.QSize(190, 0)) + for element in ['editorButton', 'wikiButton', 'directoryButton', 'clearButton', 'fileButton', 'deviceBox', + 'convertButton', 'formatBox']: + eval('GUI.' + element).setMinimumSize(QtCore.QSize(0, 0)) GUI.gridLayout.setContentsMargins(-1, -1, -1, -1) - GUI.toolWidget.setMinimumSize(QtCore.QSize(0, 0)) + for element in ['gridLayout_2', 'gridLayout_3', 'gridLayout_4', 'horizontalLayout', 'horizontalLayout_2']: + eval('GUI.' + element).setContentsMargins(-1, 0, -1, 0) if self.windowSize == '0x0': MW.resize(500, 500) diff --git a/kcc/KCC_ui.py b/kcc/KCC_ui.py index dacb740..5418e3e 100644 --- a/kcc/KCC_ui.py +++ b/kcc/KCC_ui.py @@ -11,7 +11,7 @@ from PyQt5 import QtCore, QtGui, QtWidgets class Ui_mainWindow(object): def setupUi(self, mainWindow): mainWindow.setObjectName("mainWindow") - mainWindow.resize(450, 450) + mainWindow.resize(450, 400) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/Icon/icons/comic2ebook.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) mainWindow.setWindowIcon(icon) @@ -20,27 +20,6 @@ class Ui_mainWindow(object): self.gridLayout = QtWidgets.QGridLayout(self.centralWidget) self.gridLayout.setContentsMargins(-1, -1, -1, 5) self.gridLayout.setObjectName("gridLayout") - self.directoryButton = QtWidgets.QPushButton(self.centralWidget) - self.directoryButton.setMinimumSize(QtCore.QSize(130, 30)) - icon1 = QtGui.QIcon() - icon1.addPixmap(QtGui.QPixmap(":/Other/icons/folder_new.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) - self.directoryButton.setIcon(icon1) - self.directoryButton.setObjectName("directoryButton") - self.gridLayout.addWidget(self.directoryButton, 3, 0, 1, 1) - self.clearButton = QtWidgets.QPushButton(self.centralWidget) - self.clearButton.setMinimumSize(QtCore.QSize(0, 30)) - icon2 = QtGui.QIcon() - icon2.addPixmap(QtGui.QPixmap(":/Other/icons/clear.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) - self.clearButton.setIcon(icon2) - self.clearButton.setObjectName("clearButton") - self.gridLayout.addWidget(self.clearButton, 3, 1, 1, 1) - self.fileButton = QtWidgets.QPushButton(self.centralWidget) - self.fileButton.setMinimumSize(QtCore.QSize(130, 30)) - icon3 = QtGui.QIcon() - icon3.addPixmap(QtGui.QPixmap(":/Other/icons/document_new.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) - self.fileButton.setIcon(icon3) - self.fileButton.setObjectName("fileButton") - self.gridLayout.addWidget(self.fileButton, 3, 2, 1, 1) self.progressBar = QtWidgets.QProgressBar(self.centralWidget) self.progressBar.setMinimumSize(QtCore.QSize(0, 30)) font = QtGui.QFont() @@ -50,33 +29,14 @@ class Ui_mainWindow(object): self.progressBar.setVisible(False) self.progressBar.setAlignment(QtCore.Qt.AlignJustify|QtCore.Qt.AlignVCenter) self.progressBar.setObjectName("progressBar") - self.gridLayout.addWidget(self.progressBar, 1, 0, 1, 3) - self.deviceBox = QtWidgets.QComboBox(self.centralWidget) - self.deviceBox.setMinimumSize(QtCore.QSize(0, 28)) - self.deviceBox.setObjectName("deviceBox") - self.gridLayout.addWidget(self.deviceBox, 4, 0, 1, 1) - self.convertButton = QtWidgets.QPushButton(self.centralWidget) - self.convertButton.setMinimumSize(QtCore.QSize(0, 30)) - font = QtGui.QFont() - font.setBold(True) - font.setWeight(75) - self.convertButton.setFont(font) - icon4 = QtGui.QIcon() - icon4.addPixmap(QtGui.QPixmap(":/Other/icons/convert.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) - self.convertButton.setIcon(icon4) - self.convertButton.setObjectName("convertButton") - self.gridLayout.addWidget(self.convertButton, 4, 1, 1, 1) - self.formatBox = QtWidgets.QComboBox(self.centralWidget) - self.formatBox.setMinimumSize(QtCore.QSize(0, 28)) - self.formatBox.setObjectName("formatBox") - self.gridLayout.addWidget(self.formatBox, 4, 2, 1, 1) + self.gridLayout.addWidget(self.progressBar, 1, 0, 1, 2) self.jobList = QtWidgets.QListWidget(self.centralWidget) self.jobList.setStyleSheet("QListWidget#jobList {background:#ffffff;background-image:url(:/Other/icons/list_background.png);background-position:center center;background-repeat:no-repeat;}") self.jobList.setSelectionMode(QtWidgets.QAbstractItemView.NoSelection) self.jobList.setVerticalScrollMode(QtWidgets.QAbstractItemView.ScrollPerPixel) self.jobList.setHorizontalScrollMode(QtWidgets.QAbstractItemView.ScrollPerPixel) self.jobList.setObjectName("jobList") - self.gridLayout.addWidget(self.jobList, 2, 0, 1, 3) + self.gridLayout.addWidget(self.jobList, 2, 0, 1, 2) self.customWidget = QtWidgets.QWidget(self.centralWidget) self.customWidget.setVisible(False) self.customWidget.setObjectName("customWidget") @@ -107,7 +67,7 @@ class Ui_mainWindow(object): self.heightBox.setMaximum(3840) self.heightBox.setObjectName("heightBox") self.gridLayout_3.addWidget(self.heightBox, 0, 3, 1, 1) - self.gridLayout.addWidget(self.customWidget, 7, 0, 1, 3) + self.gridLayout.addWidget(self.customWidget, 6, 0, 1, 2) self.optionWidget = QtWidgets.QWidget(self.centralWidget) self.optionWidget.setObjectName("optionWidget") self.gridLayout_2 = QtWidgets.QGridLayout(self.optionWidget) @@ -117,6 +77,7 @@ class Ui_mainWindow(object): self.mangaBox.setObjectName("mangaBox") self.gridLayout_2.addWidget(self.mangaBox, 0, 0, 1, 1) self.rotateBox = QtWidgets.QCheckBox(self.optionWidget) + self.rotateBox.setTristate(True) self.rotateBox.setObjectName("rotateBox") self.gridLayout_2.addWidget(self.rotateBox, 0, 1, 1, 1) self.qualityBox = QtWidgets.QCheckBox(self.optionWidget) @@ -126,12 +87,14 @@ class Ui_mainWindow(object): self.webtoonBox.setObjectName("webtoonBox") self.gridLayout_2.addWidget(self.webtoonBox, 1, 0, 1, 1) self.upscaleBox = QtWidgets.QCheckBox(self.optionWidget) + self.upscaleBox.setTristate(True) self.upscaleBox.setObjectName("upscaleBox") self.gridLayout_2.addWidget(self.upscaleBox, 1, 1, 1, 1) self.gammaBox = QtWidgets.QCheckBox(self.optionWidget) self.gammaBox.setObjectName("gammaBox") self.gridLayout_2.addWidget(self.gammaBox, 1, 2, 1, 1) self.borderBox = QtWidgets.QCheckBox(self.optionWidget) + self.borderBox.setTristate(True) self.borderBox.setObjectName("borderBox") self.gridLayout_2.addWidget(self.borderBox, 2, 0, 1, 1) self.noDitheringBox = QtWidgets.QCheckBox(self.optionWidget) @@ -140,7 +103,7 @@ class Ui_mainWindow(object): self.colorBox = QtWidgets.QCheckBox(self.optionWidget) self.colorBox.setObjectName("colorBox") self.gridLayout_2.addWidget(self.colorBox, 2, 2, 1, 1) - self.gridLayout.addWidget(self.optionWidget, 5, 0, 1, 3) + self.gridLayout.addWidget(self.optionWidget, 4, 0, 1, 2) self.gammaWidget = QtWidgets.QWidget(self.centralWidget) self.gammaWidget.setVisible(False) self.gammaWidget.setObjectName("gammaWidget") @@ -156,7 +119,7 @@ class Ui_mainWindow(object): self.gammaSlider.setOrientation(QtCore.Qt.Horizontal) self.gammaSlider.setObjectName("gammaSlider") self.horizontalLayout_2.addWidget(self.gammaSlider) - self.gridLayout.addWidget(self.gammaWidget, 6, 0, 1, 3) + self.gridLayout.addWidget(self.gammaWidget, 5, 0, 1, 2) self.toolWidget = QtWidgets.QWidget(self.centralWidget) self.toolWidget.setObjectName("toolWidget") self.horizontalLayout = QtWidgets.QHBoxLayout(self.toolWidget) @@ -164,19 +127,78 @@ class Ui_mainWindow(object): self.horizontalLayout.setObjectName("horizontalLayout") self.editorButton = QtWidgets.QPushButton(self.toolWidget) self.editorButton.setMinimumSize(QtCore.QSize(0, 30)) - icon5 = QtGui.QIcon() - icon5.addPixmap(QtGui.QPixmap(":/Other/icons/editor.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) - self.editorButton.setIcon(icon5) + icon1 = QtGui.QIcon() + icon1.addPixmap(QtGui.QPixmap(":/Other/icons/editor.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) + self.editorButton.setIcon(icon1) self.editorButton.setObjectName("editorButton") self.horizontalLayout.addWidget(self.editorButton) self.wikiButton = QtWidgets.QPushButton(self.toolWidget) self.wikiButton.setMinimumSize(QtCore.QSize(0, 30)) - icon6 = QtGui.QIcon() - icon6.addPixmap(QtGui.QPixmap(":/Other/icons/wiki.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) - self.wikiButton.setIcon(icon6) + icon2 = QtGui.QIcon() + icon2.addPixmap(QtGui.QPixmap(":/Other/icons/wiki.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) + self.wikiButton.setIcon(icon2) self.wikiButton.setObjectName("wikiButton") self.horizontalLayout.addWidget(self.wikiButton) - self.gridLayout.addWidget(self.toolWidget, 0, 0, 1, 3) + self.gridLayout.addWidget(self.toolWidget, 0, 0, 1, 2) + self.buttonWidget = QtWidgets.QWidget(self.centralWidget) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.buttonWidget.sizePolicy().hasHeightForWidth()) + self.buttonWidget.setSizePolicy(sizePolicy) + self.buttonWidget.setObjectName("buttonWidget") + self.gridLayout_4 = QtWidgets.QGridLayout(self.buttonWidget) + self.gridLayout_4.setContentsMargins(0, 0, 0, 0) + self.gridLayout_4.setObjectName("gridLayout_4") + self.directoryButton = QtWidgets.QPushButton(self.buttonWidget) + self.directoryButton.setMinimumSize(QtCore.QSize(0, 30)) + icon3 = QtGui.QIcon() + icon3.addPixmap(QtGui.QPixmap(":/Other/icons/folder_new.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) + self.directoryButton.setIcon(icon3) + self.directoryButton.setObjectName("directoryButton") + self.gridLayout_4.addWidget(self.directoryButton, 0, 0, 1, 1) + self.fileButton = QtWidgets.QPushButton(self.buttonWidget) + self.fileButton.setMinimumSize(QtCore.QSize(0, 30)) + icon4 = QtGui.QIcon() + icon4.addPixmap(QtGui.QPixmap(":/Other/icons/document_new.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) + self.fileButton.setIcon(icon4) + self.fileButton.setObjectName("fileButton") + self.gridLayout_4.addWidget(self.fileButton, 0, 3, 1, 1) + self.deviceBox = QtWidgets.QComboBox(self.buttonWidget) + self.deviceBox.setMinimumSize(QtCore.QSize(0, 28)) + self.deviceBox.setSizeAdjustPolicy(QtWidgets.QComboBox.AdjustToMinimumContentsLength) + self.deviceBox.setObjectName("deviceBox") + self.gridLayout_4.addWidget(self.deviceBox, 1, 0, 1, 1) + self.formatBox = QtWidgets.QComboBox(self.buttonWidget) + self.formatBox.setMinimumSize(QtCore.QSize(0, 28)) + self.formatBox.setSizeAdjustPolicy(QtWidgets.QComboBox.AdjustToMinimumContentsLength) + self.formatBox.setObjectName("formatBox") + self.gridLayout_4.addWidget(self.formatBox, 1, 3, 1, 1) + self.convertButton = QtWidgets.QPushButton(self.buttonWidget) + self.convertButton.setMinimumSize(QtCore.QSize(0, 30)) + font = QtGui.QFont() + font.setBold(True) + font.setWeight(75) + self.convertButton.setFont(font) + icon5 = QtGui.QIcon() + icon5.addPixmap(QtGui.QPixmap(":/Other/icons/convert.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) + self.convertButton.setIcon(icon5) + self.convertButton.setObjectName("convertButton") + self.gridLayout_4.addWidget(self.convertButton, 1, 2, 1, 1) + self.clearButton = QtWidgets.QPushButton(self.buttonWidget) + self.clearButton.setMinimumSize(QtCore.QSize(0, 30)) + icon6 = QtGui.QIcon() + icon6.addPixmap(QtGui.QPixmap(":/Other/icons/clear.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) + self.clearButton.setIcon(icon6) + self.clearButton.setObjectName("clearButton") + self.gridLayout_4.addWidget(self.clearButton, 0, 2, 1, 1) + self.directoryButton.raise_() + self.clearButton.raise_() + self.fileButton.raise_() + self.deviceBox.raise_() + self.convertButton.raise_() + self.formatBox.raise_() + self.gridLayout.addWidget(self.buttonWidget, 3, 0, 1, 2) mainWindow.setCentralWidget(self.centralWidget) self.statusBar = QtWidgets.QStatusBar(mainWindow) self.statusBar.setSizeGripEnabled(False) @@ -185,19 +207,30 @@ class Ui_mainWindow(object): self.retranslateUi(mainWindow) QtCore.QMetaObject.connectSlotsByName(mainWindow) + mainWindow.setTabOrder(self.convertButton, self.clearButton) + mainWindow.setTabOrder(self.clearButton, self.directoryButton) + mainWindow.setTabOrder(self.directoryButton, self.fileButton) + mainWindow.setTabOrder(self.fileButton, self.deviceBox) + mainWindow.setTabOrder(self.deviceBox, self.formatBox) + mainWindow.setTabOrder(self.formatBox, self.mangaBox) + mainWindow.setTabOrder(self.mangaBox, self.rotateBox) + mainWindow.setTabOrder(self.rotateBox, self.qualityBox) + mainWindow.setTabOrder(self.qualityBox, self.webtoonBox) + mainWindow.setTabOrder(self.webtoonBox, self.upscaleBox) + mainWindow.setTabOrder(self.upscaleBox, self.gammaBox) + mainWindow.setTabOrder(self.gammaBox, self.borderBox) + mainWindow.setTabOrder(self.borderBox, self.noDitheringBox) + mainWindow.setTabOrder(self.noDitheringBox, self.colorBox) + mainWindow.setTabOrder(self.colorBox, self.editorButton) + mainWindow.setTabOrder(self.editorButton, self.wikiButton) + mainWindow.setTabOrder(self.wikiButton, self.jobList) + mainWindow.setTabOrder(self.jobList, self.gammaSlider) + mainWindow.setTabOrder(self.gammaSlider, self.widthBox) + mainWindow.setTabOrder(self.widthBox, self.heightBox) def retranslateUi(self, mainWindow): _translate = QtCore.QCoreApplication.translate mainWindow.setWindowTitle(_translate("mainWindow", "Kindle Comic Converter")) - self.directoryButton.setToolTip(_translate("mainWindow", "<html><head/><body><p style=\'white-space:pre\'>Add directory containing JPG, PNG or GIF files to queue.<br/><span style=\" font-weight:600;\">CBR, CBZ and CB7 files inside will not be processed!</span></p></body></html>")) - self.directoryButton.setText(_translate("mainWindow", "Add directory")) - self.clearButton.setText(_translate("mainWindow", "Clear list")) - self.fileButton.setToolTip(_translate("mainWindow", "<html><head/><body><p style=\'white-space:pre\'>Add CBR, CBZ, CB7 or PDF file to queue.</p></body></html>")) - self.fileButton.setText(_translate("mainWindow", "Add file")) - self.deviceBox.setToolTip(_translate("mainWindow", "<html><head/><body><p style=\'white-space:pre\'>Target device.</p></body></html>")) - self.convertButton.setToolTip(_translate("mainWindow", "<html><head/><body><p style=\'white-space:pre\'>Shift+Click to select the output directory.</p></body></html>")) - self.convertButton.setText(_translate("mainWindow", "Convert")) - self.formatBox.setToolTip(_translate("mainWindow", "<html><head/><body><p style=\'white-space:pre\'>Output format.</p></body></html>")) self.hLabel.setToolTip(_translate("mainWindow", "<html><head/><body><p style=\'white-space:pre\'>Resolution of target device.</p></body></html>")) self.hLabel.setText(_translate("mainWindow", "Custom height:")) self.widthBox.setToolTip(_translate("mainWindow", "<html><head/><body><p style=\'white-space:pre\'>Resolution of target device.</p></body></html>")) @@ -225,5 +258,14 @@ class Ui_mainWindow(object): self.gammaLabel.setText(_translate("mainWindow", "Gamma: Auto")) self.editorButton.setText(_translate("mainWindow", "Editor")) self.wikiButton.setText(_translate("mainWindow", "Wiki")) + self.directoryButton.setToolTip(_translate("mainWindow", "<html><head/><body><p style=\'white-space:pre\'>Add directory containing JPG, PNG or GIF files to queue.<br/><span style=\" font-weight:600;\">CBR, CBZ and CB7 files inside will not be processed!</span></p></body></html>")) + self.directoryButton.setText(_translate("mainWindow", "Add directory")) + self.fileButton.setToolTip(_translate("mainWindow", "<html><head/><body><p style=\'white-space:pre\'>Add CBR, CBZ, CB7 or PDF file to queue.</p></body></html>")) + self.fileButton.setText(_translate("mainWindow", "Add file")) + self.deviceBox.setToolTip(_translate("mainWindow", "<html><head/><body><p style=\'white-space:pre\'>Target device.</p></body></html>")) + self.formatBox.setToolTip(_translate("mainWindow", "<html><head/><body><p style=\'white-space:pre\'>Output format.</p></body></html>")) + self.convertButton.setToolTip(_translate("mainWindow", "<html><head/><body><p style=\'white-space:pre\'>Shift+Click to select the output directory.</p></body></html>")) + self.convertButton.setText(_translate("mainWindow", "Convert")) + self.clearButton.setText(_translate("mainWindow", "Clear list")) from . import KCC_rc |