From ca824684acfe160dfc878d502c77918815b555f8 Mon Sep 17 00:00:00 2001 From: hooper114 Date: Sun, 9 Aug 2009 23:00:47 +0000 Subject: [PATCH] Add GS1data support to QR Code in zint-qt --- frontend_qt4/grpQR.ui | 70 ++++++++++++++++++++++++++++++++----- frontend_qt4/mainwindow.cpp | 9 +++-- 2 files changed, 69 insertions(+), 10 deletions(-) diff --git a/frontend_qt4/grpQR.ui b/frontend_qt4/grpQR.ui index cf2f3d8b..e81d8709 100644 --- a/frontend_qt4/grpQR.ui +++ b/frontend_qt4/grpQR.ui @@ -6,7 +6,7 @@ 0 0 441 - 171 + 208 @@ -273,15 +273,69 @@ - - - - &HIBC QR Code - - - + + + + + 0 + 70 + + + + Data Encoding + + + + + 10 + 17 + 102 + 24 + + + + + 0 + 0 + + + + S&tandard + + + true + + + + + + 200 + 14 + 142 + 24 + + + + &HIBC QR Code + + + + + + 9 + 41 + 151 + 24 + + + + &GS-1 Data Mode + + + + diff --git a/frontend_qt4/mainwindow.cpp b/frontend_qt4/mainwindow.cpp index f2fd8135..c004f919 100644 --- a/frontend_qt4/mainwindow.cpp +++ b/frontend_qt4/mainwindow.cpp @@ -365,7 +365,9 @@ void MainWindow::change_options() connect(m_optionWidget->findChild("radQRECC"), SIGNAL(clicked( bool )), SLOT(update_preview())); connect(m_optionWidget->findChild("cmbQRSize"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview())); connect(m_optionWidget->findChild("cmbQRECC"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview())); - connect(m_optionWidget->findChild("chkQRHIBC"), SIGNAL(stateChanged( int )), SLOT(update_preview())); + connect(m_optionWidget->findChild("radQRStand"), SIGNAL(clicked( bool )), SLOT(update_preview())); + connect(m_optionWidget->findChild("radQRGS1"), SIGNAL(clicked( bool )), SLOT(update_preview())); + connect(m_optionWidget->findChild("radQRHIBC"), SIGNAL(clicked( bool )), SLOT(update_preview())); } if(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_MICROQR) @@ -705,11 +707,14 @@ void MainWindow::update_preview() break; case BARCODE_QRCODE: - if(m_optionWidget->findChild("chkQRHIBC")->isChecked()) + if(m_optionWidget->findChild("radQRHIBC")->isChecked()) m_bc.bc.setSymbol(BARCODE_HIBC_QR); else m_bc.bc.setSymbol(BARCODE_QRCODE); + if(m_optionWidget->findChild("radQRGS1")->isChecked()) + m_bc.bc.setInputMode(GS1_MODE); + if(m_optionWidget->findChild("radQRSize")->isChecked()) m_bc.bc.setWidth(m_optionWidget->findChild("cmbQRSize")->currentIndex() + 1);