From f2e67de4ea431bedb07c53a3ce49c19555bb80da Mon Sep 17 00:00:00 2001 From: hooper114 Date: Thu, 16 Jul 2009 12:59:22 +0000 Subject: [PATCH] Polish the GUI a bit --- frontend_qt4/grpAztec.ui | 8 +- frontend_qt4/grpC128.ui | 61 +++++++------ frontend_qt4/grpC16k.ui | 31 ++++--- frontend_qt4/grpC39.ui | 37 ++++---- frontend_qt4/grpC49.ui | 6 +- frontend_qt4/grpChannel.ui | 48 +++++----- frontend_qt4/grpCodablock.ui | 37 ++++---- frontend_qt4/grpCodeOne.ui | 16 +++- frontend_qt4/grpDM.ui | 20 +++-- frontend_qt4/grpMQR.ui | 79 ++++++++-------- frontend_qt4/grpMSICheck.ui | 44 ++++----- frontend_qt4/grpMaxicode.ui | 16 ++-- frontend_qt4/grpMicroPDF.ui | 66 +++++++------- frontend_qt4/grpPDF417.ui | 167 +++++++++++++++++----------------- frontend_qt4/grpQR.ui | 161 +++++++++++++++++---------------- frontend_qt4/mainWindow.ui | 170 ++++++++++++++++++++++++++--------- frontend_qt4/mainwindow.cpp | 11 +++ frontend_qt4/mainwindow.h | 1 + 18 files changed, 552 insertions(+), 427 deletions(-) diff --git a/frontend_qt4/grpAztec.ui b/frontend_qt4/grpAztec.ui index a1fe75e0..18e23868 100644 --- a/frontend_qt4/grpAztec.ui +++ b/frontend_qt4/grpAztec.ui @@ -18,7 +18,7 @@ - Automatic Resizing + A&utomatic Resizing true @@ -28,7 +28,7 @@ - Adjust Size To: + Adjust Si&ze To: @@ -222,7 +222,7 @@ - Add Minimum Error Correction: + Add Minimum &Error Correction: @@ -256,7 +256,7 @@ - Encode as GS-1 Data + Encode as &GS-1 Data diff --git a/frontend_qt4/grpC128.ui b/frontend_qt4/grpC128.ui index 55beb35a..249068de 100644 --- a/frontend_qt4/grpC128.ui +++ b/frontend_qt4/grpC128.ui @@ -1,8 +1,7 @@ - - + grpC128 - - + + 0 0 @@ -10,63 +9,63 @@ 156 - + Form - + - - - - + + + + S&tandard - + true - - - + + + Subset &C Supression - - - + + + &GS1-128 - - - + + + &HIBC 128 - - - - <!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"> + + + + <!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;">Note: Composite symbols require a</p> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">GS1-128 linear component.</p></body></html> +</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;">Note: Composite symbols require a</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">GS1-128 linear component.</p></body></html> - - + + Qt::Vertical - + 20 43 diff --git a/frontend_qt4/grpC16k.ui b/frontend_qt4/grpC16k.ui index 79725079..ad4efefb 100644 --- a/frontend_qt4/grpC16k.ui +++ b/frontend_qt4/grpC16k.ui @@ -1,8 +1,7 @@ - - + grpC16k - - + + 0 0 @@ -10,33 +9,33 @@ 123 - + Form - + - - - Standard Mode + + + S&tandard Mode - + true - - - GS-1 Data Mode + + + &GS-1 Data Mode - - + + Qt::Vertical - + 20 60 diff --git a/frontend_qt4/grpC39.ui b/frontend_qt4/grpC39.ui index 0366139b..38cf8869 100644 --- a/frontend_qt4/grpC39.ui +++ b/frontend_qt4/grpC39.ui @@ -1,8 +1,7 @@ - - + grpC39 - - + + 0 0 @@ -10,40 +9,40 @@ 131 - + Form - + - - - No Check Digit + + + &No Check Digit - + true - - - Mod-43 Check Digit + + + &Mod-43 Check Digit - - - HIBC 39 + + + &HIBC 39 - - + + Qt::Vertical - + 20 42 diff --git a/frontend_qt4/grpC49.ui b/frontend_qt4/grpC49.ui index 899c61bb..d72e8a8a 100644 --- a/frontend_qt4/grpC49.ui +++ b/frontend_qt4/grpC49.ui @@ -16,7 +16,7 @@ - Standard Mode + S&tandard Mode true @@ -26,7 +26,7 @@ - GS-1 Data Mode + &GS-1 Data Mode @@ -44,8 +44,6 @@ - radC49Stand - radC49GS1 diff --git a/frontend_qt4/grpChannel.ui b/frontend_qt4/grpChannel.ui index 76bef076..8b4e84a0 100644 --- a/frontend_qt4/grpChannel.ui +++ b/frontend_qt4/grpChannel.ui @@ -1,8 +1,7 @@ - - + grpChannel - - + + 0 0 @@ -10,56 +9,59 @@ 78 - + Form - + - + - - - Number of Channels: + + + &Number of Channels: - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + cmbChannel - + - + Automatic - + 3 - + 4 - + 5 - + 6 - + 7 - + 8 @@ -68,11 +70,11 @@ - - + + Qt::Vertical - + 20 30 diff --git a/frontend_qt4/grpCodablock.ui b/frontend_qt4/grpCodablock.ui index 8f831f3a..279bcad7 100644 --- a/frontend_qt4/grpCodablock.ui +++ b/frontend_qt4/grpCodablock.ui @@ -1,8 +1,7 @@ - - + grpCodablock - - + + 0 0 @@ -10,40 +9,40 @@ 118 - + Form - + - - - Standard Mode + + + S&tandard Mode - + true - - - GS-1 Data Mode + + + &GS-1 Data Mode - - - HIBC Codablock-F + + + &HIBC Codablock-F - - + + Qt::Vertical - + 20 29 diff --git a/frontend_qt4/grpCodeOne.ui b/frontend_qt4/grpCodeOne.ui index 0e498b31..ad87c4a4 100644 --- a/frontend_qt4/grpCodeOne.ui +++ b/frontend_qt4/grpCodeOne.ui @@ -18,10 +18,13 @@ - Symbol Size: + S&ymbol Size: - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + cmbC1Size @@ -89,7 +92,7 @@ - Standard Mode + S&tandard Mode true @@ -99,7 +102,7 @@ - GS-1 Data Mode + &GS-1 Data Mode @@ -118,6 +121,11 @@ + + cmbC1Size + radC1Stand + radC1GS1 + diff --git a/frontend_qt4/grpDM.ui b/frontend_qt4/grpDM.ui index afe75302..1424e380 100644 --- a/frontend_qt4/grpDM.ui +++ b/frontend_qt4/grpDM.ui @@ -20,7 +20,7 @@ - Encoding Mode: + Encoding &Mode: cmbDMMode @@ -72,10 +72,13 @@ - Size: + Si&ze: - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + cmbDMNon200Size @@ -205,7 +208,7 @@ - Standard + S&tandard true @@ -215,21 +218,24 @@ - HIBC Data Matrix + &HIBC Data Matrix - GS-1 Data Mode + &GS-1 Data Mode - Size: + Si&ze: + + + cmbDM200Size diff --git a/frontend_qt4/grpMQR.ui b/frontend_qt4/grpMQR.ui index 32b819b6..58a7ce2e 100644 --- a/frontend_qt4/grpMQR.ui +++ b/frontend_qt4/grpMQR.ui @@ -1,8 +1,7 @@ - - + grpMQR - - + + 0 0 @@ -10,80 +9,80 @@ 159 - + Form - + - - - - - Automatic Resizing + + + + + A&utomatic Resizing - + true - - - - Adjust Size To: + + + + Adjust Si&ze To: - - - + + + false - + 11 x 11 (Version M1) - + 13 x 13 (Version M2) - + 15 x 15 (Version M3) - + 17 x 17 (Version M4) - - - - Add Error Correction: + + + + Add &Error Correction: - - - + + + false - + ~20% (Level L) - + ~37% (Level M) - + ~55% (Level Q) @@ -92,11 +91,11 @@ - - + + Qt::Vertical - + 20 50 @@ -114,11 +113,11 @@ cmbMQRSize setEnabled(bool) - + 98 54 - + 279 53 @@ -130,11 +129,11 @@ cmbMQRECC setEnabled(bool) - + 114 89 - + 279 89 diff --git a/frontend_qt4/grpMSICheck.ui b/frontend_qt4/grpMSICheck.ui index 66341291..5052bc99 100644 --- a/frontend_qt4/grpMSICheck.ui +++ b/frontend_qt4/grpMSICheck.ui @@ -1,8 +1,7 @@ - - + grpMSICheck - - + + 0 0 @@ -10,46 +9,49 @@ 79 - + Form - + - + - - - Check Digit: + + + &Check Digit: - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + cmbMSICheck - + - + None - + Mod-10 - + Mod-10 & Mod-10 - + Mod-11 - + Mod-11 & Mod-10 @@ -58,11 +60,11 @@ - - + + Qt::Vertical - + 20 31 diff --git a/frontend_qt4/grpMaxicode.ui b/frontend_qt4/grpMaxicode.ui index 03ac5a9c..2c8a013e 100644 --- a/frontend_qt4/grpMaxicode.ui +++ b/frontend_qt4/grpMaxicode.ui @@ -23,7 +23,7 @@ 18 15 - 400 + 413 69 @@ -80,10 +80,13 @@ - Encoding Mode: + Encoding &Mode: - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + cmbMaxiMode @@ -93,10 +96,13 @@ false - Primary Data: + &Primary Data: - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + txtMaxiPrimary diff --git a/frontend_qt4/grpMicroPDF.ui b/frontend_qt4/grpMicroPDF.ui index 60f24a71..9c0a8e4b 100644 --- a/frontend_qt4/grpMicroPDF.ui +++ b/frontend_qt4/grpMicroPDF.ui @@ -1,8 +1,7 @@ - - + grpMicroPDF - - + + 0 0 @@ -10,76 +9,79 @@ 100 - + Form - + - - - - - Number of Data Columns: + + + + + &Number of Data Columns: - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + cmbMPDFCols - - + + - + Automatic - + 1 - + 2 - + 3 - + 4 - - - - Standard + + + + S&tandard - + true - - - - HIBC MicroPDF417 + + + + &HIBC MicroPDF417 - - + + Qt::Vertical - + 20 26 diff --git a/frontend_qt4/grpPDF417.ui b/frontend_qt4/grpPDF417.ui index 33316da3..7c9d2427 100644 --- a/frontend_qt4/grpPDF417.ui +++ b/frontend_qt4/grpPDF417.ui @@ -1,8 +1,7 @@ - - + grpPDF417 - - + + 0 0 @@ -10,253 +9,259 @@ 223 - + Form - + - - - - - Number of Data Columns: + + + + + &Number of Data Columns: - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + cmbPDFCols - - + + - + Automatic - + 1 - + 2 - + 3 - + 4 - + 5 - + 6 - + 7 - + 8 - + 9 - + 10 - + 11 - + 12 - + 13 - + 14 - + 15 - + 16 - + 17 - + 18 - + 19 - + 20 - - - - Error Correction Capacity: + + + + &Error Correction Capacity: - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + cmbPDFECC - - + + - + Automatic - + 2 words - + 4 words - + 8 words - + 16 words - + 32 words - + 64 words - + 128 words - + 256 words - + 512 words - - - + + + Ma&ximum Codeword Lengh: - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - + codewords - - - + + + 928 - + 1800 - + 928 - - - - Standard + + + + S&tandard - + true - - - - HIBC PDF417 + + + + &HIBC PDF417 - - - - Truncated + + + + &Truncated - - + + Qt::Vertical - + 20 52 diff --git a/frontend_qt4/grpQR.ui b/frontend_qt4/grpQR.ui index 46db462e..cf2f3d8b 100644 --- a/frontend_qt4/grpQR.ui +++ b/frontend_qt4/grpQR.ui @@ -1,8 +1,7 @@ - - + grpQR - - + + 0 0 @@ -10,285 +9,285 @@ 171 - + Form - + - - - - - Automatic Resizing + + + + + A&utomatic Resizing - + true - - - - Adjust Size To: + + + + 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) - + 165 x 165 (Version 37) - + 169 x 169 (Version 38) - + 173 x 173 (Version 39) - + 177 x 177 (Version 40) - - - - Add Error Correction: + + + + Add &Error Correction: - - - + + + false - + ~20% (Level L) - + ~37% (Level M) - + ~55% (Level Q) - + ~65% (Level H) - - - - HIBC QR Code + + + + &HIBC QR Code - - + + Qt::Vertical - + 20 35 @@ -306,11 +305,11 @@ cmbQRSize setEnabled(bool) - + 89 39 - + 255 46 @@ -322,11 +321,11 @@ cmbQRECC setEnabled(bool) - + 95 79 - + 308 79 diff --git a/frontend_qt4/mainWindow.ui b/frontend_qt4/mainWindow.ui index f1ca3af7..d2b2f8b0 100644 --- a/frontend_qt4/mainWindow.ui +++ b/frontend_qt4/mainWindow.ui @@ -37,6 +37,9 @@ + + Zoom out + ... @@ -54,6 +57,9 @@ + + Adjust zoom + 50 @@ -76,6 +82,9 @@ + + Zoom in + :/zoomin.png:/zoomin.png @@ -88,8 +97,11 @@ - + + + Rotate anti-clockwise + :/rotateleft.png:/rotateleft.png @@ -102,8 +114,11 @@ - + + + Adjust Rotation + 360 @@ -112,8 +127,11 @@ - + + + Rotate clockwise + :/rotateright.png:/rotateright.png @@ -134,10 +152,10 @@ - &Symbology: + S&ymbology: - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter bstyle @@ -152,6 +170,9 @@ 0 + + Select type of barcode to generate. + @@ -195,11 +216,14 @@ - Data to Encode + &Data to Encode + + Enter data to be encoded. + Your Data Here! @@ -239,8 +263,11 @@ + + Create a composite symbol. + - &Add 2D Component + Add &2D Component @@ -263,7 +290,7 @@ false - Component T&ype: + Component &Type: cmbCompType @@ -307,7 +334,7 @@ false - &2D Component Data: + 2D Component Data: txtComposite @@ -331,6 +358,9 @@ 60 + + + <!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"> @@ -355,8 +385,8 @@ p, li { white-space: pre-wrap; } 0 0 - 534 - 324 + 727 + 243 @@ -370,41 +400,34 @@ p, li { white-space: pre-wrap; } - Height: + &Height: - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - - - - X - - - - - - 300 - - - 50 + + heightb - Border width: + B&order Width: - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + bwidth + + Adjust width of boundary bars or border. + X @@ -422,15 +445,21 @@ p, li { white-space: pre-wrap; } - Whitespace: + &Whitespace: - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + spnWhitespace + + Adjust whitespace to left and right of barcode. + X @@ -439,15 +468,21 @@ p, li { white-space: pre-wrap; } - Printing Scale: + &Printing Scale: - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + spnScale + + Adjust image size when output to file. + @@ -468,6 +503,25 @@ p, li { white-space: pre-wrap; } + + + + Adjust overall symbol height. + + + X + + + + + + 300 + + + 50 + + + @@ -475,10 +529,13 @@ p, li { white-space: pre-wrap; } - Border type: + Border Ty&pe: - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + btype @@ -503,15 +560,18 @@ p, li { white-space: pre-wrap; } + + + - Backgound Colour + &Backgound Colour - Foreground Colour + &Foreground Colour @@ -541,7 +601,17 @@ p, li { white-space: pre-wrap; } - About + &About Zint + + + + + + + Reset zoom, rotation and colour. + + + &Reset Preview @@ -560,8 +630,11 @@ p, li { white-space: pre-wrap; } + + Save barcode image to file. + - Save + &Save @@ -583,7 +656,24 @@ p, li { white-space: pre-wrap; } chkComposite cmbCompType txtComposite + btnAbout + btnReset + btnSave + btnExit + heightb + bwidth + spnWhitespace + spnScale + btype + bgcolor + fgcolor view + toolButton_5 + scaleSlider + toolButton_4 + toolButton + rotateSlider + toolButton_2 diff --git a/frontend_qt4/mainwindow.cpp b/frontend_qt4/mainwindow.cpp index 7ce79d05..f2fd8135 100644 --- a/frontend_qt4/mainwindow.cpp +++ b/frontend_qt4/mainwindow.cpp @@ -125,11 +125,22 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags fl) connect(btnSave, SIGNAL(clicked( bool )), SLOT(save())); connect(spnScale, SIGNAL(valueChanged( double )), SLOT(change_print_scale())); connect(btnExit, SIGNAL(clicked( bool )), SLOT(quit_now())); + connect(btnReset, SIGNAL(clicked( bool )), SLOT(reset_view())); } MainWindow::~MainWindow() { } + +void MainWindow::reset_view() +{ + scaleSlider->setSliderPosition( 100 ); + rotateSlider->setSliderPosition( 0 ); + m_fgcolor=qRgb(0,0,0); + m_bgcolor=qRgb(0xff,0xff,0xff); + update_preview(); +} + void MainWindow::scaleRotate() { view->resetTransform(); diff --git a/frontend_qt4/mainwindow.h b/frontend_qt4/mainwindow.h index 305cd108..c08d11a5 100644 --- a/frontend_qt4/mainwindow.h +++ b/frontend_qt4/mainwindow.h @@ -122,6 +122,7 @@ private slots: bool save(); void about(); void quit_now(); + void reset_view(); private: /* void createActions();