mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
GUI: export dialog: add postfix field for filename (#252)
man page: expand --scale spiel, mention MaxiCode exceptionalism manual: make MaxiCode scale exceptionalism a bit clearer
This commit is contained in:
parent
8a31508163
commit
d9f2e85246
@ -3474,7 +3474,7 @@ int testUtilZXingCPP(int index, struct zint_symbol *symbol, const char *source,
|
||||
|
||||
testutil_pclose(fp);
|
||||
|
||||
if (data_mode && (is_eci_convertible(symbol->eci) || symbol->eci >= 899)) {
|
||||
if ((data_mode && is_eci_convertible(symbol->eci)) || symbol->eci >= 899) {
|
||||
const int eci = symbol->eci >= 899 ? 3 : symbol->eci;
|
||||
int error_number;
|
||||
const int eci_length = get_eci_length(eci, (const unsigned char *) buffer, cnt);
|
||||
@ -3621,7 +3621,6 @@ int testUtilZXingCPPCmp(struct zint_symbol *symbol, char *msg, char *cmp_buf, in
|
||||
sprintf(maxi + maxi_len, "%.*s\035%.*s\035%.*s\035", primary_len - 6, primary,
|
||||
3, primary + primary_len - 6, 3, primary + primary_len - 3);
|
||||
#endif
|
||||
printf("primary %s, primary_len %d\n", primary, primary_len);
|
||||
maxi_len = (int) strlen(maxi);
|
||||
memcpy(maxi + maxi_len, expected, expected_len);
|
||||
expected = maxi;
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 112 KiB After Width: | Height: | Size: 124 KiB |
@ -908,8 +908,11 @@ followed by the angle of rotation as shown below.
|
||||
## 4.9 Adjusting Image Size
|
||||
|
||||
The scale of the image can be altered using the `--scale` option followed by a
|
||||
multiple of the default X-dimension. The scale is multiplied by 2 before being
|
||||
applied. The default scale is 1.
|
||||
multiple of the default X-dimension. The scale is multiplied by 2 (with the
|
||||
exception of MaxiCode) before being applied. The default scale is 1.
|
||||
|
||||
For MaxiCode, the scale is multiplied by 10 for raster output, by 20 for EMF
|
||||
vector output, and by 2 otherwise (non-EMF vector output).
|
||||
|
||||
For raster output, the default X-dimension is 2 pixels (except for MaxiCode, see
|
||||
[4.9.2 MaxiCode Raster Scaling] below). For example for PNG images a scale of 5
|
||||
@ -3690,7 +3693,7 @@ A matrix symbology developed by Ted Williams in 1992 which encodes data in a
|
||||
way similar to Data Matrix, Code One is able to encode the Latin-1 character
|
||||
set or GS1 data, and also supports the ECI mechanism. There are two types of
|
||||
Code One symbol - fixed-ratio symbols which are roughly square (versions A
|
||||
through to H) and variable-width versions (version S and T). These can be
|
||||
through to H) and variable-width versions (versions S and T). These can be
|
||||
selected by using `--vers` (API `option_2`) as shown in the table below:
|
||||
|
||||
------------------------------------------------------------
|
||||
|
@ -1009,8 +1009,11 @@ followed by the angle of rotation as shown below.
|
||||
4.9 Adjusting Image Size
|
||||
|
||||
The scale of the image can be altered using the --scale option followed by a
|
||||
multiple of the default X-dimension. The scale is multiplied by 2 before being
|
||||
applied. The default scale is 1.
|
||||
multiple of the default X-dimension. The scale is multiplied by 2 (with the
|
||||
exception of MaxiCode) before being applied. The default scale is 1.
|
||||
|
||||
For MaxiCode, the scale is multiplied by 10 for raster output, by 20 for EMF
|
||||
vector output, and by 2 otherwise (non-EMF vector output).
|
||||
|
||||
For raster output, the default X-dimension is 2 pixels (except for MaxiCode, see
|
||||
4.9.2 MaxiCode Raster Scaling below). For example for PNG images a scale of 5
|
||||
@ -3598,7 +3601,7 @@ A matrix symbology developed by Ted Williams in 1992 which encodes data in a way
|
||||
similar to Data Matrix, Code One is able to encode the Latin-1 character set or
|
||||
GS1 data, and also supports the ECI mechanism. There are two types of Code One
|
||||
symbol - fixed-ratio symbols which are roughly square (versions A through to H)
|
||||
and variable-width versions (version S and T). These can be selected by using
|
||||
and variable-width versions (versions S and T). These can be selected by using
|
||||
--vers (API option_2) as shown in the table below:
|
||||
|
||||
--------------------------------------------------------------
|
||||
@ -4355,7 +4358,10 @@ OPTIONS
|
||||
|
||||
--scale=NUMBER
|
||||
|
||||
Set the X-dimension. NUMBER may be floating-point.
|
||||
Set the X-dimension. NUMBER may be floating-point, and is multiplied by 2
|
||||
(except for MaxiCode) before being applied. For MaxiCode, the scale is
|
||||
multiplied by 10 for raster output, by 20 for EMF vector output, and by 2
|
||||
otherwise. The default scale is 1.
|
||||
|
||||
--scmvv=INTEGER
|
||||
|
||||
|
@ -334,7 +334,11 @@ the maximum number of rows for GS1 DataBar Expanded Stacked
|
||||
.TP
|
||||
\f[V]--scale=NUMBER\f[R]
|
||||
Set the X-dimension.
|
||||
\f[I]NUMBER\f[R] may be floating-point.
|
||||
\f[I]NUMBER\f[R] may be floating-point, and is multiplied by 2 (except
|
||||
for MaxiCode) before being applied.
|
||||
For MaxiCode, the scale is multiplied by 10 for raster output, by 20 for
|
||||
EMF vector output, and by 2 otherwise.
|
||||
The default scale is 1.
|
||||
.TP
|
||||
\f[V]--scmvv=INTEGER\f[R]
|
||||
For MaxiCode, prefix the Structured Carrier Message (SCM) with
|
||||
|
@ -268,7 +268,9 @@ Paintbrush (`PCX`), Portable Network Format (`PNG`), Scalable Vector Graphic (`S
|
||||
|
||||
`--scale=NUMBER`
|
||||
|
||||
: Set the X-dimension. *NUMBER* may be floating-point.
|
||||
: Set the X-dimension. *NUMBER* may be floating-point, and is multiplied by 2 (except for MaxiCode) before being
|
||||
applied. For MaxiCode, the scale is multiplied by 10 for raster output, by 20 for EMF vector output, and by 2
|
||||
otherwise. The default scale is 1.
|
||||
|
||||
`--scmvv=INTEGER`
|
||||
|
||||
|
@ -44,6 +44,7 @@ ExportWindow::ExportWindow(BarcodeItem *bc, const QString& output_data) : m_bc(b
|
||||
linDestPath->setText(settings.value(QSL("studio/export/destination"),
|
||||
QDir::toNativeSeparators(QDir::homePath())).toString());
|
||||
linPrefix->setText(settings.value(QSL("studio/export/file_prefix"), QSL("bcs_")).toString());
|
||||
linPostfix->setText(settings.value(QSL("studio/export/file_postfix"), QSL("")).toString());
|
||||
cmbFileName->setCurrentIndex(settings.value(QSL("studio/export/name_format"), 0).toInt());
|
||||
cmbFileFormat->setCurrentIndex(settings.value(QSL("studio/export/filetype"), 0).toInt());
|
||||
|
||||
@ -65,6 +66,7 @@ ExportWindow::~ExportWindow()
|
||||
|
||||
settings.setValue(QSL("studio/export/destination"), linDestPath->text());
|
||||
settings.setValue(QSL("studio/export/file_prefix"), linPrefix->text());
|
||||
settings.setValue(QSL("studio/export/file_postfix"), linPostfix->text());
|
||||
settings.setValue(QSL("studio/export/name_format"), cmbFileName->currentIndex());
|
||||
settings.setValue(QSL("studio/export/filetype"), cmbFileFormat->currentIndex());
|
||||
}
|
||||
@ -139,6 +141,7 @@ void ExportWindow::process()
|
||||
}
|
||||
|
||||
QString filePathPrefix = linDestPath->text() % QDir::separator() % linPrefix->text();
|
||||
QString postfix = linPostfix->text();
|
||||
|
||||
QStringList Feedback;
|
||||
int successCount = 0, errorCount = 0;
|
||||
@ -168,9 +171,9 @@ void ExportWindow::process()
|
||||
default: url_escaped += name_qchar; break;
|
||||
}
|
||||
}
|
||||
fileName = filePathPrefix % url_escaped % suffix;
|
||||
fileName = filePathPrefix % url_escaped % postfix % suffix;
|
||||
} else {
|
||||
fileName = filePathPrefix % dataString % suffix;
|
||||
fileName = filePathPrefix % dataString % postfix % suffix;
|
||||
}
|
||||
break;
|
||||
case 1: { /* Formatted Serial Number */
|
||||
@ -180,7 +183,7 @@ void ExportWindow::process()
|
||||
|
||||
pad.fill('0', biggest.length() - this_val.length());
|
||||
|
||||
fileName = filePathPrefix % pad % this_val % suffix;
|
||||
fileName = filePathPrefix % pad % this_val % postfix % suffix;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -82,6 +82,29 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="lblPostfix">
|
||||
<property name="text">
|
||||
<string>File Name Postfi&x:</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>The last part of the filenames</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>linPostfix</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="2">
|
||||
<widget class="QLineEdit" name="linPostfix">
|
||||
<property name="toolTip">
|
||||
<string>The last part of the filenames</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="lblFileName">
|
||||
<property name="text">
|
||||
<string>File &Name:</string>
|
||||
@ -94,7 +117,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="2">
|
||||
<item row="3" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="cmbFileName">
|
||||
<property name="toolTip">
|
||||
<string>Set the naming convention used by the files</string>
|
||||
@ -111,7 +134,7 @@
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="lblFileFormat">
|
||||
<property name="text">
|
||||
<string>File &Format:</string>
|
||||
@ -124,7 +147,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" colspan="2">
|
||||
<item row="4" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="cmbFileFormat">
|
||||
<property name="toolTip">
|
||||
<string>The type of file which you want to create</string>
|
||||
|
Loading…
Reference in New Issue
Block a user