diff --git a/frontend_qt4/grpGrid.ui b/frontend_qt4/grpGrid.ui new file mode 100644 index 00000000..ec97a31a --- /dev/null +++ b/frontend_qt4/grpGrid.ui @@ -0,0 +1,199 @@ + + + grpGrid + + + + 0 + 0 + 423 + 159 + + + + Form + + + + + + + + A&utomatic Resizing + + + true + + + + + + + Adjust Si&ze To: + + + + + + + false + + + + 18 x 18 (Version 1) + + + + + 30 x 30 (Version 2) + + + + + 42 x 40 (Version 3) + + + + + 54 x 54 (Version 4) + + + + + 66 x 66 (Version 5) + + + + + 78 x 78 (Version 6) + + + + + 90 x 90 (Version 7) + + + + + 102 x 102 (Version 8) + + + + + 114 x 114 (Version 9) + + + + + 126 x 126 (Version 10) + + + + + 138 x 138 (Version 11) + + + + + 150 x 150 (Version 12) + + + + + 162 x 162 (Version 13) + + + + + + + + Add &Error Correction: + + + + + + + false + + + + ~10% + + + + + ~20% + + + + + ~30% + + + + + ~40% + + + + + ~50% + + + + + + + + + + Qt::Vertical + + + + 20 + 50 + + + + + + + + + + radGridSize + toggled(bool) + cmbGridSize + setEnabled(bool) + + + 98 + 54 + + + 279 + 53 + + + + + radGridECC + toggled(bool) + cmbGridECC + setEnabled(bool) + + + 114 + 89 + + + 279 + 89 + + + + + diff --git a/frontend_qt4/grpQR.ui b/frontend_qt4/grpQR.ui index e81d8709..f33df9f1 100644 --- a/frontend_qt4/grpQR.ui +++ b/frontend_qt4/grpQR.ui @@ -1,7 +1,8 @@ - + + grpQR - - + + 0 0 @@ -9,265 +10,265 @@ 208 - + Form - + - - - - + + + + A&utomatic Resizing - + true - - - + + + Adjust Si&ze To: - - - + + + false - + 21 x 21 (Version 1) - + 25 x 25 (Version 2) - + 29 x 29 (Version 3) - + 33 x 33 (Version 4) - + 37 x 37 (Version 5) - + 41 x 41 (Version 6) - + 45 x 45 (Version 7) - + 49 x 49 (Version 8) - + 53 x 53 (Version 9) - + 57 x 57 (Version 10) - + 61 x 61 (Version 11) - + 65 x 65 (Version 12) - + 69 x 69 (Version 13) - + 73 x 73 (Version 14) - + 77 x 77 (Version 15) - + 81 x 81 (Version 16) - + 85 x 85 (Version 17) - + 89 x 89 (Version 18) - + 93 x 93 (Version 19) - + 97 x 97 (Version 20) - + 101 x 101 (Version 21) - + 105 x 105 (Version 22) - + 109 x 109 (Version 23) - + 113 x 113 (Version 24) - + 117 x 117 (Version 25) - + 121 x 121 (Version 26) - + 125 x 125 (Version 27) - + 129 x 129 (Version 28) - + 133 x 133 (Version 29) - + 137 x 137 (Version 30) - + 141 x 141 (Version 31) - + 145 x 145 (Version 32) - + 149 x 149 (Version 33) - + 153 x 153 (Version 34) - + 157 x 157 (Version 35) - - 161x 161 (Version 36) + + 161 x 161 (Version 36) - + 165 x 165 (Version 37) - + 169 x 169 (Version 38) - + 173 x 173 (Version 39) - + 177 x 177 (Version 40) - - - + + + Add &Error Correction: - - - + + + false - + ~20% (Level L) - + ~37% (Level M) - + ~55% (Level Q) - + ~65% (Level H) @@ -276,18 +277,18 @@ - - + + 0 70 - + Data Encoding - - + + 10 17 @@ -295,21 +296,21 @@ 24 - + 0 0 - + S&tandard - + true - - + + 200 14 @@ -317,12 +318,12 @@ 24 - + &HIBC QR Code - - + + 9 41 @@ -330,18 +331,18 @@ 24 - + &GS-1 Data Mode - - + + Qt::Vertical - + 20 35 @@ -359,11 +360,11 @@ cmbQRSize setEnabled(bool) - + 89 39 - + 255 46 @@ -375,11 +376,11 @@ cmbQRECC setEnabled(bool) - + 95 79 - + 308 79 diff --git a/frontend_qt4/mainwindow.cpp b/frontend_qt4/mainwindow.cpp index eb855767..28e20aeb 100644 --- a/frontend_qt4/mainwindow.cpp +++ b/frontend_qt4/mainwindow.cpp @@ -409,6 +409,21 @@ void MainWindow::change_options() connect(m_optionWidget->findChild("cmbMQRSize"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview())); connect(m_optionWidget->findChild("cmbMQRECC"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview())); } + + if(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_GRIDMATRIX) + { + QFile file(":/grpGrid.ui"); + if (!file.open(QIODevice::ReadOnly)) + return; + m_optionWidget=uiload.load(&file); + file.close(); + tabMain->insertTab(1,m_optionWidget,tr("Grid Matrix")); + connect(m_optionWidget->findChild("radGridAuto"), SIGNAL(clicked( bool )), SLOT(update_preview())); + connect(m_optionWidget->findChild("radGridSize"), SIGNAL(clicked( bool )), SLOT(update_preview())); + connect(m_optionWidget->findChild("radGridECC"), SIGNAL(clicked( bool )), SLOT(update_preview())); + connect(m_optionWidget->findChild("cmbGridSize"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview())); + connect(m_optionWidget->findChild("cmbGridECC"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview())); + } if(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_MAXICODE) { @@ -750,11 +765,20 @@ void MainWindow::update_preview() case BARCODE_MICROQR: m_bc.bc.setSymbol(BARCODE_MICROQR); if(m_optionWidget->findChild("radMQRSize")->isChecked()) - m_bc.bc.setWidth(m_optionWidget->findChild("cmbMQRSize")->currentIndex() + 1); + m_bc.bc.setWidth(m_optionWidget->findChild("cmbMQRSize")->currentIndex()); if(m_optionWidget->findChild("radMQRECC")->isChecked()) m_bc.bc.setSecurityLevel(m_optionWidget->findChild("cmbMQRECC")->currentIndex() + 1); break; + + case BARCODE_GRIDMATRIX: + m_bc.bc.setSymbol(BARCODE_GRIDMATRIX); + if(m_optionWidget->findChild("radGridSize")->isChecked()) + m_bc.bc.setWidth(m_optionWidget->findChild("cmbGridSize")->currentIndex() + 1); + + if(m_optionWidget->findChild("radGridECC")->isChecked()) + m_bc.bc.setSecurityLevel(m_optionWidget->findChild("cmbGridECC")->currentIndex() + 1); + break; case BARCODE_MAXICODE: m_bc.bc.setSymbol(BARCODE_MAXICODE); diff --git a/frontend_qt4/resources.qrc b/frontend_qt4/resources.qrc index ec01b052..800b5381 100644 --- a/frontend_qt4/resources.qrc +++ b/frontend_qt4/resources.qrc @@ -20,5 +20,6 @@ grpQR.ui grpCodeOne.ui grpC49.ui + grpGrid.ui