CODABLOCKF: prevent cols > 62; fix pTestList buffer overflow

RMQR: update to new draft ISO/IEC JTC1/SC31N000 (Draft 2019-6-24);
  allow for righthand vertical timing pattern in populate_grid()
ULTRA: update max size and min cols based on BWIPP 2021-07-14 update
backend_tcl/zint_tcl.dsp: use /MD instead of /MT for tcl lib compat;
  change include/lib path to more standard one
manual.txt: highlight that rMQR is still in development
GUI: use cross-platform smaller font func instead of explicit values for notes
This commit is contained in:
gitlost
2021-08-10 12:04:25 +01:00
parent 4d0fff7cf5
commit 14d1140d09
49 changed files with 1828 additions and 739 deletions

View File

@ -71,11 +71,6 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="text">
<string>Note: Composite symbols require a GS1-128 linear component.</string>
</property>

View File

@ -76,11 +76,6 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="text">
<string>Examples of tracker ratios:&lt;table cellspacing=&quot;3&quot;&gt;
&lt;tr&gt;&lt;td&gt;Australia Post&amp;nbsp;&lt;/td&gt;&lt;td&gt;26%&lt;/td&gt;&lt;/tr&gt;

View File

@ -160,11 +160,6 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="text">
<string>Note: Error Correction is ignored if it is below the minimum available or is too high for a given size.</string>
</property>

View File

