mirror of
https://github.com/ciromattia/kcc
synced 2026-06-10 08:30:31 +00:00
Move bulkVolumeCheck widget definition to MetaEditor.ui
* Define bulkVolumeCheck QCheckBox in MetaEditor.ui instead of creating it programmatically in KCC_gui.py * Update tab order to include bulkVolumeCheck after volumeLine
This commit is contained in:
@@ -62,6 +62,19 @@
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="volumeLine"/>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QCheckBox" name="bulkVolumeCheck">
|
||||
<property name="visible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><b>Bulk Volume Editing</b><br>Check this box to assign volume numbers to multiple files.<br><br><b>Input formats:</b><br><code>5</code> → sequence starting from 5 (5, 6, 7...)<br><code>1-10</code> → range from 1 to 10<br><code>1, 3, 5</code> → specific values<br><br><i>Note: Files are sorted alphabetically before assignment.</i></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
@@ -195,6 +208,7 @@
|
||||
<tabstops>
|
||||
<tabstop>seriesLine</tabstop>
|
||||
<tabstop>volumeLine</tabstop>
|
||||
<tabstop>bulkVolumeCheck</tabstop>
|
||||
<tabstop>titleLine</tabstop>
|
||||
<tabstop>numberLine</tabstop>
|
||||
<tabstop>writerLine</tabstop>
|
||||
|
||||
@@ -22,7 +22,7 @@ import itertools
|
||||
from pathlib import Path
|
||||
from PySide6.QtCore import (QSize, QUrl, Qt, Signal, QIODeviceBase, QEvent, QThread, QSettings)
|
||||
from PySide6.QtGui import (QColor, QIcon, QPixmap, QDesktopServices)
|
||||
from PySide6.QtWidgets import (QApplication, QLabel, QListWidgetItem, QMainWindow, QSystemTrayIcon, QFileDialog, QMessageBox, QDialog, QCheckBox)
|
||||
from PySide6.QtWidgets import (QApplication, QLabel, QListWidgetItem, QMainWindow, QSystemTrayIcon, QFileDialog, QMessageBox, QDialog)
|
||||
from PySide6.QtNetwork import (QLocalSocket, QLocalServer)
|
||||
|
||||
import os
|
||||
@@ -1632,25 +1632,8 @@ class KCCGUI_MetaEditor(KCC_ui_editor.Ui_editorDialog):
|
||||
self.setupUi(self.ui)
|
||||
self.ui.setWindowFlags(self.ui.windowFlags() & ~Qt.WindowType.WindowContextHelpButtonHint)
|
||||
|
||||
# Create bulk volume editing widgets
|
||||
self.bulkVolumeCheck = QCheckBox()
|
||||
self.bulkVolumeCheck.setToolTip(
|
||||
'<b>Bulk Volume Editing</b><br>'
|
||||
'Check this box to assign volume numbers to multiple files.<br><br>'
|
||||
'<b>Input formats:</b><br>'
|
||||
'<code>5</code> → sequence starting from 5 (5, 6, 7...)<br>'
|
||||
'<code>1-10</code> → range from 1 to 10<br>'
|
||||
'<code>1, 3, 5</code> → specific values<br><br>'
|
||||
'<i>Note: Files are sorted alphabetically before assignment.</i>'
|
||||
)
|
||||
self.bulkVolumeCheck.stateChanged.connect(self.toggleBulkVolume)
|
||||
|
||||
# Add widget to the grid layout at row 1 (Volume row), column 2
|
||||
self.gridLayout.addWidget(self.bulkVolumeCheck, 1, 2, 1, 1)
|
||||
|
||||
# Hide by default (only shown in bulk mode)
|
||||
self.bulkVolumeCheck.setVisible(False)
|
||||
|
||||
self.okButton.clicked.connect(self.saveData)
|
||||
self.cancelButton.clicked.connect(self.ui.close)
|
||||
if sys.platform.startswith('linux'):
|
||||
|
||||
@@ -15,9 +15,9 @@ from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
|
||||
QFont, QFontDatabase, QGradient, QIcon,
|
||||
QImage, QKeySequence, QLinearGradient, QPainter,
|
||||
QPalette, QPixmap, QRadialGradient, QTransform)
|
||||
from PySide6.QtWidgets import (QApplication, QDialog, QGridLayout, QHBoxLayout,
|
||||
QLabel, QLineEdit, QPushButton, QSizePolicy,
|
||||
QVBoxLayout, QWidget)
|
||||
from PySide6.QtWidgets import (QApplication, QCheckBox, QDialog, QGridLayout,
|
||||
QHBoxLayout, QLabel, QLineEdit, QPushButton,
|
||||
QSizePolicy, QVBoxLayout, QWidget)
|
||||
from . import KCC_rc
|
||||
|
||||
class Ui_editorDialog(object):
|
||||
@@ -57,6 +57,12 @@ class Ui_editorDialog(object):
|
||||
|
||||
self.gridLayout.addWidget(self.volumeLine, 1, 1, 1, 1)
|
||||
|
||||
self.bulkVolumeCheck = QCheckBox(self.editorWidget)
|
||||
self.bulkVolumeCheck.setObjectName(u"bulkVolumeCheck")
|
||||
self.bulkVolumeCheck.setVisible(False)
|
||||
|
||||
self.gridLayout.addWidget(self.bulkVolumeCheck, 1, 2, 1, 1)
|
||||
|
||||
self.label_3 = QLabel(self.editorWidget)
|
||||
self.label_3.setObjectName(u"label_3")
|
||||
|
||||
@@ -157,7 +163,8 @@ class Ui_editorDialog(object):
|
||||
self.verticalLayout.addWidget(self.optionWidget)
|
||||
|
||||
QWidget.setTabOrder(self.seriesLine, self.volumeLine)
|
||||
QWidget.setTabOrder(self.volumeLine, self.titleLine)
|
||||
QWidget.setTabOrder(self.volumeLine, self.bulkVolumeCheck)
|
||||
QWidget.setTabOrder(self.bulkVolumeCheck, self.titleLine)
|
||||
QWidget.setTabOrder(self.titleLine, self.numberLine)
|
||||
QWidget.setTabOrder(self.numberLine, self.writerLine)
|
||||
QWidget.setTabOrder(self.writerLine, self.pencillerLine)
|
||||
@@ -175,6 +182,10 @@ class Ui_editorDialog(object):
|
||||
editorDialog.setWindowTitle(QCoreApplication.translate("editorDialog", u"Metadata editor", None))
|
||||
self.label_1.setText(QCoreApplication.translate("editorDialog", u"Series:", None))
|
||||
self.label_2.setText(QCoreApplication.translate("editorDialog", u"Volume:", None))
|
||||
#if QT_CONFIG(tooltip)
|
||||
self.bulkVolumeCheck.setToolTip(QCoreApplication.translate("editorDialog", u"<b>Bulk Volume Editing</b><br>Check this box to assign volume numbers to multiple files.<br><br><b>Input formats:</b><br><code>5</code> \u2192 sequence starting from 5 (5, 6, 7...)<br><code>1-10</code> \u2192 range from 1 to 10<br><code>1, 3, 5</code> \u2192 specific values<br><br><i>Note: Files are sorted alphabetically before assignment.</i>", None))
|
||||
#endif // QT_CONFIG(tooltip)
|
||||
self.bulkVolumeCheck.setText("")
|
||||
self.label_3.setText(QCoreApplication.translate("editorDialog", u"Number:", None))
|
||||
self.label_4.setText(QCoreApplication.translate("editorDialog", u"Writer:", None))
|
||||
self.label_5.setText(QCoreApplication.translate("editorDialog", u"Penciller:", None))
|
||||
|
||||
Reference in New Issue
Block a user