mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
GUI: fix quietzones, compliantheight per symbology setting/saving
GUI: DATAMATRIX: move automatic size checkboxs to under Size and add label
This commit is contained in:
parent
72eac41c34
commit
0b8c488853
@ -290,6 +290,54 @@
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="lblDMAutoSize">
|
||||
<property name="text">
|
||||
<string>Automatic Size:</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Selection criteria when considering
|
||||
automatic sizes
|
||||
Normally DMRE sizes are not considered,
|
||||
but other rectangular versions are
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<layout class="QHBoxLayout" name="horzLayoutDMAutoSizeChecks">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="chkDMRectangle">
|
||||
<property name="text">
|
||||
<string>Only Squa&re</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Only consider square versions on automatic symbol
|
||||
size selection, suppressing rectangular versions
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="chkDMRE">
|
||||
<property name="text">
|
||||
<string>Allo&w DMRE</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Consider Data Matrix Rectangular Extension (DMRE)
|
||||
versions on automatic symbol size selection
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
@ -344,36 +392,6 @@ the data with a slash "/"</string>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="chkDMRectangle">
|
||||
<property name="text">
|
||||
<string>Suppress &Rectangular Symbols in Automatic Mode</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Only consider square versions on automatic symbol
|
||||
size selection
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="chkDMRE">
|
||||
<property name="text">
|
||||
<string>Allo&w DMRE in Automatic Mode</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Consider DMRE versions on automatic symbol
|
||||
size selection
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="chkDMGSSep">
|
||||
<property name="text">
|
||||
@ -524,7 +542,7 @@ Value ranges from 2 to 16</string>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="lblDMStructAppIndex">
|
||||
<property name="enabled">
|
||||
@ -656,7 +674,7 @@ Value ranges from 1 to count
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</item>
|
||||
<item row="0" column="6">
|
||||
<widget class="QLabel" name="lblDMStructAppID">
|
||||
<property name="enabled">
|
||||
|
@ -1830,6 +1830,7 @@ void MainWindow::update_preview()
|
||||
|
||||
if (get_cmb_index(QSL("cmbDM200Size")) == 0) {
|
||||
// Suppressing rectangles or allowing DMRE only makes sense if in automatic size mode
|
||||
m_optionWidget->findChild<QLabel*>(QSL("lblDMAutoSize"))->setEnabled(true);
|
||||
m_optionWidget->findChild<QCheckBox*>(QSL("chkDMRectangle"))->setEnabled(true);
|
||||
if (m_optionWidget->findChild<QCheckBox*>(QSL("chkDMRectangle"))->isChecked()) {
|
||||
m_bc.bc.setOption3(DM_SQUARE);
|
||||
@ -1842,6 +1843,7 @@ void MainWindow::update_preview()
|
||||
m_bc.bc.setOption3(0);
|
||||
}
|
||||
} else {
|
||||
m_optionWidget->findChild<QLabel*>(QSL("lblDMAutoSize"))->setEnabled(false);
|
||||
m_optionWidget->findChild<QCheckBox*>(QSL("chkDMRectangle"))->setEnabled(false);
|
||||
m_optionWidget->findChild<QCheckBox*>(QSL("chkDMRE"))->setEnabled(false);
|
||||
m_bc.bc.setOption3(0);
|
||||
@ -2626,6 +2628,10 @@ void MainWindow::save_sub_settings(QSettings &settings, int symbology)
|
||||
QSL("studio/bc/%1/appearance/autoheight").arg(name), chkAutoHeight->isChecked() ? 1 : 0);
|
||||
settings.setValue(QSL("studio/bc/%1/appearance/height").arg(name), heightb->value());
|
||||
}
|
||||
if (chkCompliantHeight->isEnabled()) {
|
||||
settings.setValue(
|
||||
QSL("studio/bc/%1/appearance/compliantheight").arg(name), chkCompliantHeight->isChecked() ? 1 : 0);
|
||||
}
|
||||
settings.setValue(QSL("studio/bc/%1/appearance/border").arg(name), bwidth->value());
|
||||
settings.setValue(QSL("studio/bc/%1/appearance/whitespace").arg(name), spnWhitespace->value());
|
||||
settings.setValue(QSL("studio/bc/%1/appearance/vwhitespace").arg(name), spnVWhitespace->value());
|
||||
@ -2972,6 +2978,10 @@ void MainWindow::load_sub_settings(QSettings &settings, int symbology)
|
||||
QSL("studio/bc/%1/appearance/autoheight").arg(name), 1).toInt() ? true : false);
|
||||
heightb->setValue(settings.value(QSL("studio/bc/%1/appearance/height").arg(name), 50.0f).toFloat());
|
||||
}
|
||||
if (chkCompliantHeight->isEnabled()) {
|
||||
chkCompliantHeight->setChecked(settings.value(
|
||||
QSL("studio/bc/%1/appearance/compliantheight").arg(name), 1).toInt() ? true : false);
|
||||
}
|
||||
bwidth->setValue(settings.value(QSL("studio/bc/%1/appearance/border").arg(name), 0).toInt());
|
||||
spnWhitespace->setValue(settings.value(QSL("studio/bc/%1/appearance/whitespace").arg(name), 0).toInt());
|
||||
spnVWhitespace->setValue(settings.value(QSL("studio/bc/%1/appearance/vwhitespace").arg(name), 0).toInt());
|
||||
@ -2984,6 +2994,7 @@ void MainWindow::load_sub_settings(QSettings &settings, int symbology)
|
||||
QSL("studio/bc/%1/appearance/chk_hrt_show").arg(name), 1).toInt() ? true : false);
|
||||
}
|
||||
chkCMYK->setChecked(settings.value(QSL("studio/bc/%1/appearance/cmyk").arg(name), 0).toInt() ? true : false);
|
||||
chkQuietZones->setChecked(settings.value(QSL("studio/bc/%1/appearance/chk_quietzones").arg(name), 0).toInt() ? true : false);
|
||||
cmbRotate->setCurrentIndex(settings.value(QSL("studio/bc/%1/appearance/rotate").arg(name), 0).toInt());
|
||||
if (symbology == BARCODE_DOTCODE || chkDotty->isEnabled()) {
|
||||
chkDotty->setChecked(settings.value(
|
||||
|
Loading…
Reference in New Issue
Block a user