@ -22,7 +22,7 @@
<property name="minimumSize">
<size>
<width>400</width>
<height>485</height>
<height>435</height>
</size>
</property>
<property name="windowTitle">
@ -56,6 +56,9 @@
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QLabel" name="lblSymbology">
<property name="toolTip">
<string>Type of barcode</string>
</property>
<property name="text">
<string>S&amp;ymbology:</string>
</property>
@ -65,9 +68,6 @@
<property name="buddy">
<cstring>bstyle</cstring>
</property>
<property name="toolTip">
<string>Type of barcode</string>
</property>
</widget>
</item>
<item>
@ -247,28 +247,28 @@ or import from file</string>
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Type of 2D component</string>
</property>
<property name="text">
<string>&amp;Type:</string>
</property>
<property name="buddy">
<cstring>cmbCompType</cstring>
</property>
<property name="toolTip">
<string>Type of 2D component</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="cmbCompType">
<property name="enabled">
<bool>false</bool>
</property>
<property name="minimumSize">
<size>
<width>60</width>
<height>16777215</height>
<height>0</height>
</size>
</property>
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Type of 2D component</string>
</property>
@ -306,16 +306,16 @@ or import from file</string>
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Data to be encoded in 2D component
Remember to place [square brackets] around AI identifiers</string>
</property>
<property name="text">
<string>2D C&amp;omponent Data:</string>
</property>
<property name="buddy">
<cstring>txtComposite</cstring>
</property>
<property name="toolTip">
<string>Data to be encoded in 2D component
Remember to place [square brackets] around AI identifiers</string>
</property>
</widget>
</item>
<item>
@ -339,16 +339,6 @@ Remember to place [square brackets] around AI identifiers</string>
<string>Data to be encoded in 2D component
Remember to place [square brackets] around AI identifiers</string>
</property>
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Noto Sans'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-size:9pt;&quot;&gt;Your Data Here!&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="acceptRichText">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
@ -366,6 +356,10 @@ p, li { white-space: pre-wrap; }
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>Set the ECI (Extended Channel Interpretation) code
(ignored if disabled)</string>
</property>
<property name="text">
<string>EC&amp;I:</string>
</property>
@ -375,10 +369,6 @@ p, li { white-space: pre-wrap; }
<property name="buddy">
<cstring>cmbECI</cstring>
</property>
<property name="toolTip">
<string>Set the ECI (Extended Channel Interpretation) code
(ignored if disabled)</string>
</property>
</widget>
</item>
<item>
@ -386,7 +376,7 @@ p, li { white-space: pre-wrap; }
<property name="minimumSize">
<size>
<width>64</width>
<height>16777215</height>
<height>0</height>
</size>
</property>
<property name="toolTip">
@ -562,7 +552,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
</layout>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="chksLayout">
@ -625,7 +615,7 @@ p, li { white-space: pre-wrap; }
<item>
<widget class="QCheckBox" name="chkGS1Parens">
<property name="toolTip">
<string>Process parentheses "()" instead of square brackets "[]"
<string>Process parentheses &quot;()&quot; instead of square brackets &quot;[]&quot;
as delimiters for GS1 Application Identifiers
(ignored if disabled)</string>
</property>
@ -687,6 +677,10 @@ as delimiters for GS1 Application Identifiers
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Overall symbol height in X-dimensions
(ignored if disabled)</string>
</property>
<property name="text">
<string>&amp;Height:</string>
</property>
@ -696,10 +690,6 @@ as delimiters for GS1 Application Identifiers
<property name="buddy">
<cstring>heightb</cstring>
</property>
<property name="toolTip">
<string>Overall symbol height in X-dimensions
(ignored if disabled)</string>
</property>
</widget>
</item>
<item row="1" column="1">
@ -736,6 +726,9 @@ as delimiters for GS1 Application Identifiers
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_8">
<property name="toolTip">
<string>Width of boundary bars or border in X-dimensions</string>
</property>
<property name="text">
<string>Border &amp;Width:</string>
</property>
@ -745,9 +738,6 @@ as delimiters for GS1 Application Identifiers
<property name="buddy">
<cstring>bwidth</cstring>
</property>
<property name="toolTip">
<string>Width of boundary bars or border in X-dimensions</string>
</property>
</widget>
</item>
<item row="2" column="1">
@ -771,6 +761,9 @@ as delimiters for GS1 Application Identifiers
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_9">
<property name="toolTip">
<string>Add border or box</string>
</property>
<property name="text">
<string>Border &amp;Type:</string>
</property>
@ -780,9 +773,6 @@ as delimiters for GS1 Application Identifiers
<property name="buddy">
<cstring>btype</cstring>
</property>
<property name="toolTip">
<string>Add border or box</string>
</property>
</widget>
</item>
<item row="3" column="1">
@ -812,6 +802,9 @@ as delimiters for GS1 Application Identifiers
</item>
<item row="4" column="0">
<widget class="QLabel" name="lblWhitespace">
<property name="toolTip">
<string>Horizontal whitespace, Vertical whitespace, in X-dimensions</string>
</property>
<property name="text">
<string>&amp;Whitespace:</string>
</property>
@ -821,9 +814,6 @@ as delimiters for GS1 Application Identifiers
<property name="buddy">
<cstring>spnWhitespace</cstring>
</property>
<property name="toolTip">
<string>Horizontal whitespace, Vertical whitespace, in X-dimensions</string>
</property>
</widget>
</item>
<item row="4" column="1">
@ -854,6 +844,9 @@ in X-dimensions</string>
</item>
<item row="5" column="0">
<widget class="QLabel" name="lblScale">
<property name="toolTip">
<string>Image scale when output to file</string>
</property>
<property name="text">
<string>Printing Sca&amp;le:</string>
</property>
@ -863,9 +856,6 @@ in X-dimensions</string>
<property name="buddy">
<cstring>spnScale</cstring>
</property>
<property name="toolTip">
<string>Image scale when output to file</string>
</property>
</widget>
</item>
<item row="5" column="1">
@ -895,6 +885,10 @@ in X-dimensions</string>
</item>
<item row="6" column="0">
<widget class="QLabel" name="lblFontSetting">
<property name="toolTip">
<string>Set font characteristics
(ignored if disabled)</string>
</property>
<property name="text">
<string>Fo&amp;nt Setting:</string>
</property>
@ -904,10 +898,6 @@ in X-dimensions</string>
<property name="buddy">
<cstring>cmbFontSetting</cstring>
</property>
<property name="toolTip">
<string>Set font characteristics
(ignored if disabled)</string>
</property>
</widget>
</item>
<item row="6" column="1">
@ -957,6 +947,9 @@ in X-dimensions</string>
<property name="enabled">
<bool>true</bool>
</property>
<property name="toolTip">
<string>Change colour of ink or paper</string>
</property>
<property name="text">
<string>Colour:</string>
</property>
@ -966,9 +959,6 @@ in X-dimensions</string>
<property name="buddy">
<cstring>fgcolor</cstring>
</property>
<property name="toolTip">
<string>Change colour of ink or paper</string>
</property>
</widget>
</item>
<item row="0" column="3">
@ -1026,6 +1016,9 @@ in X-dimensions</string>
</item>
<item row="4" column="2">
<widget class="QLabel" name="lblRotate">
<property name="toolTip">
<string>Rotate symbol by degrees</string>
</property>
<property name="text">
<string>R&amp;otate:</string>
</property>
@ -1035,9 +1028,6 @@ in X-dimensions</string>
<property name="buddy">
<cstring>cmbRotate</cstring>
</property>
<property name="toolTip">
<string>Rotate symbol by degrees</string>
</property>
</widget>
</item>
<item row="4" column="3">
@ -1086,6 +1076,10 @@ in X-dimensions</string>
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Size of dots
(ignored if disabled)</string>
</property>
<property name="text">
<string>Dot S&amp;ize:</string>
</property>
@ -1095,21 +1089,17 @@ in X-dimensions</string>
<property name="buddy">
<cstring>spnDotSize</cstring>
</property>
<property name="toolTip">
<string>Size of dots
(ignored if disabled)</string>
</property>
</widget>
</item>
<item row="6" column="3">
<widget class="QDoubleSpinBox" name="spnDotSize">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Size of dots
(ignored if disabled)</string>
</property>
<property name="enabled">
<bool>false</bool>
</property>
<property name="suffix">
<string/>
</property>
@ -1191,7 +1181,7 @@ in X-dimensions</string>
<string>Output image to file (BMP/EMF/EPS/GIF/PCX/PNG/SVG/TIF)</string>
</property>
<property name="text">
<string>&amp;Save As&#8230;</string>
<string>&amp;Save As</string>
</property>
</widget>
</item>

