DATAMATRIX: add DM_ISO_144 (--dmiso144) option for ISO placement

of ECC codewords instead of default "de facto"
This commit is contained in:
gitlost
2023-10-30 20:28:00 +00:00
parent b343409fb4
commit ca964f9098
18 changed files with 578 additions and 188 deletions

View File

@ -407,6 +407,20 @@ instead of the preferred FNC1
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="chkDMISO144">
<property name="text">
<string>Use ISO format for size 1&amp;44 x 144</string>
</property>
<property name="toolTip">
<string>Do not rotate ECC placement for 144 x 144
(Zint 24) sized symbols</string>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="chkDMFast">
<property name="text">

View File

@ -1987,6 +1987,7 @@ void MainWindow::change_options()
connect(get_widget(QSL("chkDMRectangle")), SIGNAL(toggled( bool )), SLOT(update_preview()));
connect(get_widget(QSL("chkDMRE")), SIGNAL(toggled( bool )), SLOT(update_preview()));
connect(get_widget(QSL("chkDMGSSep")), SIGNAL(toggled( bool )), SLOT(update_preview()));
connect(get_widget(QSL("chkDMISO144")), SIGNAL(toggled( bool )), SLOT(update_preview()));
connect(get_widget(QSL("chkDMFast")), SIGNAL(toggled( bool )), SLOT(update_preview()));
connect(get_widget(QSL("cmbDMStructAppCount")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
connect(get_widget(QSL("cmbDMStructAppCount")), SIGNAL(currentIndexChanged( int )), SLOT(structapp_ui_set()));
@ -3031,6 +3032,10 @@ void MainWindow::update_preview()
m_bc.bc.setOption3(0);
}
if (get_chk_val(QSL("chkDMISO144"))) {
m_bc.bc.setOption3(m_bc.bc.option3() | DM_ISO_144);
}
if (get_chk_val(QSL("chkDMFast"))) {
m_bc.bc.setInputMode(FAST_MODE | m_bc.bc.inputMode());
}
@ -4277,6 +4282,7 @@ void MainWindow::save_sub_settings(QSettings &settings, int symbology)
settings.setValue(QSL("studio/bc/datamatrix/chk_suppress_rect"), get_chk_val(QSL("chkDMRectangle")));
settings.setValue(QSL("studio/bc/datamatrix/chk_allow_dmre"), get_chk_val(QSL("chkDMRE")));
settings.setValue(QSL("studio/bc/datamatrix/chk_gs_sep"), get_chk_val(QSL("chkDMGSSep")));
settings.setValue(QSL("studio/bc/datamatrix/iso_144"), get_chk_val(QSL("chkDMISO144")));
settings.setValue(QSL("studio/bc/datamatrix/chk_fast"), get_chk_val(QSL("chkDMFast")));
settings.setValue(QSL("studio/bc/datamatrix/structapp_count"), get_cmb_index(QSL("cmbDMStructAppCount")));
settings.setValue(QSL("studio/bc/datamatrix/structapp_index"), get_cmb_index(QSL("cmbDMStructAppIndex")));
@ -4715,6 +4721,7 @@ void MainWindow::load_sub_settings(QSettings &settings, int symbology)
set_chk_from_setting(settings, QSL("studio/bc/datamatrix/chk_suppress_rect"), QSL("chkDMRectangle"));
set_chk_from_setting(settings, QSL("studio/bc/datamatrix/chk_allow_dmre"), QSL("chkDMRE"));
set_chk_from_setting(settings, QSL("studio/bc/datamatrix/chk_gs_sep"), QSL("chkDMGSSep"));
set_chk_from_setting(settings, QSL("studio/bc/datamatrix/iso_144"), QSL("chkDMISO144"));
set_chk_from_setting(settings, QSL("studio/bc/datamatrix/chk_fast"), QSL("chkDMFast"));
set_cmb_from_setting(settings, QSL("studio/bc/datamatrix/structapp_count"), QSL("cmbDMStructAppCount"));
set_cmb_from_setting(settings, QSL("studio/bc/datamatrix/structapp_index"), QSL("cmbDMStructAppIndex"));