From 59fa2e8ba496782204a9eecaa77837f780a857b2 Mon Sep 17 00:00:00 2001 From: hooper114 Date: Mon, 13 Jul 2009 19:04:52 +0000 Subject: [PATCH] GUI update --- frontend_qt4/grpAztec.ui | 165 +++++++++++++++++------------------- frontend_qt4/grpC49.ui | 52 ++++++++++++ frontend_qt4/grpCodeOne.ui | 19 ++++- frontend_qt4/mainwindow.cpp | 23 ++++- frontend_qt4/resources.qrc | 1 + 5 files changed, 168 insertions(+), 92 deletions(-) create mode 100644 frontend_qt4/grpC49.ui diff --git a/frontend_qt4/grpAztec.ui b/frontend_qt4/grpAztec.ui index 19ebba77..a1fe75e0 100644 --- a/frontend_qt4/grpAztec.ui +++ b/frontend_qt4/grpAztec.ui @@ -1,8 +1,7 @@ - - + grpAztec - - + + 0 0 @@ -10,277 +9,265 @@ 237 - + Form - + - - - - + + + + Automatic Resizing - + true - - - + + + Adjust Size To: - - - + + + false - - 15 x 15* + + 15 x 15 Compact - - 19 x 19* + + 19 x 19 Compact - - 23 x 23* + + 23 x 23 Compact - - 27 x 27* + + 27 x 27 Compact - + 19 x 19 - + 23 x 23 - + 27 x 27 - + 31 x 31 - + 37 x 37 - + 41 x 41 - + 45 x 45 - + 49 x 49 - + 53 x 53 - + 57 x 57 - + 61 x 61 - + 67 x 67 - + 71 x 71 - + 75 x 75 - + 79 x 79 - + 83 x 83 - + 87 x 87 - + 91 x 91 - + 95 x 95 - + 101 x 101 - + 105 x 105 - + 109 x 109 - + 113 x 113 - + 117 x 117 - + 121 x 121 - + 125 x 125 - + 131 x 131 - + 135 x 135 - + 139 x 139 - + 143 x 143 - + 147 x 147 - + 151 x 151 - - - + + + Add Minimum Error Correction: - - - + + + false - + 10% + 3 words - + 23% + 3 words - + 36% + 3 words - + 50% + 3 words - - - + + + Encode as GS-1 Data - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">* An asterisk indicates a "compact" symbol;</p> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">the rest are "full range" symbols.</p></body></html> - - - - - + + Qt::Vertical - + 20 53 @@ -298,11 +285,11 @@ p, li { white-space: pre-wrap; } cmbAztecSize setEnabled(bool) - + 85 47 - + 331 47 @@ -314,11 +301,11 @@ p, li { white-space: pre-wrap; } cmbAztecECC setEnabled(bool) - + 200 80 - + 366 80 diff --git a/frontend_qt4/grpC49.ui b/frontend_qt4/grpC49.ui new file mode 100644 index 00000000..899c61bb --- /dev/null +++ b/frontend_qt4/grpC49.ui @@ -0,0 +1,52 @@ + + grpC16k + + + + 0 + 0 + 186 + 123 + + + + Form + + + + + + Standard Mode + + + true + + + + + + + GS-1 Data Mode + + + + + + + Qt::Vertical + + + + 20 + 60 + + + + + + radC49Stand + radC49GS1 + + + + diff --git a/frontend_qt4/grpCodeOne.ui b/frontend_qt4/grpCodeOne.ui index 3d6a2f67..0e498b31 100644 --- a/frontend_qt4/grpCodeOne.ui +++ b/frontend_qt4/grpCodeOne.ui @@ -6,7 +6,7 @@ 0 0 310 - 78 + 124 @@ -86,6 +86,23 @@ + + + + Standard Mode + + + true + + + + + + + GS-1 Data Mode + + + diff --git a/frontend_qt4/mainwindow.cpp b/frontend_qt4/mainwindow.cpp index ccb88dbf..7ce79d05 100644 --- a/frontend_qt4/mainwindow.cpp +++ b/frontend_qt4/mainwindow.cpp @@ -159,9 +159,9 @@ bool MainWindow::save() void MainWindow::about() { QMessageBox::about(this, tr("About Zint"), - tr("

Zint Barcode Studio 0.3

" + tr("

Zint Barcode Studio 1.0

" "

A simple barcode generator" - "

Requires libzint 2.1.3 or greater." + "

Requires libzint 2.2 or greater." "

Visit the Zint Project Homepage for more information." "

Copyright © 2009 Robin Stuart & Bogdan Vatra.
" "QR Code support by Kentaro Fukuchi.
" @@ -405,8 +405,19 @@ void MainWindow::change_options() file.close(); tabMain->insertTab(1,m_optionWidget,tr("Code One")); connect(m_optionWidget->findChild("cmbC1Size"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview())); + connect(m_optionWidget->findChild("radC1GS1"), SIGNAL(toggled( bool )), SLOT(update_preview())); } + if(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_CODE49) + { + QFile file(":/grpC49.ui"); + if (!file.open(QIODevice::ReadOnly)) + return; + m_optionWidget=uiload.load(&file); + file.close(); + tabMain->insertTab(1,m_optionWidget,tr("Code 49")); + connect(m_optionWidget->findChild("radC49GS1"), SIGNAL(toggled( bool )), SLOT(update_preview())); + } switch(metaObject()->enumerator(0).value(bstyle->currentIndex())) { @@ -725,9 +736,17 @@ void MainWindow::update_preview() case BARCODE_CODEONE: m_bc.bc.setSymbol(BARCODE_CODEONE); + if(m_optionWidget->findChild("radC1GS1")->isChecked()) + m_bc.bc.setInputMode(GS1_MODE); m_bc.bc.setWidth(m_optionWidget->findChild("cmbC1Size")->currentIndex()); break; + case BARCODE_CODE49: + m_bc.bc.setSymbol(BARCODE_CODE49); + if(m_optionWidget->findChild("radC49GS1")->isChecked()) + m_bc.bc.setInputMode(GS1_MODE); + 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 b1ea54f5..0e9d88b6 100644 --- a/frontend_qt4/resources.qrc +++ b/frontend_qt4/resources.qrc @@ -18,5 +18,6 @@ grpMQR.ui grpQR.ui grpCodeOne.ui + grpC49.ui