mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
- API/CLI/Tcl/GUI: new output option BARCODE_BIND_TOP/--bindtop
/
`-bindtop`/"Bind Top" - DPD: add top boundary (width 3X) by default, using new BARCODE_BIND_TOP; "relabel" option; some compliance checks - GUI: only skip encoded/errored signal processing if active modal ExportDialog (wasn't clearing/setting error text bar correctly for DataDialog) - CODE128: debug print checksum - CODE49/DATAMATRIX/QR/ULTRA: fix uniqueness of errtxt nos - manual: fuller DPD doc; some spelling typos, formatting
This commit is contained in:
@ -18,11 +18,11 @@ else()
|
||||
qt5_wrap_ui(zint-qt_SRCS mainWindow.ui extCLI.ui extData.ui extSequence.ui extExport.ui)
|
||||
endif()
|
||||
|
||||
# grpAztec.ui grpC39.ui grpCodablockF.ui grpDotCode.ui grpMicroPDF.ui grpRMQR.ui grpVIN.ui
|
||||
# grpC11.ui grpC49.ui grpCodeOne.ui grpGrid.ui grpMQR.ui grpUltra.ui
|
||||
# grpC128.ui grpC93.ui grpDAFT.ui grpHX.ui grpMSICheck.ui grpUPCA.ui
|
||||
# grpC16k.ui grpChannel.ui grpDBExtend.ui grpITF14.ui grpPDF417.ui grpUPCEAN.ui
|
||||
# grpC25.ui grpCodabar.ui grpDM.ui grpMaxicode.ui grpQR.ui grpUPNQR.ui
|
||||
# grpAztec.ui grpC39.ui grpCodablockF.ui grpDotCode.ui grpMaxicode.ui grpQR.ui grpUPNQR.ui
|
||||
# grpC11.ui grpC49.ui grpCodeOne.ui grpDPD.ui grpMicroPDF.ui grpRMQR.ui grpVIN.ui
|
||||
# grpC128.ui grpC93.ui grpDAFT.ui grpGrid.ui grpMQR.ui grpUltra.ui
|
||||
# grpC16k.ui grpChannel.ui grpDBExtend.ui grpHX.ui grpMSICheck.ui grpUPCA.ui
|
||||
# grpC25.ui grpCodabar.ui grpDM.ui grpITF14.ui grpPDF417.ui grpUPCEAN.ui
|
||||
|
||||
if(APPLE)
|
||||
# https://doc.qt.io/qt-5/appicon.html
|
||||
|
@ -40,6 +40,7 @@ FORMS += extCLI.ui \
|
||||
grpDBExtend.ui \
|
||||
grpDM.ui \
|
||||
grpDotCode.ui \
|
||||
grpDPD.ui \
|
||||
grpGrid.ui \
|
||||
grpHX.ui \
|
||||
grpITF14.ui \
|
||||
|
@ -32,6 +32,7 @@ FORMS += extCLI.ui \
|
||||
grpDBExtend.ui \
|
||||
grpDM.ui \
|
||||
grpDotCode.ui \
|
||||
grpDPD.ui \
|
||||
grpGrid.ui \
|
||||
grpHX.ui \
|
||||
grpITF14.ui \
|
||||
|
49
frontend_qt/grpDPD.ui
Normal file
49
frontend_qt/grpDPD.ui
Normal file
@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>grpDPD</class>
|
||||
<widget class="QWidget" name="grpDPD">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>254</width>
|
||||
<height>131</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="chkDPDRelabel">
|
||||
<property name="text">
|
||||
<string>Mark as &Relabel</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Omit the identification tag and
|
||||
print at half-height;
|
||||
Input is 27 characters</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -912,7 +912,7 @@ Extended Channel Interpretation (ECI)</string>
|
||||
<widget class="QLineEdit" name="txtDataSeg1">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<width>150</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
@ -1173,7 +1173,7 @@ or import from file</string>
|
||||
<widget class="QLineEdit" name="txtDataSeg2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<width>150</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
@ -1434,7 +1434,7 @@ or import from file</string>
|
||||
<widget class="QLineEdit" name="txtDataSeg3">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<width>150</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
@ -1765,6 +1765,11 @@ and use standard height (if any) for default
|
||||
<string>Box</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Bind Top</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
|
@ -1154,7 +1154,9 @@ void MainWindow::structapp_ui_set()
|
||||
|
||||
void MainWindow::on_encoded()
|
||||
{
|
||||
if (QApplication::activeModalWidget() != nullptr) { // Protect against encode in popup dialog
|
||||
// Protect against encode in Sequence Export popup dialog
|
||||
QWidget *activeModalWidget = QApplication::activeModalWidget();
|
||||
if (activeModalWidget != nullptr && activeModalWidget->objectName() == "ExportDialog") {
|
||||
return;
|
||||
}
|
||||
enableActions();
|
||||
@ -1173,7 +1175,9 @@ void MainWindow::on_encoded()
|
||||
|
||||
void MainWindow::on_errored()
|
||||
{
|
||||
if (QApplication::activeModalWidget() != nullptr) { // Protect against error in popup dialog (Sequence Export)
|
||||
// Protect against error in Sequence Export popup dialog
|
||||
QWidget *activeModalWidget = QApplication::activeModalWidget();
|
||||
if (activeModalWidget != nullptr && activeModalWidget->objectName() == "ExportDialog") {
|
||||
return;
|
||||
}
|
||||
enableActions();
|
||||
@ -1700,6 +1704,17 @@ void MainWindow::change_options()
|
||||
connect(get_widget(QSL("spnDAFTTrackerRatio")), SIGNAL(valueChanged( double )), SLOT(update_preview()));
|
||||
}
|
||||
|
||||
} else if (symbology == BARCODE_DPD) {
|
||||
btype->setItemText(0, tr("Default (bind top, 3X width)"));
|
||||
QFile file(QSL(":/grpDPD.ui"));
|
||||
if (file.open(QIODevice::ReadOnly)) {
|
||||
m_optionWidget = uiload.load(&file);
|
||||
file.close();
|
||||
load_sub_settings(settings, symbology);
|
||||
tabMain->insertTab(1, m_optionWidget, tr("DPD Cod&e"));
|
||||
connect(get_widget(QSL("chkDPDRelabel")), SIGNAL(toggled( bool )), SLOT(update_preview()));
|
||||
}
|
||||
|
||||
} else if (symbology == BARCODE_DATAMATRIX) {
|
||||
QFile file(QSL(":/grpDM.ui"));
|
||||
if (!file.open(QIODevice::ReadOnly))
|
||||
@ -1724,7 +1739,7 @@ void MainWindow::change_options()
|
||||
connect(get_widget(QSL("spnDMStructAppID2")), SIGNAL(valueChanged( int )), SLOT(update_preview()));
|
||||
|
||||
} else if (symbology == BARCODE_ITF14) {
|
||||
btype->setItemText(0, tr("Default (box, non-zero width)"));
|
||||
btype->setItemText(0, tr("Default (box, 5X width)"));
|
||||
QFile file(QSL(":/grpITF14.ui"));
|
||||
if (file.open(QIODevice::ReadOnly)) {
|
||||
m_optionWidget = uiload.load(&file);
|
||||
@ -2602,6 +2617,13 @@ void MainWindow::update_preview()
|
||||
m_bc.bc.setOption2((int) (get_dspn_val(QSL("spnDAFTTrackerRatio")) * 10));
|
||||
break;
|
||||
|
||||
case BARCODE_DPD:
|
||||
m_bc.bc.setSymbol(BARCODE_DPD);
|
||||
if (get_chk_val(QSL("chkDPDRelabel"))) {
|
||||
m_bc.bc.setOption2(1);
|
||||
}
|
||||
break;
|
||||
|
||||
case BARCODE_DATAMATRIX:
|
||||
if (get_rad_val(QSL("radDM200HIBC")))
|
||||
m_bc.bc.setSymbol(BARCODE_HIBC_DM);
|
||||
@ -3806,6 +3828,10 @@ void MainWindow::save_sub_settings(QSettings &settings, int symbology)
|
||||
QString::number(get_dspn_val(QSL("spnDAFTTrackerRatio")), 'f', 1 /*precision*/));
|
||||
break;
|
||||
|
||||
case BARCODE_DPD:
|
||||
settings.setValue(QSL("studio/bc/dpd/chk_relabel"), get_chk_val(QSL("chkDPDRelabel")));
|
||||
break;
|
||||
|
||||
case BARCODE_DATAMATRIX:
|
||||
case BARCODE_HIBC_DM:
|
||||
settings.setValue(QSL("studio/bc/datamatrix/size"), get_cmb_index(QSL("cmbDM200Size")));
|
||||
@ -4195,6 +4221,10 @@ void MainWindow::load_sub_settings(QSettings &settings, int symbology)
|
||||
set_dspn_from_setting(settings, QSL("studio/bc/daft/tracker_ratio"), QSL("spnDAFTTrackerRatio"), 25.0f);
|
||||
break;
|
||||
|
||||
case BARCODE_DPD:
|
||||
set_chk_from_setting(settings, QSL("studio/bc/dpd/chk_relabel"), QSL("chkDPDRelabel"));
|
||||
break;
|
||||
|
||||
case BARCODE_DATAMATRIX:
|
||||
case BARCODE_HIBC_DM:
|
||||
set_cmb_from_setting(settings, QSL("studio/bc/datamatrix/size"), QSL("cmbDM200Size"));
|
||||
|
@ -16,6 +16,7 @@
|
||||
<file>grpDBExtend.ui</file>
|
||||
<file>grpDM.ui</file>
|
||||
<file>grpDotCode.ui</file>
|
||||
<file>grpDPD.ui</file>
|
||||
<file>grpGrid.ui</file>
|
||||
<file>grpHX.ui</file>
|
||||
<file>grpITF14.ui</file>
|
||||
|
Reference in New Issue
Block a user