diff --git a/backend/dotcode.c b/backend/dotcode.c
index 43af1576..aebab297 100644
--- a/backend/dotcode.c
+++ b/backend/dotcode.c
@@ -1594,9 +1594,7 @@ INTERNAL int dotcode(struct zint_symbol *symbol, unsigned char source[], int len
}
symbol->height = height;
- if (!(symbol->output_options & BARCODE_DOTTY_MODE)) {
- symbol->output_options += BARCODE_DOTTY_MODE;
- }
+ symbol->output_options |= BARCODE_DOTTY_MODE;
return 0;
}
diff --git a/backend/tests/data/eps/dotcode_0.1.eps b/backend/tests/data/eps/dotcode_0.1.eps
new file mode 100644
index 00000000..f4001533
--- /dev/null
+++ b/backend/tests/data/eps/dotcode_0.1.eps
@@ -0,0 +1,43 @@
+%!PS-Adobe-3.0 EPSF-3.0
+%%Creator: Zint 2.10.0.9
+%%Title: Zint Generated Symbol
+%%Pages: 0
+%%BoundingBox: 0 0 3 2
+%%EndComments
+/TD { newpath 0 360 arc fill } bind def
+/TB { 2 copy } bind def
+/TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def
+/TE { pop pop } bind def
+newpath
+1.00 1.00 1.00 setrgbcolor
+1.60 0.00 TB 0.00 2.20 TR
+TE
+0.00 0.00 0.00 setrgbcolor
+0.10 1.50 0.08 TD
+0.90 1.50 0.08 TD
+1.30 1.50 0.08 TD
+1.70 1.50 0.08 TD
+2.10 1.50 0.08 TD
+0.70 1.30 0.08 TD
+1.10 1.30 0.08 TD
+1.50 1.30 0.08 TD
+0.10 1.10 0.08 TD
+0.50 1.10 0.08 TD
+1.30 1.10 0.08 TD
+1.70 1.10 0.08 TD
+2.10 1.10 0.08 TD
+0.30 0.90 0.08 TD
+0.10 0.70 0.08 TD
+2.10 0.70 0.08 TD
+0.30 0.50 0.08 TD
+0.70 0.50 0.08 TD
+1.10 0.50 0.08 TD
+1.50 0.50 0.08 TD
+0.10 0.30 0.08 TD
+0.50 0.30 0.08 TD
+1.70 0.30 0.08 TD
+2.10 0.30 0.08 TD
+0.30 0.10 0.08 TD
+0.70 0.10 0.08 TD
+1.50 0.10 0.08 TD
+1.90 0.10 0.08 TD
diff --git a/backend/tests/test_ps.c b/backend/tests/test_ps.c
index 0b3a788a..1a3a6a63 100644
--- a/backend/tests/test_ps.c
+++ b/backend/tests/test_ps.c
@@ -65,29 +65,31 @@ static void test_print(int index, int generate, int debug) {
/* 10*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT | BOLD_TEXT, -1, -1, -1, -1, 0, 0, "", "", 0, "0123456+12345", "upce_5addon_small_bold.eps" },
/* 11*/ { BARCODE_CODE128, UNICODE_MODE, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "A\\B)รง(D", "code128_escape_latin1.eps" },
/* 12*/ { BARCODE_DBAR_LTD, -1, -1, BOLD_TEXT, -1, -1, -1, -1, 0, 0, "", "", 0, "1501234567890", "dbar_ltd_24724_fig7_bold.eps" },
- /* 13*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "12", "dotcode_1.0.eps" },
- /* 14*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0, 0.1, "", "", 0, "12", "dotcode_1.0_ds0.1.eps" },
- /* 15*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0, 1.1, "", "", 0, "12", "dotcode_1.0_ds1.1.eps" },
- /* 16*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 1.5, 0, "", "", 0, "12", "dotcode_1.5.eps" },
- /* 17*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 1.5, 0.4, "", "", 0, "12", "dotcode_1.5_ds0.4.eps" },
- /* 18*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 1.5, 1.1, "", "", 0, "12", "dotcode_1.5_ds1.1.eps" },
- /* 19*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 1.5, 2.1, "", "", 0, "12", "dotcode_1.5_ds2.1.eps" },
- /* 20*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 2, 0, "", "", 0, "12", "dotcode_2.0.eps" },
- /* 21*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 2, 0.9, "", "", 0, "12", "dotcode_2.0_ds0.9.eps" },
- /* 22*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 2, 1.1, "", "", 0, "12", "dotcode_2.0_ds1.1.eps" },
- /* 23*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3, 0, "", "", 0, "12", "dotcode_3.0.eps" },
- /* 24*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3, 0.4, "", "", 0, "12", "dotcode_3.0_ds0.4.eps" },
- /* 25*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3, 1.1, "", "", 0, "12", "dotcode_3.0_ds1.1.eps" },
- /* 26*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3.5, 0, "", "", 0, "12", "dotcode_3.5.eps" },
- /* 27*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3.5, 0.4, "", "", 0, "12", "dotcode_3.5_ds0.4.eps" },
- /* 28*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3.5, 1.1, "", "", 0, "12", "dotcode_3.5_ds1.1.eps" },
- /* 29*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 5, 0, "", "", 0, "12", "dotcode_5.0.eps" },
- /* 30*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 5, 0.2, "", "", 0, "12", "dotcode_5.0_ds0.2.eps" },
- /* 31*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 5, 1.1, "", "", 0, "12", "dotcode_5.0_ds1.1.eps" },
- /* 32*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 5, 1.7, "", "", 0, "12", "dotcode_5.0_ds1.7.eps" },
- /* 33*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0, 0, "FF0000", "0000FF00", 0, "12", "dotcode_no_bg.eps" },
- /* 34*/ { BARCODE_MAXICODE, -1, -1, CMYK_COLOUR, -1, -1, -1, -1, 0, 0, "", "", 270, "12", "maxicode_rotate_270_cmyk.eps" },
- /* 35*/ { BARCODE_MAXICODE, -1, -1, -1, 3, -1, -1, -1, 0, 0, "", "0000FF00", 180, "12", "maxicode_no_bg_hwsp3_rotate_180.eps" },
+ /* 13*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0.1, 0, "", "", 0, "12", "dotcode_0.1.eps" },
+ /* 14*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0.08, 0, "", "", 0, "12", "dotcode_0.1.eps" },
+ /* 15*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "12", "dotcode_1.0.eps" },
+ /* 16*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0, 0.1, "", "", 0, "12", "dotcode_1.0_ds0.1.eps" },
+ /* 17*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0, 1.1, "", "", 0, "12", "dotcode_1.0_ds1.1.eps" },
+ /* 18*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 1.5, 0, "", "", 0, "12", "dotcode_1.5.eps" },
+ /* 19*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 1.5, 0.4, "", "", 0, "12", "dotcode_1.5_ds0.4.eps" },
+ /* 20*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 1.5, 1.1, "", "", 0, "12", "dotcode_1.5_ds1.1.eps" },
+ /* 21*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 1.5, 2.1, "", "", 0, "12", "dotcode_1.5_ds2.1.eps" },
+ /* 22*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 2, 0, "", "", 0, "12", "dotcode_2.0.eps" },
+ /* 23*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 2, 0.9, "", "", 0, "12", "dotcode_2.0_ds0.9.eps" },
+ /* 24*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 2, 1.1, "", "", 0, "12", "dotcode_2.0_ds1.1.eps" },
+ /* 25*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3, 0, "", "", 0, "12", "dotcode_3.0.eps" },
+ /* 26*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3, 0.4, "", "", 0, "12", "dotcode_3.0_ds0.4.eps" },
+ /* 27*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3, 1.1, "", "", 0, "12", "dotcode_3.0_ds1.1.eps" },
+ /* 28*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3.5, 0, "", "", 0, "12", "dotcode_3.5.eps" },
+ /* 29*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3.5, 0.4, "", "", 0, "12", "dotcode_3.5_ds0.4.eps" },
+ /* 30*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3.5, 1.1, "", "", 0, "12", "dotcode_3.5_ds1.1.eps" },
+ /* 31*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 5, 0, "", "", 0, "12", "dotcode_5.0.eps" },
+ /* 32*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 5, 0.2, "", "", 0, "12", "dotcode_5.0_ds0.2.eps" },
+ /* 33*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 5, 1.1, "", "", 0, "12", "dotcode_5.0_ds1.1.eps" },
+ /* 34*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 5, 1.7, "", "", 0, "12", "dotcode_5.0_ds1.7.eps" },
+ /* 35*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0, 0, "FF0000", "0000FF00", 0, "12", "dotcode_no_bg.eps" },
+ /* 36*/ { BARCODE_MAXICODE, -1, -1, CMYK_COLOUR, -1, -1, -1, -1, 0, 0, "", "", 270, "12", "maxicode_rotate_270_cmyk.eps" },
+ /* 37*/ { BARCODE_MAXICODE, -1, -1, -1, 3, -1, -1, -1, 0, 0, "", "0000FF00", 180, "12", "maxicode_no_bg_hwsp3_rotate_180.eps" },
};
int data_size = ARRAY_SIZE(data);
int i, length, ret;
diff --git a/backend/vector.c b/backend/vector.c
index f9c7c9fa..f7035863 100644
--- a/backend/vector.c
+++ b/backend/vector.c
@@ -208,6 +208,10 @@ static void vector_scale(struct zint_symbol *symbol, int file_type) {
struct zint_vector_string *string;
float scale = symbol->scale * 2.0f;
+ if (scale < 0.2f) { // Minimum vector scale 0.1
+ scale = 0.2f;
+ }
+
if ((file_type == OUT_EMF_FILE) && (symbol->symbology == BARCODE_MAXICODE)) {
// Increase size to overcome limitations in EMF file format
scale *= 20;
diff --git a/frontend_qt/grpMaxicode.ui b/frontend_qt/grpMaxicode.ui
index ae2d2d72..efbb0f39 100644
--- a/frontend_qt/grpMaxicode.ui
+++ b/frontend_qt/grpMaxicode.ui
@@ -30,6 +30,14 @@
Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
+ Mode 2 (numeric postcode) and Mode 3 (alphanumeric postcode)
+use a Structured Carrier Message (SCM) of 3 fields:
+Postcode, Country Code, Service Class
+Mode 4 uses enhanced ECC for the primary part of the message
+Mode 5 uses enhanced ECC for all of the message
+Mode 6 sets the scanner (Reader Initialisation/Programming)
+
cmbMaxiMode
@@ -43,6 +51,14 @@
0
+
+ Mode 2 (numeric postcode) and Mode 3 (alphanumeric postcode)
+use a Structured Carrier Message (SCM) of 3 fields:
+Postcode, Country Code, Service Class
+Mode 4 uses enhanced ECC for the primary part of the message
+Mode 5 uses enhanced ECC for all of the message
+Mode 6 sets the scanner (Reader Initialisation/Programming)
+
1
@@ -68,105 +84,223 @@
- -
-
-
- false
-
-
- P&rimary Message:
-
-
- Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
-
-
- txtMaxiPrimary
-
-
- Format "PPPPPPPPPCCCSSS" where
-P is postcode of up to 9 digits for Mode 2 or
-6 alphanumerics for Mode 3 (will truncate) and
-C is 3-digit country code
-S is 3-digit service class
-(ignored if disabled)
-
-
-
- -
-
-
- false
-
-
-
- 0
- 0
-
-
-
- Primary Message Here!
-
-
-
- -
-
-
- false
-
-
- Enable S&CM Prefix
-
-
- Prefix Secondary Carrier Message with "[)>\R01\Gvv"
-where "vv" is version given below
-(ignored if disabled)
-
-
-
- -
-
-
- false
-
-
- SCM Pre&fix Version:
-
-
- Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
-
-
- spnMaxiSCMVV
-
-
- Version "vv" to place at end of SCM prefix (default 96)
-(ignored if disabled)
-
-
-
- -
-
-
- false
-
-
-
-
-
-
-
-
- 0
-
-
- 99
-
-
- 96
-
-
-
+ -
+
+
+ Structured Carrier Message
+
+
+ For Modes 2 and 3 only
+
+
+
-
+
+
+ false
+
+
+ Postcode of up to 9 digits for Mode 2 or
+6 alphanumerics for Mode 3 (will truncate)
+Postcodes less than maximum length will
+be padded with spaces
+(ignored if disabled)
+
+
+ Pos&tcode:
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
+
+ txtMaxiSCMPostcode
+
+
+
+ -
+
+
+ false
+
+
+ Postcode of up to 9 digits for Mode 2 or
+6 alphanumerics for Mode 3 (will truncate)
+Postcodes less than maximum length will
+be padded with spaces
+(ignored if disabled)
+
+
+
+ 0
+ 0
+
+
+
+ 9
+
+
+
+ -
+
+
+ false
+
+
+ ISO 3166 numeric country code
+Value ranges from 000 to 999
+(ignored if disabled)
+
+
+ Cou&ntry code:
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
+
+ spnMaxiSCMCountry
+
+
+
+ -
+
+
+ false
+
+
+ ISO 3166 numeric country code
+Value ranges from 000 to 999
+(ignored if disabled)
+
+
+
+
+
+
+
+
+ 0
+
+
+ 999
+
+
+ 0
+
+
+
+ -
+
+
+ false
+
+
+ Class of service, assigned by carrier
+Value ranges from 000 to 999
+(ignored if disabled)
+
+
+ Se&rvice Class:
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
+
+ spnMaxiSCMService
+
+
+
+ -
+
+
+ false
+
+
+ Class of service, assigned by carrier
+Value ranges from 000 to 999
+(ignored if disabled)
+
+
+
+
+
+
+
+
+ 0
+
+
+ 999
+
+
+ 0
+
+
+
+ -
+
+
+ false
+
+
+ Prefix Structured Carrier Message with "[)>\R01\Gvv"
+(ANS MH10.8.2 Format 01) where "vv" is version given below
+(ignored if disabled)
+
+
+ Enable S&CM Prefix
+
+
+
+ -
+
+
+ false
+
+
+ Version "vv" to place at end of SCM prefix (default 96)
+(ignored if disabled)
+
+
+ SCM Pre&fix Version:
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
+
+ spnMaxiSCMVV
+
+
+
+ -
+
+
+ false
+
+
+ Version "vv" to place at end of SCM prefix (default 96)
+(ignored if disabled)
+
+
+
+
+
+
+
+
+ 0
+
+
+ 99
+
+
+ 96
+
+
+
+
+
+
-
@@ -175,7 +309,7 @@ where "vv" is version given below
20
- 40
+ 20
diff --git a/frontend_qt/mainWindow.ui b/frontend_qt/mainWindow.ui
index 2446643a..a7dd3bb7 100644
--- a/frontend_qt/mainWindow.ui
+++ b/frontend_qt/mainWindow.ui
@@ -722,6 +722,9 @@ as delimiters for GS1 Application Identifiers
50.000000000000000
+
+ true
+
-
@@ -870,7 +873,7 @@ in X-dimensions
2
- 0.500000000000000
+ 0.100000000000000
99.500000000000000
diff --git a/frontend_qt/mainwindow.cpp b/frontend_qt/mainwindow.cpp
index 8522be98..f046fe35 100644
--- a/frontend_qt/mainwindow.cpp
+++ b/frontend_qt/mainwindow.cpp
@@ -895,10 +895,12 @@ void MainWindow::change_options()
file.close();
tabMain->insertTab(1, m_optionWidget, tr("MaxiCod&e"));
connect(m_optionWidget->findChild("cmbMaxiMode"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(m_optionWidget->findChild("cmbMaxiMode"), SIGNAL(currentIndexChanged( int )), SLOT(maxi_primary()));
- connect(m_optionWidget->findChild("txtMaxiPrimary"), SIGNAL(textChanged( const QString& )), SLOT(update_preview()));
+ connect(m_optionWidget->findChild("cmbMaxiMode"), SIGNAL(currentIndexChanged( int )), SLOT(maxi_scm()));
+ connect(m_optionWidget->findChild("txtMaxiSCMPostcode"), SIGNAL(textChanged( const QString& )), SLOT(update_preview()));
+ connect(m_optionWidget->findChild("spnMaxiSCMCountry"), SIGNAL(valueChanged( int )), SLOT(update_preview()));
+ connect(m_optionWidget->findChild("spnMaxiSCMService"), SIGNAL(valueChanged( int )), SLOT(update_preview()));
connect(m_optionWidget->findChild("chkMaxiSCMVV"), SIGNAL(stateChanged( int )), SLOT(update_preview()));
- connect(m_optionWidget->findChild("chkMaxiSCMVV"), SIGNAL(stateChanged( int )), SLOT(maxi_primary()));
+ connect(m_optionWidget->findChild("chkMaxiSCMVV"), SIGNAL(stateChanged( int )), SLOT(maxi_scm()));
connect(m_optionWidget->findChild("spnMaxiSCMVV"), SIGNAL(valueChanged( int )), SLOT(update_preview()));
} else if (symbology == BARCODE_CHANNEL) {
@@ -1071,24 +1073,24 @@ void MainWindow::composite_ean_check()
chkComposite->setChecked(false);
}
-void MainWindow::maxi_primary()
+void MainWindow::maxi_scm()
{
if (bstyle_items[bstyle->currentIndex()].symbology != BARCODE_MAXICODE)
return;
+
QCheckBox *chkMaxiSCMVV = m_optionWidget->findChild("chkMaxiSCMVV");
- if (m_optionWidget->findChild("cmbMaxiMode")->currentIndex() == 0) {
- m_optionWidget->findChild("lblMaxiPrimary")->setEnabled(true);
- m_optionWidget->findChild("txtMaxiPrimary")->setEnabled(true);
- chkMaxiSCMVV->setEnabled(true);
- m_optionWidget->findChild("lblMaxiSCMVV")->setEnabled(chkMaxiSCMVV->isChecked());
- m_optionWidget->findChild("spnMaxiSCMVV")->setEnabled(chkMaxiSCMVV->isChecked());
- } else {
- m_optionWidget->findChild("lblMaxiPrimary")->setEnabled(false);
- m_optionWidget->findChild("txtMaxiPrimary")->setEnabled(false);
- chkMaxiSCMVV->setEnabled(false);
- m_optionWidget->findChild("lblMaxiSCMVV")->setEnabled(false);
- m_optionWidget->findChild("spnMaxiSCMVV")->setEnabled(false);
- }
+
+ bool isMode2or3 = m_optionWidget->findChild("cmbMaxiMode")->currentIndex() == 0;
+
+ m_optionWidget->findChild("lblMaxiSCMPostcode")->setEnabled(isMode2or3);
+ m_optionWidget->findChild("txtMaxiSCMPostcode")->setEnabled(isMode2or3);
+ m_optionWidget->findChild("lblMaxiSCMCountry")->setEnabled(isMode2or3);
+ m_optionWidget->findChild("spnMaxiSCMCountry")->setEnabled(isMode2or3);
+ m_optionWidget->findChild("lblMaxiSCMService")->setEnabled(isMode2or3);
+ m_optionWidget->findChild("spnMaxiSCMService")->setEnabled(isMode2or3);
+ chkMaxiSCMVV->setEnabled(isMode2or3);
+ m_optionWidget->findChild("lblMaxiSCMVV")->setEnabled(isMode2or3 && chkMaxiSCMVV->isChecked());
+ m_optionWidget->findChild("spnMaxiSCMVV")->setEnabled(isMode2or3 && chkMaxiSCMVV->isChecked());
}
void MainWindow::msi_plessey_ui_set()
@@ -1290,23 +1292,22 @@ void MainWindow::update_preview()
case BARCODE_PDF417:
m_bc.bc.setOption2(m_optionWidget->findChild("cmbPDFCols")->currentIndex());
m_bc.bc.setOption1(m_optionWidget->findChild("cmbPDFECC")->currentIndex() - 1);
- if(m_optionWidget->findChild("radPDFStand")->isChecked())
- m_bc.bc.setSymbol(BARCODE_PDF417);
- if(m_optionWidget->findChild("radPDFTruncated")->isChecked())
+ if (m_optionWidget->findChild("radPDFTruncated")->isChecked())
m_bc.bc.setSymbol(BARCODE_PDF417COMP);
-
- if(m_optionWidget->findChild("radPDFHIBC")->isChecked())
+ else if (m_optionWidget->findChild("radPDFHIBC")->isChecked())
m_bc.bc.setSymbol(BARCODE_HIBC_PDF);
+ else
+ m_bc.bc.setSymbol(BARCODE_PDF417);
break;
case BARCODE_MICROPDF417:
m_bc.bc.setOption2(m_optionWidget->findChild("cmbMPDFCols")->currentIndex());
- if(m_optionWidget->findChild("radMPDFStand")->isChecked())
- m_bc.bc.setSymbol(BARCODE_MICROPDF417);
- if(m_optionWidget->findChild("radMPDFHIBC")->isChecked())
+ if (m_optionWidget->findChild("radMPDFHIBC")->isChecked())
m_bc.bc.setSymbol(BARCODE_HIBC_MICPDF);
+ else
+ m_bc.bc.setSymbol(BARCODE_MICROPDF417);
break;
case BARCODE_DOTCODE:
@@ -1549,17 +1550,18 @@ void MainWindow::update_preview()
case BARCODE_MAXICODE:
m_bc.bc.setSymbol(BARCODE_MAXICODE);
- if(m_optionWidget->findChild("cmbMaxiMode")->currentIndex() == 0)
- {
+ if (m_optionWidget->findChild("cmbMaxiMode")->currentIndex() == 0) {
m_bc.bc.setOption1(0); /* Auto-determine mode 2 or 3 from primary message (checks that it isn't empty) */
- m_bc.bc.setPrimaryMessage(m_optionWidget->findChild("txtMaxiPrimary")->text());
+ m_bc.bc.setPrimaryMessage(QString::asprintf("%s%03d%03d",
+ get_lineedit_val("txtMaxiSCMPostcode").toUtf8().constData(),
+ get_spinbox_val("spnMaxiSCMCountry"), get_spinbox_val("spnMaxiSCMService")));
QCheckBox *chkMaxiSCMVV = m_optionWidget->findChild("chkMaxiSCMVV");
if (chkMaxiSCMVV->isEnabled() && chkMaxiSCMVV->isChecked()) {
m_bc.bc.setOption2(m_optionWidget->findChild("spnMaxiSCMVV")->value() + 1);
}
- }
- else
+ } else {
m_bc.bc.setOption1(m_optionWidget->findChild("cmbMaxiMode")->currentIndex() + 3);
+ }
break;
case BARCODE_CHANNEL:
@@ -2135,7 +2137,9 @@ void MainWindow::save_sub_settings(QSettings &settings, int symbology) {
case BARCODE_MAXICODE:
settings.setValue("studio/bc/maxicode/mode", get_combobox_index("cmbMaxiMode"));
- settings.setValue("studio/bc/maxicode/primary_message", get_lineedit_val("txtMaxiPrimary"));
+ settings.setValue("studio/bc/maxicode/scm_postcode", get_lineedit_val("txtMaxiSCMPostcode"));
+ settings.setValue("studio/bc/maxicode/scm_country", get_spinbox_val("spnMaxiSCMCountry"));
+ settings.setValue("studio/bc/maxicode/scm_service", get_spinbox_val("spnMaxiSCMService"));
settings.setValue("studio/bc/maxicode/chk_scm_vv", get_checkbox_val("chkMaxiSCMVV"));
settings.setValue("studio/bc/maxicode/spn_scm_vv", get_spinbox_val("spnMaxiSCMVV"));
break;
@@ -2389,7 +2393,9 @@ void MainWindow::load_sub_settings(QSettings &settings, int symbology) {
case BARCODE_MAXICODE:
set_combobox_from_setting(settings, "studio/bc/maxicode/mode", "cmbMaxiMode", 1);
- set_lineedit_from_setting(settings, "studio/bc/maxicode/primary_message", "txtMaxiPrimary", "Primary Message Here!");
+ set_lineedit_from_setting(settings, "studio/bc/maxicode/scm_postcode", "txtMaxiSCMPostcode", "");
+ set_spinbox_from_setting(settings, "studio/bc/maxicode/scm_country", "spnMaxiSCMCountry", 0);
+ set_spinbox_from_setting(settings, "studio/bc/maxicode/scm_service", "spnMaxiSCMService", 0);
set_checkbox_from_setting(settings, "studio/bc/maxicode/chk_scm_vv", "chkMaxiSCMVV");
set_spinbox_from_setting(settings, "studio/bc/maxicode/spn_scm_vv", "spnMaxiSCMVV", 96); /* 96 is ASC MH10/SC 8 */
break;
diff --git a/frontend_qt/mainwindow.h b/frontend_qt/mainwindow.h
index 4d65db05..9369f117 100644
--- a/frontend_qt/mainwindow.h
+++ b/frontend_qt/mainwindow.h
@@ -42,7 +42,7 @@ public slots:
void on_bgcolor_clicked();
void composite_ui_set();
void composite_ean_check();
- void maxi_primary();
+ void maxi_scm();
void msi_plessey_ui_set();
void change_print_scale();
void change_cmyk();