Replace WARN_ZPL_COMPAT with GS1NOCHECK_MODE

This commit is contained in:
gitlost 2021-07-13 17:39:03 +01:00
parent 7cc2095d3c
commit 2e84fd5157
21 changed files with 1157 additions and 707 deletions

View file

@ -168,6 +168,7 @@ MainWindow::MainWindow(QWidget *parent, Qt::WindowFlags fl)
chkData->setChecked(settings.value("studio/chk_data").toInt() ? true : false);
chkRInit->setChecked(settings.value("studio/chk_rinit").toInt() ? true : false);
chkGS1Parens->setChecked(settings.value("studio/chk_gs1parens").toInt() ? true : false);
chkGS1NoCheck->setChecked(settings.value("studio/chk_gs1nocheck").toInt() ? true : false);
chkAutoHeight->setChecked(settings.value("studio/appearance/autoheight", 1).toInt() ? true : false);
heightb->setValue(settings.value("studio/appearance/height", 50.0f).toFloat());
bwidth->setValue(settings.value("studio/appearance/border", 0).toInt());
@ -205,6 +206,7 @@ MainWindow::MainWindow(QWidget *parent, Qt::WindowFlags fl)
connect(chkData, SIGNAL(stateChanged( int )), SLOT(update_preview()));
connect(chkRInit, SIGNAL(stateChanged( int )), SLOT(update_preview()));
connect(chkGS1Parens, SIGNAL(stateChanged( int )), SLOT(update_preview()));
connect(chkGS1NoCheck, SIGNAL(stateChanged( int )), SLOT(update_preview()));
connect(spnWhitespace, SIGNAL(valueChanged( int )), SLOT(update_preview()));
connect(spnVWhitespace, SIGNAL(valueChanged( int )), SLOT(update_preview()));
connect(btnAbout, SIGNAL(clicked( bool )), SLOT(about()));
@ -259,6 +261,7 @@ MainWindow::~MainWindow()
settings.setValue("studio/chk_data", chkData->isChecked() ? 1 : 0);
settings.setValue("studio/chk_rinit", chkRInit->isChecked() ? 1 : 0);
settings.setValue("studio/chk_gs1parens", chkGS1Parens->isChecked() ? 1 : 0);
settings.setValue("studio/chk_gs1nocheck", chkGS1NoCheck->isChecked() ? 1 : 0);
settings.setValue("studio/appearance/autoheight", chkAutoHeight->isChecked() ? 1 : 0);
settings.setValue("studio/appearance/height", heightb->value());
settings.setValue("studio/appearance/border", bwidth->value());
@ -1011,6 +1014,7 @@ void MainWindow::change_options()
cmbECI->setEnabled(m_bc.bc.supportsECI(symbology)); /* Will need checking again in update_preview() as encoding mode dependent (HIBC) */
chkGS1Parens->setEnabled(m_bc.bc.supportsGS1(symbology)); /* Ditto (GS1) */
chkGS1NoCheck->setEnabled(m_bc.bc.supportsGS1(symbology)); /* Ditto (GS1) */
chkRInit->setEnabled(m_bc.bc.supportsReaderInit(symbology)); /* Ditto (HIBC and GS1) */
chkAutoHeight->setEnabled(!m_bc.bc.isFixedRatio(symbology));
chkHRTShow->setEnabled(m_bc.bc.hasHRT(symbology));
@ -1612,6 +1616,7 @@ void MainWindow::update_preview()
lblECI->setEnabled(cmbECI->isEnabled());
}
chkGS1Parens->setEnabled(m_bc.bc.supportsGS1());
chkGS1NoCheck->setEnabled(m_bc.bc.supportsGS1());
chkRInit->setEnabled(m_bc.bc.supportsReaderInit() && (m_bc.bc.inputMode() & 0x07) != GS1_MODE);
if (!grpComposite->isHidden() && chkComposite->isChecked())
@ -1624,6 +1629,7 @@ void MainWindow::update_preview()
}
m_bc.bc.setECI(cmbECI->isEnabled() ? cmbECI->currentIndex() : 0);
m_bc.bc.setGS1Parens(chkGS1Parens->isEnabled() && chkGS1Parens->isChecked());
m_bc.bc.setGS1NoCheck(chkGS1NoCheck->isEnabled() && chkGS1NoCheck->isChecked());
m_bc.bc.setReaderInit(chkRInit->isEnabled() && chkRInit->isChecked());
m_bc.bc.setShowText(chkHRTShow->isEnabled() && chkHRTShow->isChecked());
m_bc.bc.setBorderType(btype->currentIndex());
@ -1933,6 +1939,7 @@ void MainWindow::save_sub_settings(QSettings &settings, int symbology) {
settings.setValue(QString("studio/bc/%1/chk_rinit").arg(name), chkRInit->isChecked() ? 1 : 0);
}
settings.setValue(QString("studio/bc/%1/chk_gs1parens").arg(name), chkGS1Parens->isChecked() ? 1 : 0);
settings.setValue(QString("studio/bc/%1/chk_gs1nocheck").arg(name), chkGS1NoCheck->isChecked() ? 1 : 0);
if (chkAutoHeight->isEnabled()) {
settings.setValue(QString("studio/bc/%1/appearance/autoheight").arg(name), chkAutoHeight->isChecked() ? 1 : 0);
settings.setValue(QString("studio/bc/%1/appearance/height").arg(name), heightb->value());
@ -2185,6 +2192,7 @@ void MainWindow::load_sub_settings(QSettings &settings, int symbology) {
chkRInit->setChecked(settings.value(QString("studio/bc/%1/chk_rinit").arg(name)).toInt() ? true : false);
}
chkGS1Parens->setChecked(settings.value(QString("studio/bc/%1/chk_gs1parens").arg(name)).toInt() ? true : false);
chkGS1NoCheck->setChecked(settings.value(QString("studio/bc/%1/chk_gs1nocheck").arg(name)).toInt() ? true : false);
if (chkAutoHeight->isEnabled()) {
chkAutoHeight->setChecked(settings.value(QString("studio/bc/%1/appearance/autoheight").arg(name), 1).toInt() ? true : false);
heightb->setValue(settings.value(QString("studio/bc/%1/appearance/height").arg(name), 50.0f).toFloat());