diff --git a/frontend_qt4/grpCodeOne.ui b/frontend_qt4/grpCodeOne.ui new file mode 100644 index 00000000..ffacd57e --- /dev/null +++ b/frontend_qt4/grpCodeOne.ui @@ -0,0 +1,126 @@ + + grpChannel + + + + 0 + 0 + 310 + 78 + + + + Form + + + + + + + + Symbol Size: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + Automatic + + + + + 16 x 18 (Version A) + + + + + 22 x 22 (Version B) + + + + + 28 x 32 (Version C) + + + + + 40 x 42 (Version D) + + + + + 52 x 54 (Version E) + + + + + 70 x 76 (Version F) + + + + + 104 x 98 (Version G) + + + + + 148 x 134 (Version H) + + + + + 9 x 13 (Version S-10) + + + + + 9 x 23 (Version S-20) + + + + + 9 x 33 (Version S-30) + + + + + 17 x 19 (Version T-16) + + + + + 17 x 35 (Version T-32) + + + + + 17 x 51 (Version T-48) + + + + + + + + + + Qt::Vertical + + + + 20 + 30 + + + + + + + + + diff --git a/frontend_qt4/mainwindow.cpp b/frontend_qt4/mainwindow.cpp index 7e80d007..d8aacb9a 100644 --- a/frontend_qt4/mainwindow.cpp +++ b/frontend_qt4/mainwindow.cpp @@ -416,6 +416,17 @@ void MainWindow::change_options() tabMain->insertTab(1,m_optionWidget,tr("Channel Code")); connect(m_optionWidget->findChild("cmbChannel"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview())); } + + if(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_CODEONE) + { + QFile file(":/grpCodeOne.ui"); + if (!file.open(QIODevice::ReadOnly)) + return; + m_optionWidget=uiload.load(&file); + file.close(); + tabMain->insertTab(1,m_optionWidget,tr("Code One")); + connect(m_optionWidget->findChild("cmbC1Size"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview())); + } switch(metaObject()->enumerator(0).value(bstyle->currentIndex())) @@ -732,6 +743,12 @@ void MainWindow::update_preview() else m_bc.bc.setWidth(m_optionWidget->findChild("cmbChannel")->currentIndex() + 2); break; + + case BARCODE_CODEONE: + m_bc.bc.setSymbol(BARCODE_CODEONE); + m_bc.bc.setWidth(m_optionWidget->findChild("cmbC1Size")->currentIndex()); + break; + default: m_bc.bc.setSymbol(metaObject()->enumerator(0).value(bstyle->currentIndex())); break; diff --git a/frontend_qt4/resources.qrc b/frontend_qt4/resources.qrc index a257cb37..b1ea54f5 100644 --- a/frontend_qt4/resources.qrc +++ b/frontend_qt4/resources.qrc @@ -17,5 +17,6 @@ grpCodablock.ui grpMQR.ui grpQR.ui + grpCodeOne.ui