mirror of
https://github.com/ciromattia/kcc
synced 2025-12-15 18:56:28 +00:00
* gui/func: add delete button (closes ciromattia#458) * Update KCC_ui.py fix typo * GUI delete option checkBox --------- Co-authored-by: darodi <4682830+darodi@users.noreply.github.com>
This commit is contained in:
15
gui/KCC.ui
15
gui/KCC.ui
@@ -175,10 +175,20 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="4" column="1">
|
||||||
|
<widget class="QCheckBox" name="deleteBox">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Delete input file(s) or directory. It's not recoverable!</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Delete input</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="4" column="2">
|
<item row="4" column="2">
|
||||||
<widget class="QCheckBox" name="disableProcessingBox">
|
<widget class="QCheckBox" name="disableProcessingBox">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string><html><head/><body><p style='white-space:pre'>Do not process any image, ignore profil and processing options</p></body></html></string>
|
<string><html><head/><body><pre style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Do not process any image, ignore profile and processing options</pre></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Disable processing</string>
|
<string>Disable processing</string>
|
||||||
@@ -257,7 +267,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QSlider" name="croppingPowerSlider">
|
<widget class="QSlider" name="croppingPowerSlider">
|
||||||
<property name="maximum">
|
<property name="maximum">
|
||||||
<number>10</number>
|
<number>200</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="singleStep">
|
<property name="singleStep">
|
||||||
<number>1</number>
|
<number>1</number>
|
||||||
@@ -600,6 +610,7 @@
|
|||||||
<tabstop>croppingBox</tabstop>
|
<tabstop>croppingBox</tabstop>
|
||||||
<tabstop>mozJpegBox</tabstop>
|
<tabstop>mozJpegBox</tabstop>
|
||||||
<tabstop>maximizeStrips</tabstop>
|
<tabstop>maximizeStrips</tabstop>
|
||||||
|
<tabstop>deleteBox</tabstop>
|
||||||
<tabstop>disableProcessingBox</tabstop>
|
<tabstop>disableProcessingBox</tabstop>
|
||||||
<tabstop>editorButton</tabstop>
|
<tabstop>editorButton</tabstop>
|
||||||
<tabstop>wikiButton</tabstop>
|
<tabstop>wikiButton</tabstop>
|
||||||
|
|||||||
@@ -294,6 +294,8 @@ class WorkerThread(QtCore.QThread):
|
|||||||
options.maximizestrips = True
|
options.maximizestrips = True
|
||||||
if GUI.disableProcessingBox.isChecked():
|
if GUI.disableProcessingBox.isChecked():
|
||||||
options.noprocessing = True
|
options.noprocessing = True
|
||||||
|
if GUI.deleteBox.isChecked():
|
||||||
|
options.delete = True
|
||||||
if GUI.mozJpegBox.checkState() == 1:
|
if GUI.mozJpegBox.checkState() == 1:
|
||||||
options.forcepng = True
|
options.forcepng = True
|
||||||
elif GUI.mozJpegBox.checkState() == 2:
|
elif GUI.mozJpegBox.checkState() == 2:
|
||||||
@@ -823,6 +825,7 @@ class KCCGUI(KCC_ui.Ui_mainWindow):
|
|||||||
'mozJpegBox': GUI.mozJpegBox.checkState(),
|
'mozJpegBox': GUI.mozJpegBox.checkState(),
|
||||||
'widthBox': GUI.widthBox.value(),
|
'widthBox': GUI.widthBox.value(),
|
||||||
'heightBox': GUI.heightBox.value(),
|
'heightBox': GUI.heightBox.value(),
|
||||||
|
'deleteBox': GUI.deleteBox.value(),
|
||||||
'maximizeStrips': GUI.maximizeStrips.checkState(),
|
'maximizeStrips': GUI.maximizeStrips.checkState(),
|
||||||
'gammaSlider': float(self.gammaValue) * 100})
|
'gammaSlider': float(self.gammaValue) * 100})
|
||||||
self.settings.sync()
|
self.settings.sync()
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Form implementation generated from reading ui file 'gui/KCC.ui'
|
# Form implementation generated from reading ui file 'gui/KCC.ui'
|
||||||
#
|
#
|
||||||
# Created by: PyQt5 UI code generator 5.15.6
|
# Created by: PyQt5 UI code generator 5.15.7
|
||||||
#
|
#
|
||||||
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
|
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
|
||||||
# run again. Do not edit this file unless you know what you are doing.
|
# run again. Do not edit this file unless you know what you are doing.
|
||||||
@@ -70,6 +70,9 @@ class Ui_mainWindow(object):
|
|||||||
self.croppingBox.setTristate(True)
|
self.croppingBox.setTristate(True)
|
||||||
self.croppingBox.setObjectName("croppingBox")
|
self.croppingBox.setObjectName("croppingBox")
|
||||||
self.gridLayout_2.addWidget(self.croppingBox, 3, 2, 1, 1)
|
self.gridLayout_2.addWidget(self.croppingBox, 3, 2, 1, 1)
|
||||||
|
self.deleteBox = QtWidgets.QCheckBox(self.optionWidget)
|
||||||
|
self.deleteBox.setObjectName("deleteBox")
|
||||||
|
self.gridLayout_2.addWidget(self.deleteBox, 4, 1, 1, 1)
|
||||||
self.disableProcessingBox = QtWidgets.QCheckBox(self.optionWidget)
|
self.disableProcessingBox = QtWidgets.QCheckBox(self.optionWidget)
|
||||||
self.disableProcessingBox.setObjectName("disableProcessingBox")
|
self.disableProcessingBox.setObjectName("disableProcessingBox")
|
||||||
self.gridLayout_2.addWidget(self.disableProcessingBox, 4, 2, 1, 1)
|
self.gridLayout_2.addWidget(self.disableProcessingBox, 4, 2, 1, 1)
|
||||||
@@ -254,7 +257,8 @@ class Ui_mainWindow(object):
|
|||||||
mainWindow.setTabOrder(self.colorBox, self.croppingBox)
|
mainWindow.setTabOrder(self.colorBox, self.croppingBox)
|
||||||
mainWindow.setTabOrder(self.croppingBox, self.mozJpegBox)
|
mainWindow.setTabOrder(self.croppingBox, self.mozJpegBox)
|
||||||
mainWindow.setTabOrder(self.mozJpegBox, self.maximizeStrips)
|
mainWindow.setTabOrder(self.mozJpegBox, self.maximizeStrips)
|
||||||
mainWindow.setTabOrder(self.maximizeStrips, self.disableProcessingBox)
|
mainWindow.setTabOrder(self.maximizeStrips, self.deleteBox)
|
||||||
|
mainWindow.setTabOrder(self.deleteBox, self.disableProcessingBox)
|
||||||
mainWindow.setTabOrder(self.disableProcessingBox, self.editorButton)
|
mainWindow.setTabOrder(self.disableProcessingBox, self.editorButton)
|
||||||
mainWindow.setTabOrder(self.editorButton, self.wikiButton)
|
mainWindow.setTabOrder(self.editorButton, self.wikiButton)
|
||||||
mainWindow.setTabOrder(self.wikiButton, self.jobList)
|
mainWindow.setTabOrder(self.wikiButton, self.jobList)
|
||||||
@@ -290,7 +294,9 @@ class Ui_mainWindow(object):
|
|||||||
self.maximizeStrips.setText(_translate("mainWindow", "1x4 to 2x2 strips"))
|
self.maximizeStrips.setText(_translate("mainWindow", "1x4 to 2x2 strips"))
|
||||||
self.croppingBox.setToolTip(_translate("mainWindow", "<html><head/><body><p><span style=\" font-weight:600; text-decoration: underline;\">Unchecked - Disabled</span></p><p>Disabled</p><p><span style=\" font-weight:600; text-decoration: underline;\">Indeterminate - Margins<br/></span>Margins</p><p><span style=\" font-weight:600; text-decoration: underline;\">Checked - Margins + page numbers<br/></span>Margins +page numbers</p></body></html>"))
|
self.croppingBox.setToolTip(_translate("mainWindow", "<html><head/><body><p><span style=\" font-weight:600; text-decoration: underline;\">Unchecked - Disabled</span></p><p>Disabled</p><p><span style=\" font-weight:600; text-decoration: underline;\">Indeterminate - Margins<br/></span>Margins</p><p><span style=\" font-weight:600; text-decoration: underline;\">Checked - Margins + page numbers<br/></span>Margins +page numbers</p></body></html>"))
|
||||||
self.croppingBox.setText(_translate("mainWindow", "Cropping mode"))
|
self.croppingBox.setText(_translate("mainWindow", "Cropping mode"))
|
||||||
self.disableProcessingBox.setToolTip(_translate("mainWindow", "<html><head/><body><p style=\'white-space:pre\'>Do not process any image, ignore profil and processing options</p></body></html>"))
|
self.deleteBox.setToolTip(_translate("mainWindow", "Delete input file(s) or directory. It\'s not recoverable!"))
|
||||||
|
self.deleteBox.setText(_translate("mainWindow", "Delete input"))
|
||||||
|
self.disableProcessingBox.setToolTip(_translate("mainWindow", "<html><head/><body><pre style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Do not process any image, ignore profile and processing options</pre></body></html>"))
|
||||||
self.disableProcessingBox.setText(_translate("mainWindow", "Disable processing"))
|
self.disableProcessingBox.setText(_translate("mainWindow", "Disable processing"))
|
||||||
self.gammaLabel.setText(_translate("mainWindow", "Gamma: Auto"))
|
self.gammaLabel.setText(_translate("mainWindow", "Gamma: Auto"))
|
||||||
self.croppingPowerLabel.setText(_translate("mainWindow", "Cropping power:"))
|
self.croppingPowerLabel.setText(_translate("mainWindow", "Cropping power:"))
|
||||||
|
|||||||
Reference in New Issue
Block a user