View File

@ -132,6 +132,7 @@ MainWindow::MainWindow(QWidget *parent, Qt::WindowFlags fl)
scene = new QGraphicsScene(this);
setupUi(this);
view->setMinimumHeight(20);
view->setScene(scene);
restoreGeometry(settings.value("studio/window_geometry").toByteArray());
@ -635,6 +636,7 @@ void MainWindow::change_options()
tabMain->insertTab(1, m_optionWidget, tr("Cod&e 128"));
chkComposite->setText(tr("Add &2D Component (GS1-128 only)"));
combobox_item_enabled(cmbCompType, 3, true); // CC-C
set_smaller_font(m_optionWidget->findChild<QLabel*>("noteC128CompositeEAN"));
connect(m_optionWidget->findChild<QObject*>("radC128EAN"), SIGNAL(toggled( bool )), SLOT(composite_ean_check()));
connect(m_optionWidget->findChild<QObject*>("radC128Stand"), SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("radC128CSup"), SIGNAL(clicked( bool )), SLOT(update_preview()));
@ -799,6 +801,7 @@ void MainWindow::change_options()
m_optionWidget = uiload.load(&file);
file.close();
tabMain->insertTab(1, m_optionWidget, tr("DAFT"));
set_smaller_font(m_optionWidget->findChild<QLabel*>("noteTrackerRatios"));
connect(m_optionWidget->findChild<QObject*>("spnDAFTTrackerRatio"), SIGNAL(valueChanged( double )), SLOT(update_preview()));
}
@ -880,6 +883,7 @@ void MainWindow::change_options()
m_optionWidget = uiload.load(&file);
file.close();
tabMain->insertTab(1, m_optionWidget, tr("Grid M&atrix"));
set_smaller_font(m_optionWidget->findChild<QLabel*>("noteGridECC"));
connect(m_optionWidget->findChild<QObject*>("cmbGridSize"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("cmbGridECC"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("chkGridFullMultibyte"), SIGNAL(stateChanged( int )), SLOT(update_preview()));
@ -1138,6 +1142,27 @@ void MainWindow::set_gs1_mode(bool gs1_mode)
}
}
void MainWindow::set_smaller_font(QLabel *label)
{
if (label) {
const QFont &appFont = QApplication::font();
qreal pointSize = appFont.pointSizeF();
if (pointSize != -1.0) {
QFont font = label->font();
pointSize *= 0.9;
font.setPointSizeF(pointSize);
label->setFont(font);
} else {
int pixelSize = appFont.pixelSize();
if (pixelSize > 1) {
QFont font = label->font();
font.setPixelSize(pixelSize - 1);
label->setFont(font);
}
}
}
}
void MainWindow::update_preview()
{
int symbology = bstyle_items[bstyle->currentIndex()].symbology;

View File

@ -57,6 +57,7 @@ protected:
void combobox_item_enabled(QComboBox *comboBox, int index, bool enabled);
void upcean_addon_gap(QComboBox *comboBox, QLabel *label, int base);
void set_gs1_mode(bool gs1_mode);
void set_smaller_font(QLabel *note);
const char *get_setting_name(int symbology);