From dc9dbed683bd5d19781fa2ed2d2bd2c1dcd1e9a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Jastrz=C4=99bski?= Date: Sun, 16 Jun 2013 23:05:18 +0200 Subject: [PATCH] Updated GUI - Windows/Linux --- KCC.ui | 202 +++++++++++++++++++++++++++++++------------------ kcc/KCC_gui.py | 11 ++- kcc/KCC_ui.py | 76 ++++++++++++------- 3 files changed, 190 insertions(+), 99 deletions(-) diff --git a/KCC.ui b/KCC.ui index 277a8ba..2fc2354 100644 --- a/KCC.ui +++ b/KCC.ui @@ -466,7 +466,7 @@ - 8 + 15 0 100 40 @@ -484,7 +484,7 @@ 110 10 - 271 + 270 22 @@ -505,76 +505,6 @@ - - - - 20 - 340 - 381 - 40 - - - - - - - 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 - - - - - @@ -601,6 +531,134 @@ + + + + 10 + 337 + 421 + 41 + + + + + 9 + + + + + + 9 + 11 + 130 + 18 + + + + Qt::NoFocus + + + Do not convert images to grayscale. + + + Color mode + + + + + + 100 + 0 + 295 + 40 + + + + + + + Device profile width will be overwritten by this value. + + + Custom width: + + + + + + + + 0 + 0 + + + + + 40 + 16777215 + + + + 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: + + + + + + + + 0 + 0 + + + + + 40 + 16777215 + + + + 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 53e59d7..9cae86d 100644 --- a/kcc/KCC_gui.py +++ b/kcc/KCC_gui.py @@ -116,6 +116,8 @@ class WorkerThread(QtCore.QThread): argv.append("--customwidth=" + str(GUI.customWidth.text())) if str(GUI.customHeight.text()) != '': argv.append("--customheight=" + str(GUI.customHeight.text())) + if GUI.ColorBox.isChecked(): + argv.append("--forcecolor") for i in range(GUI.JobList.count()): currentJobs.append(str(GUI.JobList.item(i).text())) GUI.JobList.clear() @@ -263,6 +265,7 @@ class Ui_KCC(object): GUI.GammaSlider.setValue(0) GUI.customWidth.setText('') GUI.customHeight.setText('') + GUI.ColorBox.setChecked(False) def modeAdvanced(self): self.currentMode = 2 @@ -281,9 +284,9 @@ class Ui_KCC(object): GUI.OptionsExpert.setEnabled(False) GUI.customWidth.setText('') GUI.customHeight.setText('') + GUI.ColorBox.setChecked(False) def modeExpert(self): - self.modeAdvanced() self.currentMode = 3 MainWindow.setMinimumSize(QtCore.QSize(420, 380)) MainWindow.setMaximumSize(QtCore.QSize(420, 380)) @@ -291,6 +294,12 @@ class Ui_KCC(object): GUI.BasicModeButton.setStyleSheet('font-weight:Normal;') GUI.AdvModeButton.setStyleSheet('font-weight:Normal;') GUI.ExpertModeButton.setStyleSheet('font-weight:Bold;') + GUI.FormatBox.setEnabled(True) + GUI.ProcessingBox.show() + GUI.UpscaleBox.show() + GUI.NoRotateBox.show() + GUI.OptionsAdvancedGamma.setEnabled(True) + GUI.OptionsAdvanced.setEnabled(True) GUI.OptionsExpert.setEnabled(True) def modeConvert(self, enable): diff --git a/kcc/KCC_ui.py b/kcc/KCC_ui.py index 48493d2..ecf2e1d 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: Fri Jun 14 15:02:30 2013 +# Created: Sun Jun 16 23:04:29 2013 # by: PyQt4 UI code generator 4.10.1 # # WARNING! All changes made in this file will be lost! @@ -183,38 +183,15 @@ class Ui_KCC(object): self.OptionsAdvancedGamma.setFont(font) self.OptionsAdvancedGamma.setObjectName(_fromUtf8("OptionsAdvancedGamma")) self.GammaLabel = QtGui.QLabel(self.OptionsAdvancedGamma) - self.GammaLabel.setGeometry(QtCore.QRect(8, 0, 100, 40)) + self.GammaLabel.setGeometry(QtCore.QRect(15, 0, 100, 40)) self.GammaLabel.setObjectName(_fromUtf8("GammaLabel")) self.GammaSlider = QtGui.QSlider(self.OptionsAdvancedGamma) - self.GammaSlider.setGeometry(QtCore.QRect(110, 10, 271, 22)) + self.GammaSlider.setGeometry(QtCore.QRect(110, 10, 270, 22)) 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.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) self.ProgressBar = QtGui.QProgressBar(self.Form) self.ProgressBar.setGeometry(QtCore.QRect(10, 10, 401, 31)) font = QtGui.QFont() @@ -226,6 +203,51 @@ class Ui_KCC(object): self.ProgressBar.setAlignment(QtCore.Qt.AlignJustify|QtCore.Qt.AlignVCenter) self.ProgressBar.setFormat(_fromUtf8("")) self.ProgressBar.setObjectName(_fromUtf8("ProgressBar")) + self.OptionsExpert = QtGui.QFrame(self.Form) + self.OptionsExpert.setGeometry(QtCore.QRect(10, 337, 421, 41)) + font = QtGui.QFont() + font.setPointSize(9) + self.OptionsExpert.setFont(font) + self.OptionsExpert.setObjectName(_fromUtf8("OptionsExpert")) + self.ColorBox = QtGui.QCheckBox(self.OptionsExpert) + self.ColorBox.setGeometry(QtCore.QRect(9, 11, 130, 18)) + self.ColorBox.setFocusPolicy(QtCore.Qt.NoFocus) + self.ColorBox.setObjectName(_fromUtf8("ColorBox")) + self.OptionsExpertInternal = QtGui.QFrame(self.OptionsExpert) + self.OptionsExpertInternal.setGeometry(QtCore.QRect(100, 0, 295, 40)) + self.OptionsExpertInternal.setObjectName(_fromUtf8("OptionsExpertInternal")) + self.gridLayout_2 = QtGui.QGridLayout(self.OptionsExpertInternal) + self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2")) + self.wLabel = QtGui.QLabel(self.OptionsExpertInternal) + self.wLabel.setObjectName(_fromUtf8("wLabel")) + self.gridLayout_2.addWidget(self.wLabel, 0, 0, 1, 1) + self.customWidth = QtGui.QLineEdit(self.OptionsExpertInternal) + sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.customWidth.sizePolicy().hasHeightForWidth()) + self.customWidth.setSizePolicy(sizePolicy) + self.customWidth.setMaximumSize(QtCore.QSize(40, 16777215)) + 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.OptionsExpertInternal) + self.hLabel.setObjectName(_fromUtf8("hLabel")) + self.gridLayout_2.addWidget(self.hLabel, 0, 2, 1, 1) + self.customHeight = QtGui.QLineEdit(self.OptionsExpertInternal) + sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.customHeight.sizePolicy().hasHeightForWidth()) + self.customHeight.setSizePolicy(sizePolicy) + self.customHeight.setMaximumSize(QtCore.QSize(40, 16777215)) + 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) @@ -276,6 +298,8 @@ 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: Auto", None)) self.GammaSlider.setToolTip(_translate("KCC", "

When converting color images setting this option to 1.0 might improve readability.

", None)) + self.ColorBox.setToolTip(_translate("KCC", "Do not convert images to grayscale.", None)) + self.ColorBox.setText(_translate("KCC", "Color mode", 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))