diff --git a/CMakeLists.txt b/CMakeLists.txt index 15f137b4..fae60f8a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,6 +19,16 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" ) include (SetPaths.cmake) +INCLUDE (CheckCXXCompilerFlag) + +if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUCC) + check_cxx_compiler_flag("-Wall" CXX_COMPILER_FLAG_WALL) + if (CXX_COMPILER_FLAG_WALL) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") + endif (CXX_COMPILER_FLAG_WALL) +endif (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUCC) + + IF(APPLE) IF(NOT ZINT_HAS_BEEN_RUN_BEFORE) IF(EXISTS /Developer/SDKs/MacOSX10.5.sdk OR EXISTS /SDKs/MacOSX10.5.sdk) @@ -38,8 +48,10 @@ add_subdirectory(backend) add_subdirectory(frontend) find_package(Qt4) + if (QT4_FOUND) set( QT_USE_QTGUI TRUE ) + set( QT_USE_QTUITOOLS TRUE ) include( ${QT_USE_FILE} ) include_directories( ${CMAKE_CURRENT_SOURCE_DIR} diff --git a/frontend_qt4/CMakeLists.txt b/frontend_qt4/CMakeLists.txt index 89a4ee18..149366ce 100644 --- a/frontend_qt4/CMakeLists.txt +++ b/frontend_qt4/CMakeLists.txt @@ -6,14 +6,20 @@ include_directories(BEFORE "${CMAKE_SOURCE_DIR}/backend" "${CMAKE_SOURCE_DIR}/b set(QZint_frontend_SRCS barcodeitem.cpp main.cpp mainwindow.cpp) QT4_WRAP_CPP(QZint_frontend_SRCS mainwindow.h) -QT4_WRAP_UI(QZint_frontend_SRCS mainWindow.ui) + +QT4_WRAP_UI(QZint_frontend_SRCS mainWindow.ui ) +# grpAztec.ui grpC39.ui grpDM.ui grpMSICheck.ui +# grpC128.ui grpChannel.ui grpMicroPDF.ui grpPDF417.ui +# grpC16k.ui grpCodablock.ui grpMQR.ui grpQR.ui) + +QT4_ADD_RESOURCES(QZint_frontend_SRCS resources.qrc) add_executable(QZint_frontend ${QZint_frontend_SRCS}) add_dependencies(QZint_frontend QZint zint) link_directories( "${CMAKE_BINARY_DIR}/backend" "${CMAKE_BINARY_DIR}/backend_qt4" ) -target_link_libraries(QZint_frontend zint QZint ${QT_QTGUI_LIBRARY} +target_link_libraries(QZint_frontend zint QZint ${QT_QTUITOOLS_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTCORE_LIBRARY} ) install(TARGETS QZint_frontend DESTINATION "${BIN_INSTALL_DIR}" RUNTIME) diff --git a/frontend_qt4/grpAztec.ui b/frontend_qt4/grpAztec.ui new file mode 100644 index 00000000..19ebba77 --- /dev/null +++ b/frontend_qt4/grpAztec.ui @@ -0,0 +1,328 @@ + + + grpAztec + + + + 0 + 0 + 461 + 237 + + + + Form + + + + + + + + Automatic Resizing + + + true + + + + + + + Adjust Size To: + + + + + + + false + + + + 15 x 15* + + + + + 19 x 19* + + + + + 23 x 23* + + + + + 27 x 27* + + + + + 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 + + + + + + + + + + radAztecSize + toggled(bool) + cmbAztecSize + setEnabled(bool) + + + 85 + 47 + + + 331 + 47 + + + + + radAztecECC + toggled(bool) + cmbAztecECC + setEnabled(bool) + + + 200 + 80 + + + 366 + 80 + + + + + diff --git a/frontend_qt4/grpC128.ui b/frontend_qt4/grpC128.ui new file mode 100644 index 00000000..55beb35a --- /dev/null +++ b/frontend_qt4/grpC128.ui @@ -0,0 +1,81 @@ + + + grpC128 + + + + 0 + 0 + 317 + 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"> +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> + + + + + + + + + Qt::Vertical + + + + 20 + 43 + + + + + + + + + diff --git a/frontend_qt4/grpC16k.ui b/frontend_qt4/grpC16k.ui new file mode 100644 index 00000000..79725079 --- /dev/null +++ b/frontend_qt4/grpC16k.ui @@ -0,0 +1,51 @@ + + + grpC16k + + + + 0 + 0 + 186 + 123 + + + + Form + + + + + + Standard Mode + + + true + + + + + + + GS-1 Data Mode + + + + + + + Qt::Vertical + + + + 20 + 60 + + + + + + + + + diff --git a/frontend_qt4/grpC39.ui b/frontend_qt4/grpC39.ui new file mode 100644 index 00000000..0366139b --- /dev/null +++ b/frontend_qt4/grpC39.ui @@ -0,0 +1,58 @@ + + + grpC39 + + + + 0 + 0 + 200 + 131 + + + + Form + + + + + + No Check Digit + + + true + + + + + + + Mod-43 Check Digit + + + + + + + HIBC 39 + + + + + + + Qt::Vertical + + + + 20 + 42 + + + + + + + + + diff --git a/frontend_qt4/grpChannel.ui b/frontend_qt4/grpChannel.ui new file mode 100644 index 00000000..76bef076 --- /dev/null +++ b/frontend_qt4/grpChannel.ui @@ -0,0 +1,87 @@ + + + grpChannel + + + + 0 + 0 + 310 + 78 + + + + Form + + + + + + + + Number of Channels: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + Automatic + + + + + 3 + + + + + 4 + + + + + 5 + + + + + 6 + + + + + 7 + + + + + 8 + + + + + + + + + + Qt::Vertical + + + + 20 + 30 + + + + + + + + + diff --git a/frontend_qt4/grpCodablock.ui b/frontend_qt4/grpCodablock.ui new file mode 100644 index 00000000..8f831f3a --- /dev/null +++ b/frontend_qt4/grpCodablock.ui @@ -0,0 +1,58 @@ + + + grpCodablock + + + + 0 + 0 + 184 + 118 + + + + Form + + + + + + Standard Mode + + + true + + + + + + + GS-1 Data Mode + + + + + + + HIBC Codablock-F + + + + + + + Qt::Vertical + + + + 20 + 29 + + + + + + + + + diff --git a/frontend_qt4/grpDM.ui b/frontend_qt4/grpDM.ui new file mode 100644 index 00000000..8ec74b15 --- /dev/null +++ b/frontend_qt4/grpDM.ui @@ -0,0 +1,418 @@ + + + grpDM + + + + 0 + 0 + 398 + 339 + + + + Form + + + + + + + + + + Encoding Mode: + + + cmbDMMode + + + + + + + + ECC 200 (Recommended) + + + + + ECC 000 + + + + + ECC 050 + + + + + ECC 080 + + + + + ECC 100 + + + + + ECC 140 + + + + + + + + + + Non ECC 200 Options + + + + + + Size: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + Automatic + + + + + 7 x 7 + + + + + 9 x 9 + + + + + 11 x 11 + + + + + 13 x 13 + + + + + 15 x 15 + + + + + 17 x 17 + + + + + 19 x 19 + + + + + 21 x 21 + + + + + 23 x 23 + + + + + 25 x 25 + + + + + 27 x 27 + + + + + 29 x 29 + + + + + 31 x 31 + + + + + 33 x 33 + + + + + 35 x 35 + + + + + 37 x 37 + + + + + 39 x 39 + + + + + 41 x 41 + + + + + 43 x 43 + + + + + 45 x 45 + + + + + 47 x 47 + + + + + + + + + + + ECC 200 Options + + + + + + Standard + + + true + + + + + + + HIBC Data Matrix + + + + + + + GS-1 Data Mode + + + + + + + Size: + + + + + + + + Automatic + + + + + 10 x 10 + + + + + 12 x 12 + + + + + 14 x 14 + + + + + 16 x 16 + + + + + 18 x 18 + + + + + 20 x 20 + + + + + 22 x 22 + + + + + 24 x 24 + + + + + 26 x 26 + + + + + 32 x 32 + + + + + 36 x 36 + + + + + 40 x 40 + + + + + 44 x 44 + + + + + 48 x 48 + + + + + 52 x 52 + + + + + 64 x 64 + + + + + 72 x 72 + + + + + 80 x 80 + + + + + 88 x 88 + + + + + 96 x 96 + + + + + 104 x 104 + + + + + 120 x 120 + + + + + 132 x 132 + + + + + 144 x 144 + + + + + 8 x 18 + + + + + 8 x 32 + + + + + 12 x 26 + + + + + 12 x 36 + + + + + 16 x 36 + + + + + 16 x 48 + + + + + + + + + + + + + Qt::Vertical + + + + 20 + 71 + + + + + + + + + diff --git a/frontend_qt4/grpMQR.ui b/frontend_qt4/grpMQR.ui new file mode 100644 index 00000000..32b819b6 --- /dev/null +++ b/frontend_qt4/grpMQR.ui @@ -0,0 +1,144 @@ + + + grpMQR + + + + 0 + 0 + 423 + 159 + + + + Form + + + + + + + + Automatic Resizing + + + true + + + + + + + Adjust Size 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: + + + + + + + false + + + + ~20% (Level L) + + + + + ~37% (Level M) + + + + + ~55% (Level Q) + + + + + + + + + + Qt::Vertical + + + + 20 + 50 + + + + + + + + + + radMQRSize + toggled(bool) + cmbMQRSize + setEnabled(bool) + + + 98 + 54 + + + 279 + 53 + + + + + radMQRECC + toggled(bool) + cmbMQRECC + setEnabled(bool) + + + 114 + 89 + + + 279 + 89 + + + + + diff --git a/frontend_qt4/grpMSICheck.ui b/frontend_qt4/grpMSICheck.ui new file mode 100644 index 00000000..66341291 --- /dev/null +++ b/frontend_qt4/grpMSICheck.ui @@ -0,0 +1,77 @@ + + + grpMSICheck + + + + 0 + 0 + 295 + 79 + + + + Form + + + + + + + + Check Digit: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + None + + + + + Mod-10 + + + + + Mod-10 & Mod-10 + + + + + Mod-11 + + + + + Mod-11 & Mod-10 + + + + + + + + + + Qt::Vertical + + + + 20 + 31 + + + + + + + + + diff --git a/frontend_qt4/grpMicroPDF.ui b/frontend_qt4/grpMicroPDF.ui new file mode 100644 index 00000000..60f24a71 --- /dev/null +++ b/frontend_qt4/grpMicroPDF.ui @@ -0,0 +1,94 @@ + + + grpMicroPDF + + + + 0 + 0 + 351 + 100 + + + + Form + + + + + + + + Number of Data Columns: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + Automatic + + + + + 1 + + + + + 2 + + + + + 3 + + + + + 4 + + + + + + + + Standard + + + true + + + + + + + HIBC MicroPDF417 + + + + + + + + + Qt::Vertical + + + + 20 + 26 + + + + + + + + + diff --git a/frontend_qt4/grpPDF417.ui b/frontend_qt4/grpPDF417.ui new file mode 100644 index 00000000..33316da3 --- /dev/null +++ b/frontend_qt4/grpPDF417.ui @@ -0,0 +1,271 @@ + + + grpPDF417 + + + + 0 + 0 + 390 + 223 + + + + Form + + + + + + + + Number of Data Columns: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + Automatic + + + + + 1 + + + + + 2 + + + + + 3 + + + + + 4 + + + + + 5 + + + + + 6 + + + + + 7 + + + + + 8 + + + + + 9 + + + + + 10 + + + + + 11 + + + + + 12 + + + + + 13 + + + + + 14 + + + + + 15 + + + + + 16 + + + + + 17 + + + + + 18 + + + + + 19 + + + + + 20 + + + + + + + + Error Correction Capacity: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 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 + + + codewords + + + + + + + 928 + + + 1800 + + + 928 + + + + + + + Standard + + + true + + + + + + + HIBC PDF417 + + + + + + + Truncated + + + + + + + + + Qt::Vertical + + + + 20 + 52 + + + + + + + + + diff --git a/frontend_qt4/grpQR.ui b/frontend_qt4/grpQR.ui new file mode 100644 index 00000000..46db462e --- /dev/null +++ b/frontend_qt4/grpQR.ui @@ -0,0 +1,336 @@ + + + grpQR + + + + 0 + 0 + 441 + 171 + + + + Form + + + + + + + + Automatic Resizing + + + true + + + + + + + Adjust Size 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: + + + + + + + false + + + + ~20% (Level L) + + + + + ~37% (Level M) + + + + + ~55% (Level Q) + + + + + ~65% (Level H) + + + + + + + + HIBC QR Code + + + + + + + + + Qt::Vertical + + + + 20 + 35 + + + + + + + + + + radQRSize + toggled(bool) + cmbQRSize + setEnabled(bool) + + + 89 + 39 + + + 255 + 46 + + + + + radQRECC + toggled(bool) + cmbQRECC + setEnabled(bool) + + + 95 + 79 + + + 308 + 79 + + + + + diff --git a/frontend_qt4/main.cpp b/frontend_qt4/main.cpp index b5dae03e..c3d97fcd 100644 --- a/frontend_qt4/main.cpp +++ b/frontend_qt4/main.cpp @@ -20,8 +20,8 @@ int main(int argc, char *argv[]) { QApplication app(argc, argv); + Q_INIT_RESOURCE(resources); MainWindow w; w.show(); return app.exec(); } - diff --git a/frontend_qt4/mainWindow.ui b/frontend_qt4/mainWindow.ui index 11f5d8d8..f0aa0f19 100644 --- a/frontend_qt4/mainWindow.ui +++ b/frontend_qt4/mainWindow.ui @@ -1,2654 +1,580 @@ - + + mainWindow - - + + 0 0 - 619 - 596 + 556 + 893 - - - 0 - 0 - - - - - 619 - 596 - - - - - 619 - 596 - - - + Zint Barcode Studio - - - stripe.icostripe.ico - - - - - 92 - 299 - 511 - 22 - - - - - - - 4 - 300 - 72 - 22 - - - - &Symbology: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - bstyle - - - - - true - - - - 12 - 331 - 595 - 217 - - - - - 0 - 0 - - - - 0 - - - - - 0 - 0 - 591 - 191 - - - - General - - - - - 9 - 3 - 574 - 55 - + + + + + Preview - - Data to Encode - - - - - 13 - 21 - 548 - 22 - - - - Your Data Here! - - + + + + + + 0 + 300 + + + + + + + + ... + + + + :/zoomout.png:/zoomout.png + + + + 22 + 22 + + + + + + + + 50 + + + 400 + + + 100 + + + Qt::Vertical + + + true + + + false + + + + + + + + :/zoomin.png:/zoomin.png + + + + 22 + 22 + + + + + + + + + :/rotateleft.png:/rotateleft.png + + + + 22 + 22 + + + + + + + + 360 + + + Qt::Horizontal + + + + + + + + :/rotateright.png:/rotateright.png + + + + 22 + 22 + + + + + - - - true + + + + + + + &Symbology: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + bstyle + + + + + + + + + + + + 0 - - - 9 - 67 - 575 - 115 - - - - Composite Code - - - - false - - - - 12 - 67 - 552 - 40 - - - - <!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"> + + + General + + + + + + Data to Encode + + + + + + Your Data Here! + + + + + + + + + + Maxicode + + + + + + Encoding Mode: + + + + + + + 1 + + + + Structured Carrier Message (Mode 2 or 3) + + + + + Standard Symbol, SEC (Mode 4) + + + + + Full ECC Symbol (Mode 5) + + + + + Reader Program, SEC (Mode 6) + + + + + + + + false + + + Primary Data: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + false + + + Primary Data Here! + + + + + + + + + + true + + + Composite Code + + + + + + + + &Add 2D Component + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + false + + + Component T&ype: + + + cmbCompType + + + + + + + false + + + + Automatic + + + + + CC-A + + + + + CC-B + + + + + CC-C + + + + + + + + + + + + false + + + &2D Component Data: + + + txtComposite + + + + + + + false + + + <!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 style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Your Data Here!</p></body></html> - - - false - - - - - false - - - - 13 - 45 - 121 - 20 - - - - &2D Component Data: - - - txtComposite - - - - - - 10 - 15 - 552 - 24 - - - - - - - &Add 2D Component - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - false - - - Component T&ype: - - - cmbCompType - - - - - - - false - - - - Automatic - - - - - CC-A - - - - - CC-B - - - - - CC-C - - +</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Your Data Here!</span></p></body></html> + + + false + + + + + + - - - - - 9 - 67 - 575 - 73 - - - - Maxicode - - - - - 9 - 21 - 96 - 16 - - - - Encoding Mode: - - - - - - 108 - 16 - 260 - 22 - - - - 1 - - - - Structured Carrier Message (Mode 2 or 3) - - - - - Standard Symbol, SEC (Mode 4) - - - - - Full ECC Symbol (Mode 5) - - - - - Reader Program, SEC (Mode 6) - - - - - - false - - - - 9 - 46 - 89 - 16 - - - - Primary Data: - - - - - false - - - - 107 - 44 - 457 - 22 - - - - Primary Data Here! - + + + Appearance + + + + + + + + + + Height: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + X + + + + + + 300 + + + 50 + + + + + + + Border width: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + X + + + 0 + + + 16 + + + 0 + + + + + + + Whitespace: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + X + + + + + + + Printing Scale: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + 2 + + + 0.500000000000000 + + + 99.500000000000000 + + + 0.500000000000000 + + + 1.000000000000000 + + + + + + + + + + + Border type: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + No border + + + + + Bind + + + + + Box + + + + + + + + Backgound Colour + + + + + + + Foreground Colour + + + + + + + + + + + Qt::Vertical + + + + 20 + 228 + + + + + - - - - - 0 - 0 - 591 - 191 - - - - Options - - - - - 114 - 39 - 315 - 109 - - - - Code 128 - - - - - 48 - 65 - 216 - 37 - - - - <!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> - - - - - - 12 - 19 - 74 - 22 - - - - S&tandard - - - true - - - - - - 12 - 42 - 74 - 22 - - - - &GS1-128 - - - - - - 160 - 19 - 142 - 22 - - - - Subset &C Supression - - - - - - 160 - 42 - 142 - 22 - - - - &HIBC 128 - - - - - - - 104 - 19 - 332 - 149 - - - - PDF417 - - - - - 13 - 69 - 158 - 21 - - - - Ma&ximum Codeword Lengh: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - codewords - - - - - - 13 - 18 - 146 - 21 - - - - Number of Data Columns: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - 13 - 45 - 142 - 21 - - - - Error Correction Capacity: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - 189 - 72 - 105 - 21 - - - - 928 - - - 1800 - - - 928 - - - - - - 190 - 44 - 105 - 22 - - - - - Automatic - - - - - 2 words - - - - - 4 words - - - - - 8 words - - - - - 16 words - - - - - 32 words - - - - - 64 words - - - - - 128 words - - - - - 256 words - - - - - 512 words - - - - - - - 191 - 16 - 104 - 22 - - - - - Automatic - - - - - 1 - - - - - 2 - - - - - 3 - - - - - 4 - - - - - 5 - - - - - 6 - - - - - 7 - - - - - 8 - - - - - 9 - - - - - 10 - - - - - 11 - - - - - 12 - - - - - 13 - - - - - 14 - - - - - 15 - - - - - 16 - - - - - 17 - - - - - 18 - - - - - 19 - - - - - 20 - - - - - - - 25 - 99 - 92 - 22 - - - - Standard - - - true - - - - - - 25 - 121 - 92 - 22 - - - - Truncated - - - - - - 176 - 99 - 105 - 22 - - - - HIBC PDF417 - - - - - - - 95 - 20 - 346 - 144 - - - - Aztec Code - - - - - 8 - 18 - 128 - 22 - - - - Automatic Resizing - - - true - - - - - - 8 - 39 - 146 - 22 - - - - Adjust Size To: - - - - - - 7 - 61 - 192 - 22 - - - - Add Minimum Error Correction: - - - - - false - - - - 218 - 63 - 113 - 22 - - - - - 10% + 3 words - - - - - 23% + 3 words - - - - - 36% + 3 words - - - - - 50% + 3 words - - - - - - false - - - - 220 - 36 - 112 - 22 - - - - - 15 x 15* - - - - - 19 x 19* - - - - - 23 x 23* - - - - - 27 x 27* - - - - - 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 - - - - - - - 7 - 84 - 167 - 21 - - - - Encode as GS-1 Data - - - - - - 51 - 104 - 255 - 33 - - - - <!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> - - - - - - - 145 - 85 - 277 - 16 - - - - No additional settings required for this symbology. - - - - - - 158 - 64 - 238 - 57 - - - - MSI Plessey - - - - - 14 - 25 - 74 - 16 - - - - Check Digit: - - - - - - 97 - 20 - 125 - 22 - - - - - None - - - - - Mod-10 - - - - - Mod-10 & Mod-10 - - - - - Mod-11 - - - - - Mod-11 & Mod-10 - - - - - - - - 192 - 39 - 181 - 107 - - - - Code 39 - - - - - 13 - 20 - 115 - 22 - - - - No Check Digit - - - true - - - - - - 13 - 45 - 138 - 22 - - - - Mod-43 Check Digit - - - - - - 13 - 72 - 92 - 22 - - - - HIBC 39 - - - - - - - 132 - 49 - 287 - 87 - - - - MicroPDF417 - - - - - 10 - 23 - 146 - 21 - - - - Number of Data Columns: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - 172 - 21 - 104 - 22 - - - - - Automatic - - - - - 1 - - - - - 2 - - - - - 3 - - - - - 4 - - - - - - - 14 - 49 - 92 - 22 - - - - Standard - - - true - - - - - - 145 - 52 - 133 - 22 - - - - HIBC MicroPDF417 - - - - - - - 202 - 55 - 137 - 75 - - - - Code 16K - - - - - 12 - 18 - 106 - 22 - - - - Standard Mode - - - true - - - - - - 12 - 43 - 115 - 22 - - - - GS-1 Data Mode - - - - - - - 193 - 42 - 155 - 101 - - - - Codablock-F - - - - - 12 - 18 - 106 - 22 - - - - Standard Mode - - - true - - - - - - 12 - 43 - 115 - 22 - - - - GS-1 Data Mode - - - - - - 12 - 68 - 131 - 22 - - - - HIBC Codablock-F - - - - - - - 116 - 21 - 311 - 145 - - - - Data Matrix - - - - - 119 - 16 - 181 - 22 - - - - - ECC 200 (Recommended) - - - - - ECC 000 - - - - - ECC 050 - - - - - ECC 080 - - - - - ECC 100 - - - - - ECC 140 - - - - - - - 15 - 21 - 96 - 16 - - - - Encoding Mode: - - - cmbDMMode - - - - - - 14 - 45 - 287 - 91 - - - - ECC 200 Options - - - - - 12 - 14 - 92 - 22 - - - - Standard - - - true + + + + + + + About - - - - 12 - 35 - 122 - 22 - + + + + + Qt::Horizontal - - GS-1 Data Mode + + + 288 + 20 + + + + + + + + Save - - - - 154 - 14 - 121 - 22 - + + + + + false - - HIBC Data Matrix + + Copy - - - - 107 - 59 - 124 - 22 - - - - - Automatic - - - - - 10 x 10 - - - - - 12 x 12 - - - - - 14 x 14 - - - - - 16 x 16 - - - - - 18 x 18 - - - - - 20 x 20 - - - - - 22 x 22 - - - - - 24 x 24 - - - - - 26 x 26 - - - - - 32 x 32 - - - - - 36 x 36 - - - - - 40 x 40 - - - - - 44 x 44 - - - - - 48 x 48 - - - - - 52 x 52 - - - - - 64 x 64 - - - - - 72 x 72 - - - - - 80 x 80 - - - - - 88 x 88 - - - - - 96 x 96 - - - - - 104 x 104 - - - - - 120 x 120 - - - - - 132 x 132 - - - - - 144 x 144 - - - - - 8 x 18 - - - - - 8 x 32 - - - - - 12 x 26 - - - - - 12 x 36 - - - - - 16 x 36 - - - - - 16 x 48 - - - - - - - 57 - 64 - 38 - 16 - - - - Size: + + + + + E&xit - - - - - 66 - 45 - 187 - 49 - - - - Non ECC 200 Options - - - - - 11 - 20 - 38 - 16 - - - - Size: - - - - - - 63 - 18 - 116 - 22 - - - - - Automatic - - - - - 7 x 7 - - - - - 9 x 9 - - - - - 11 x 11 - - - - - 13 x 13 - - - - - 15 x 15 - - - - - 17 x 17 - - - - - 19 x 19 - - - - - 21 x 21 - - - - - 23 x 23 - - - - - 25 x 25 - - - - - 27 x 27 - - - - - 29 x 29 - - - - - 31 x 31 - - - - - 33 x 33 - - - - - 35 x 35 - - - - - 37 x 37 - - - - - 39 x 39 - - - - - 41 x 41 - - - - - 43 x 43 - - - - - 45 x 45 - - - - - 47 x 47 - - - - - - - - - 108 - 30 - 328 - 124 - - - - QR Code - - - - - 9 - 21 - 135 - 22 - - - - Automatic Resizing - - - true - - - - - - 10 - 44 - 134 - 22 - - - - Adjust Size To: - - - - - - 10 - 67 - 141 - 22 - - - - Add Error Correction: - - - - - - 11 - 91 - 116 - 21 - - - - HIBC QR Code - - - - - false - - - - 158 - 43 - 156 - 22 - - - - - 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) - - - - - - false - - - - 157 - 69 - 157 - 22 - - - - - ~20% (Level L) - - - - - ~37% (Level M) - - - - - ~55% (Level Q) - - - - - ~65% (Level H) - - - - - - - - 105 - 42 - 328 - 102 - - - - MicroQR Code - - - - - 9 - 21 - 135 - 22 - - - - Automatic Resizing - - - true - - - - - - 10 - 44 - 134 - 22 - - - - Adjust Size To: - - - - - - 10 - 67 - 141 - 22 - - - - Add Error Correction: - - - - - false - - - - 158 - 43 - 156 - 22 - - - - - 11 x 11 (Version M1) - - - - - 13 x 13 (Version M2) - - - - - 15 x 15 (Version M3) - - - - - 17 x 17 (Version M4) - - - - - - false - - - - 157 - 69 - 157 - 22 - - - - - ~20% (Level L) - - - - - ~37% (Level M) - - - - - ~55% (Level Q) - - - - - - - - 160 - 70 - 235 - 44 - - - - Channel Code - - - - - 134 - 15 - 87 - 22 - - - - - Automatic - - - - - 3 - - - - - 4 - - - - - 5 - - - - - 6 - - - - - 7 - - - - - 8 - - - - - - - 7 - 20 - 118 - 16 - - - - Number of Channels: - - - - - - - - 0 - 0 - 591 - 191 - - - - Appearance - - - - - 10 - 6 - 572 - 140 - - - - Appearance - - - - - 10 - 18 - 40 - 21 - - - - Height: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - 117 - 17 - 122 - 21 - - - - X - - - - - - 300 - - - 50 - - - - - - 9 - 39 - 73 - 29 - - - - Border width: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - 118 - 46 - 120 - 21 - - - - X - - - 0 - - - 16 - - - 0 - - - - - - 268 - 12 - 115 - 29 - - - - Border type: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - 429 - 18 - 132 - 22 - - - - - No border - - - - - Bind - - - - - Box - - - - - - - 357 - 92 - 141 - 26 - - - - Foreground Colour - - - - - - 357 - 57 - 142 - 26 - - - - Backgound Colour - - - - - - 119 - 72 - 120 - 22 - - - - X - - - - - - 11 - 74 - 78 - 16 - - - - Whitespace: - - - - - - 12 - 103 - 85 - 16 - - - - Printing Scale: - - - - - - 119 - 102 - 119 - 22 - - - - - - - 2 - - - 0.500000000000000 - - - 99.500000000000000 - - - 0.500000000000000 - - - 1.000000000000000 - - - - - - - - - 0 - 0 - 2 - 2 - - - - - - - - 15 - 5 - 593 - 284 - - - - Preview - - - - - 9 - 21 - 575 - 251 - - - - - - - - 10 - 560 - 75 - 26 - - - - About - - - - - false - - - - 450 - 560 - 75 - 26 - - - - Copy - - - - - - 370 - 560 - 75 - 26 - - - - Save - - - - - - 530 - 560 - 75 - 26 - - - - E&xit - - + + + + bstyle @@ -2657,17 +583,75 @@ p, li { white-space: pre-wrap; } chkComposite cmbCompType txtComposite - radC128Stand - radC128CSup - radC128EAN - radC128HIBC - heightb - btype - bwidth - fgcolor - bgcolor view - - + + + + + + toolButton + clicked() + rotateSlider + subtractStep() + + + 29 + 265 + + + 76 + 265 + + + + + toolButton_2 + clicked() + rotateSlider + addStep() + + + 491 + 260 + + + 431 + 260 + + + + + toolButton_4 + clicked() + scaleSlider + addStep() + + + 532 + 231 + + + 528 + 191 + + + + + toolButton_5 + clicked() + scaleSlider + subtractStep() + + + 530 + 56 + + + 530 + 94 + + + + diff --git a/frontend_qt4/mainwindow.cpp b/frontend_qt4/mainwindow.cpp index 5b7bef48..07588ba3 100644 --- a/frontend_qt4/mainwindow.cpp +++ b/frontend_qt4/mainwindow.cpp @@ -18,12 +18,14 @@ #include #include #include +#include +#include #include "mainwindow.h" #include MainWindow::MainWindow(QWidget* parent, Qt::WFlags fl) - : QWidget(parent, fl) + : QWidget(parent, fl),m_optionWidget(0) { char bstyle_text[][50] = { @@ -109,68 +111,18 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags fl) connect(bstyle, SIGNAL(currentIndexChanged( int )), SLOT(update_preview())); connect(heightb, SIGNAL(valueChanged( int )), SLOT(update_preview())); connect(bwidth, SIGNAL(valueChanged( int )), SLOT(update_preview())); - connect(codewords, SIGNAL(valueChanged( int )), SLOT(update_preview())); connect(btype, SIGNAL(currentIndexChanged( int )), SLOT(update_preview())); connect(txtData, SIGNAL(textChanged( const QString& )), SLOT(update_preview())); connect(txtComposite, SIGNAL(textChanged()), SLOT(update_preview())); connect(chkComposite, SIGNAL(stateChanged( int )), SLOT(composite_enable())); connect(chkComposite, SIGNAL(stateChanged( int )), SLOT(update_preview())); connect(cmbCompType, SIGNAL(currentIndexChanged( int )), SLOT(update_preview())); - connect(radC128EAN, SIGNAL(toggled( bool )), SLOT(composite_ean_check())); - connect(radC128Stand, SIGNAL(clicked( bool )), SLOT(update_preview())); - connect(radC128CSup, SIGNAL(clicked( bool )), SLOT(update_preview())); - connect(radC128EAN, SIGNAL(clicked( bool )), SLOT(update_preview())); - connect(radC128HIBC, SIGNAL(clicked( bool )), SLOT(update_preview())); - connect(cmbPDFECC, SIGNAL(currentIndexChanged( int )), SLOT(update_preview())); - connect(cmbPDFCols, SIGNAL(currentIndexChanged( int )), SLOT(update_preview())); - connect(radPDFTruncated, SIGNAL(clicked( bool )), SLOT(update_preview())); - connect(radPDFStand, SIGNAL(clicked( bool )), SLOT(update_preview())); - connect(radPDFHIBC, SIGNAL(clicked( bool )), SLOT(update_preview())); - connect(radAztecSize, SIGNAL(toggled( bool )), SLOT(aztec_size())); - connect(radAztecECC, SIGNAL(toggled( bool )), SLOT(aztec_errorcorrect())); - connect(radAztecAuto, SIGNAL(clicked( bool )), SLOT(update_preview())); - connect(radAztecSize, SIGNAL(clicked( bool )), SLOT(update_preview())); - connect(radAztecECC, SIGNAL(clicked( bool )), SLOT(update_preview())); - connect(cmbAztecSize, SIGNAL(currentIndexChanged( int )), SLOT(update_preview())); - connect(cmbAztecECC, SIGNAL(currentIndexChanged( int )), SLOT(update_preview())); - connect(chkAztecMode, SIGNAL(stateChanged( int )), SLOT(update_preview())); - connect(cmbMSICheck, SIGNAL(currentIndexChanged( int )), SLOT(update_preview())); - connect(radC39Stand, SIGNAL(clicked( bool )), SLOT(update_preview())); - connect(radC39Check, SIGNAL(clicked( bool )), SLOT(update_preview())); - connect(radC39HIBC, SIGNAL(clicked( bool )), SLOT(update_preview())); - connect(cmbMPDFCols, SIGNAL(currentIndexChanged( int )), SLOT(update_preview())); - connect(radMPDFStand, SIGNAL(toggled( bool )), SLOT(update_preview())); - connect(radC16kStand, SIGNAL(toggled( bool )), SLOT(update_preview())); - connect(radCodaStand, SIGNAL(clicked( bool )), SLOT(update_preview())); - connect(radCodaGS1, SIGNAL(clicked( bool )), SLOT(update_preview())); - connect(radCodaHIBC, SIGNAL(clicked( bool )), SLOT(update_preview())); - connect(cmbDMMode, SIGNAL(currentIndexChanged( int )), SLOT(update_preview())); - connect(cmbDMMode, SIGNAL(currentIndexChanged( int )), SLOT(datamatrix_options())); - connect(radDM200Stand, SIGNAL(clicked( bool )), SLOT(update_preview())); - connect(radDM200GS1, SIGNAL(clicked( bool )), SLOT(update_preview())); - connect(radDM200HIBC, SIGNAL(clicked( bool )), SLOT(update_preview())); - connect(cmbDM200Size, SIGNAL(currentIndexChanged( int )), SLOT(update_preview())); - connect(cmbDMNon200Size, SIGNAL(currentIndexChanged( int )), SLOT(update_preview())); - connect(radQRAuto, SIGNAL(clicked( bool )), SLOT(update_preview())); - connect(radQRSize, SIGNAL(clicked( bool )), SLOT(update_preview())); - connect(radQRECC, SIGNAL(clicked( bool )), SLOT(update_preview())); - connect(radQRSize, SIGNAL(toggled( bool )), SLOT(qr_size())); - connect(radQRECC, SIGNAL(toggled( bool )), SLOT(qr_errorcorrect())); - connect(cmbQRSize, SIGNAL(currentIndexChanged( int )), SLOT(update_preview())); - connect(cmbQRECC, SIGNAL(currentIndexChanged( int )), SLOT(update_preview())); - connect(chkQRHIBC, SIGNAL(stateChanged( int )), SLOT(update_preview())); - connect(radMQRAuto, SIGNAL(clicked( bool )), SLOT(update_preview())); - connect(radMQRSize, SIGNAL(clicked( bool )), SLOT(update_preview())); - connect(radMQRECC, SIGNAL(clicked( bool )), SLOT(update_preview())); - connect(radMQRSize, SIGNAL(toggled( bool )), SLOT(mqr_size())); - connect(radMQRECC, SIGNAL(toggled( bool )), SLOT(mqr_errorcorrect())); - connect(cmbMQRSize, SIGNAL(currentIndexChanged( int )), SLOT(update_preview())); - connect(cmbMQRECC, SIGNAL(currentIndexChanged( int )), SLOT(update_preview())); + connect(rotateSlider, SIGNAL(valueChanged(int)), SLOT(scaleRotate())); + connect(scaleSlider, SIGNAL(valueChanged(int)), SLOT(scaleRotate())); connect(cmbMaxiMode, SIGNAL(currentIndexChanged( int )), SLOT(update_preview())); connect(cmbMaxiMode, SIGNAL(currentIndexChanged( int )), SLOT(maxi_primary())); connect(txtMaxiPrimary, SIGNAL(textChanged( const QString& )), SLOT(update_preview())); connect(spnWhitespace, SIGNAL(valueChanged( int )), SLOT(update_preview())); - connect(cmbChannel, SIGNAL(currentIndexChanged( int )), SLOT(update_preview())); connect(btnAbout, SIGNAL(clicked( bool )), SLOT(about())); connect(btnSave, SIGNAL(clicked( bool )), SLOT(save())); connect(spnScale, SIGNAL(valueChanged( double )), SLOT(change_print_scale())); @@ -180,6 +132,13 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags fl) MainWindow::~MainWindow() { } +void MainWindow::scaleRotate() +{ + view->resetTransform(); + view->rotate(rotateSlider->value()); + view->scale((double)scaleSlider->value()/100,(double)scaleSlider->value()/100); +} + /* void MainWindow::createActions() { @@ -254,139 +213,210 @@ void MainWindow::change_print_scale() void MainWindow::quit_now() { - this->close(); + close(); } void MainWindow::change_options() { - bool options; + QUiLoader uiload; - options = false; + if (tabMain->count()==3) + tabMain->removeTab(1); if(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_CODE128) { - options = true; - grpC128->show(); + QFile file(":/grpC128.ui"); + if (!file.open(QIODevice::ReadOnly)) + return; + m_optionWidget=uiload.load(&file); + file.close(); + tabMain->insertTab(1,m_optionWidget,tr("Options")); chkComposite->setText(tr("Add 2D Component (GS1-128 only)")); - } else { - grpC128->hide(); + connect(m_optionWidget->findChild("radC128EAN"), SIGNAL(toggled( bool )), SLOT(composite_ean_check())); + connect(m_optionWidget->findChild("radC128Stand"), SIGNAL(clicked( bool )), SLOT(update_preview())); + connect(m_optionWidget->findChild("radC128CSup"), SIGNAL(clicked( bool )), SLOT(update_preview())); + connect(m_optionWidget->findChild("radC128EAN"), SIGNAL(clicked( bool )), SLOT(update_preview())); + connect(m_optionWidget->findChild("radC128HIBC"), SIGNAL(clicked( bool )), SLOT(update_preview())); + } + else chkComposite->setText(tr("Add 2D Component")); - } + if(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_PDF417) { - options = true; - grpPDF417->show(); - } else { - grpPDF417->hide(); + QFile file(":/grpPDF417.ui"); + if (!file.open(QIODevice::ReadOnly)) + return; + m_optionWidget=uiload.load(&file); + file.close(); + tabMain->insertTab(1,m_optionWidget,tr("Options")); + connect(m_optionWidget->findChild("codewords"), SIGNAL(valueChanged( int )), SLOT(update_preview())); + connect(m_optionWidget->findChild("cmbPDFECC"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview())); + connect(m_optionWidget->findChild("cmbPDFCols"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview())); + connect(m_optionWidget->findChild("radPDFTruncated"), SIGNAL(clicked( bool )), SLOT(update_preview())); + connect(m_optionWidget->findChild("radPDFStand"), SIGNAL(clicked( bool )), SLOT(update_preview())); + connect(m_optionWidget->findChild("radPDFHIBC"), SIGNAL(clicked( bool )), SLOT(update_preview())); } if(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_MICROPDF417) { - options = true; - grpMicroPDF->show(); - } else { - grpMicroPDF->hide(); + QFile file(":/grpMicroPDF.ui"); + if (!file.open(QIODevice::ReadOnly)) + return; + m_optionWidget=uiload.load(&file); + file.close(); + tabMain->insertTab(1,m_optionWidget,tr("Options")); + connect(m_optionWidget->findChild("cmbMPDFCols"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview())); + connect(m_optionWidget->findChild("radMPDFStand"), SIGNAL(toggled( bool )), SLOT(update_preview())); } if(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_AZTEC) { - options = true; - grpAztec->show(); - } else { - grpAztec->hide(); + QFile file(":/grpAztec.ui"); + if (!file.open(QIODevice::ReadOnly)) + return; + m_optionWidget=uiload.load(&file); + file.close(); + tabMain->insertTab(1,m_optionWidget,tr("Options")); + connect(m_optionWidget->findChild("radAztecAuto"), SIGNAL(clicked( bool )), SLOT(update_preview())); + connect(m_optionWidget->findChild("radAztecSize"), SIGNAL(clicked( bool )), SLOT(update_preview())); + connect(m_optionWidget->findChild("radAztecECC"), SIGNAL(clicked( bool )), SLOT(update_preview())); + connect(m_optionWidget->findChild("cmbAztecSize"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview())); + connect(m_optionWidget->findChild("cmbAztecECC"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview())); + connect(m_optionWidget->findChild("chkAztecMode"), SIGNAL(stateChanged( int )), SLOT(update_preview())); } if(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_MSI_PLESSEY) { - options = true; - grpMSICheck->show(); - } else { - grpMSICheck->hide(); + QFile file(":/grpMSICheck.ui"); + if (!file.open(QIODevice::ReadOnly)) + return; + m_optionWidget=uiload.load(&file); + file.close(); + tabMain->insertTab(1,m_optionWidget,tr("Options")); + connect(m_optionWidget->findChild("cmbMSICheck"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview())); } if((metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_CODE39) || (metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_EXCODE39)) { - options = true; - grpC39->show(); - } else { - grpC39->hide(); - } - - if(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_EXCODE39) { - if(radC39HIBC->isChecked() == true) { - radC39HIBC->setChecked(false); - radC39Stand->setChecked(true); - } - radC39HIBC->setEnabled(false); - } else { - radC39HIBC->setEnabled(true); + QFile file(":/grpC39.ui"); + if (!file.open(QIODevice::ReadOnly)) + return; + m_optionWidget=uiload.load(&file); + file.close(); + tabMain->insertTab(1,m_optionWidget,tr("Options")); + connect(m_optionWidget->findChild("radC39Stand"), SIGNAL(clicked( bool )), SLOT(update_preview())); + connect(m_optionWidget->findChild("radC39Check"), SIGNAL(clicked( bool )), SLOT(update_preview())); + connect(m_optionWidget->findChild("radC39HIBC"), SIGNAL(clicked( bool )), SLOT(update_preview())); + if(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_EXCODE39) + { + if(m_optionWidget->findChild("radC39HIBC")->isChecked() == true) + { + m_optionWidget->findChild("radC39HIBC")->setChecked(false); + m_optionWidget->findChild("radC39Stand")->setChecked(true); + } + m_optionWidget->findChild("radC39HIBC")->setEnabled(false); + } + else + m_optionWidget->findChild("radC39HIBC")->setEnabled(true); } if(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_CODABLOCKF) { - options = true; - grpCodablock->show(); - } else { - grpCodablock->hide(); + QFile file(":/grpCodablock.ui"); + if (!file.open(QIODevice::ReadOnly)) + return; + m_optionWidget=uiload.load(&file); + file.close(); + tabMain->insertTab(1,m_optionWidget,tr("Options")); + connect(m_optionWidget->findChild("radCodaStand"), SIGNAL(clicked( bool )), SLOT(update_preview())); + connect(m_optionWidget->findChild("radCodaGS1"), SIGNAL(clicked( bool )), SLOT(update_preview())); + connect(m_optionWidget->findChild("radCodaHIBC"), SIGNAL(clicked( bool )), SLOT(update_preview())); } if(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_CODE16K) { - options = true; - grpC16k->show(); - } else { - grpC16k->hide(); + QFile file(":/grpC16k.ui"); + if (!file.open(QIODevice::ReadOnly)) + return; + m_optionWidget=uiload.load(&file); + file.close(); + tabMain->insertTab(1,m_optionWidget,tr("Options")); + connect(m_optionWidget->findChild("radC16kStand"), SIGNAL(toggled( bool )), SLOT(update_preview())); } if(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_DATAMATRIX) { - options = true; + QFile file(":/grpDM.ui"); + if (!file.open(QIODevice::ReadOnly)) + return; + m_optionWidget=uiload.load(&file); + file.close(); + tabMain->insertTab(1,m_optionWidget,tr("Options")); + connect(m_optionWidget->findChild("cmbDMMode"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview())); + connect(m_optionWidget->findChild("cmbDMMode"), SIGNAL(currentIndexChanged( int )), SLOT(datamatrix_options())); + connect(m_optionWidget->findChild("radDM200Stand"), SIGNAL(clicked( bool )), SLOT(update_preview())); + connect(m_optionWidget->findChild("radDM200GS1"), SIGNAL(clicked( bool )), SLOT(update_preview())); + connect(m_optionWidget->findChild("radDM200HIBC"), SIGNAL(clicked( bool )), SLOT(update_preview())); + connect(m_optionWidget->findChild("cmbDM200Size"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview())); + connect(m_optionWidget->findChild("cmbDMNon200Size"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview())); datamatrix_options(); - grpDM->show(); - } else { - grpDM->hide(); } if(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_QRCODE) { - options = true; - grpQR->show(); - } else { - grpQR->hide(); + QFile file(":/grpQR.ui"); + if (!file.open(QIODevice::ReadOnly)) + return; + m_optionWidget=uiload.load(&file); + file.close(); + tabMain->insertTab(1,m_optionWidget,tr("Options")); + connect(m_optionWidget->findChild("radQRAuto"), SIGNAL(clicked( bool )), SLOT(update_preview())); + connect(m_optionWidget->findChild("radQRSize"), SIGNAL(clicked( bool )), SLOT(update_preview())); + 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())); } if(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_MICROQR) { - options = true; - grpMQR->show(); - } else { - grpMQR->hide(); + QFile file(":/grpMQR.ui"); + if (!file.open(QIODevice::ReadOnly)) + return; + m_optionWidget=uiload.load(&file); + file.close(); + tabMain->insertTab(1,m_optionWidget,tr("Options")); + connect(m_optionWidget->findChild("radMQRAuto"), SIGNAL(clicked( bool )), SLOT(update_preview())); + connect(m_optionWidget->findChild("radMQRSize"), SIGNAL(clicked( bool )), SLOT(update_preview())); + connect(m_optionWidget->findChild("radMQRECC"), SIGNAL(clicked( bool )), SLOT(update_preview())); + 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_MAXICODE) { - grpMaxiCode->show(); - } else { - grpMaxiCode->hide(); + QFile file(":/grpMaxiCode.ui"); + if (!file.open(QIODevice::ReadOnly)) + return; + m_optionWidget=uiload.load(&file); + file.close(); + tabMain->insertTab(1,m_optionWidget,tr("Options")); } if(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_CHANNEL) { - options = true; - grpChannel->show(); - } else { - grpChannel->hide(); + QFile file(":/grpChannel.ui"); + if (!file.open(QIODevice::ReadOnly)) + return; + m_optionWidget=uiload.load(&file); + file.close(); + tabMain->insertTab(1,m_optionWidget,tr("Options")); + connect(m_optionWidget->findChild("cmbChannel"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview())); } - if(options == true) { - lblNoOption->hide(); - } else { - lblNoOption->show(); - } - switch(metaObject()->enumerator(0).value(bstyle->currentIndex())) { case BARCODE_CODE128: @@ -406,17 +436,22 @@ void MainWindow::change_options() grpComposite->hide(); break; } + tabMain->setCurrentIndex(0); } void MainWindow::composite_enable() { - if(chkComposite->isChecked() == true) { + if(chkComposite->isChecked() == true) + { lblCompType->setEnabled(true); cmbCompType->setEnabled(true); lblComposite->setEnabled(true); txtComposite->setEnabled(true); - radC128EAN->setChecked(true); - } else { + if (metaObject()->enumerator(0).value(bstyle->currentIndex())==BARCODE_CODE128) + m_optionWidget->findChild("radC128EAN")->setChecked(true); + } + else + { lblCompType->setEnabled(false); cmbCompType->setEnabled(false); lblComposite->setEnabled(false); @@ -426,73 +461,26 @@ void MainWindow::composite_enable() void MainWindow::composite_ean_check() { - if(radC128EAN->isChecked() == false) { + if (metaObject()->enumerator(0).value(bstyle->currentIndex())!=BARCODE_CODE128) + return; + if(!m_optionWidget->findChild("radC128EAN")->isChecked()) chkComposite->setChecked(false); - } } -void MainWindow::aztec_size() -{ - if(radAztecSize->isChecked() == true) { - cmbAztecSize->setEnabled(true); - } else { - cmbAztecSize->setEnabled(false); - } -} - -void MainWindow::aztec_errorcorrect() -{ - if(radAztecECC->isChecked() == true) { - cmbAztecECC->setEnabled(true); - } else { - cmbAztecECC->setEnabled(false); - } -} - -void MainWindow::qr_size() -{ - if(radQRSize->isChecked() == true) { - cmbQRSize->setEnabled(true); - } else { - cmbQRSize->setEnabled(false); - } -} - -void MainWindow::mqr_errorcorrect() -{ - if(radMQRECC->isChecked() == true) { - cmbMQRECC->setEnabled(true); - } else { - cmbMQRECC->setEnabled(false); - } -} - -void MainWindow::mqr_size() -{ - if(radMQRSize->isChecked() == true) { - cmbMQRSize->setEnabled(true); - } else { - cmbMQRSize->setEnabled(false); - } -} - -void MainWindow::qr_errorcorrect() -{ - if(radQRECC->isChecked() == true) { - cmbQRECC->setEnabled(true); - } else { - cmbQRECC->setEnabled(false); - } -} void MainWindow::datamatrix_options() { - if(cmbDMMode->currentIndex() == 0) { - grpDMNon200->hide(); - grpDM200->show(); - } else { - grpDM200->hide(); - grpDMNon200->show(); + if (metaObject()->enumerator(0).value(bstyle->currentIndex())!=BARCODE_DATAMATRIX) + return; + if(m_optionWidget->findChild("cmbDMMode")->currentIndex() == 0) + { + m_optionWidget->findChild("grpDMNon200")->hide(); + m_optionWidget->findChild("grpDM200")->show(); + } + else + { + m_optionWidget->findChild("grpDM200")->hide(); + m_optionWidget->findChild("grpDMNon200")->show(); } } @@ -524,224 +512,231 @@ void MainWindow::update_preview() switch(metaObject()->enumerator(0).value(bstyle->currentIndex())) { case BARCODE_CODE128: - if(radC128Stand->isChecked() == true) { + if(m_optionWidget->findChild("radC128Stand")->isChecked()) m_bc.bc.setSymbol(BARCODE_CODE128); - } - if(radC128CSup->isChecked() == true) { + + if(m_optionWidget->findChild("radC128CSup")->isChecked()) m_bc.bc.setSymbol(BARCODE_CODE128B); - } - if(radC128EAN->isChecked() == true) { - if(chkComposite->isChecked() == true) { + + if(m_optionWidget->findChild("radC128EAN")->isChecked()) + { + if(chkComposite->isChecked()) m_bc.bc.setSymbol(BARCODE_EAN128_CC); - } else { + else m_bc.bc.setSymbol(BARCODE_EAN128); - } } - if(radC128HIBC->isChecked() == true) { + + if(m_optionWidget->findChild("radC128HIBC")->isChecked()) m_bc.bc.setSymbol(BARCODE_HIBC_128); - } break; + case BARCODE_EANX: - if(chkComposite->isChecked() == true) { + if(chkComposite->isChecked()) m_bc.bc.setSymbol(BARCODE_EANX_CC); - } else { + else m_bc.bc.setSymbol(BARCODE_EANX); - } break; + case BARCODE_UPCA: - if(chkComposite->isChecked() == true) { + if(chkComposite->isChecked()) m_bc.bc.setSymbol(BARCODE_UPCA_CC); - } else { + else m_bc.bc.setSymbol(BARCODE_UPCA); - } break; + case BARCODE_UPCE: - if(chkComposite->isChecked() == true) { + if(chkComposite->isChecked()) m_bc.bc.setSymbol(BARCODE_UPCE_CC); - } else { + else m_bc.bc.setSymbol(BARCODE_UPCE); - } break; + case BARCODE_RSS14: - if(chkComposite->isChecked() == true) { + if(chkComposite->isChecked()) m_bc.bc.setSymbol(BARCODE_RSS14_CC); - } else { + else m_bc.bc.setSymbol(BARCODE_RSS14); - } break; + case BARCODE_RSS_LTD: - if(chkComposite->isChecked() == true) { + if(chkComposite->isChecked()) m_bc.bc.setSymbol(BARCODE_RSS_LTD_CC); - } else { + else m_bc.bc.setSymbol(BARCODE_RSS_LTD); - } break; + case BARCODE_RSS_EXP: - if(chkComposite->isChecked() == true) { + if(chkComposite->isChecked()) m_bc.bc.setSymbol(BARCODE_RSS_EXP_CC); - } else { + else m_bc.bc.setSymbol(BARCODE_RSS_EXP); - } break; + case BARCODE_RSS14STACK: - if(chkComposite->isChecked() == true) { + if(chkComposite->isChecked()) m_bc.bc.setSymbol(BARCODE_RSS14STACK_CC); - } else { + else m_bc.bc.setSymbol(BARCODE_RSS14STACK); - } break; + case BARCODE_RSS14STACK_OMNI: - if(chkComposite->isChecked() == true) { + if(chkComposite->isChecked()) m_bc.bc.setSymbol(BARCODE_RSS14_OMNI_CC); - } else { + else m_bc.bc.setSymbol(BARCODE_RSS14STACK_OMNI); - } break; + case BARCODE_RSS_EXPSTACK: - if(chkComposite->isChecked() == true) { + if(chkComposite->isChecked()) m_bc.bc.setSymbol(BARCODE_RSS_EXPSTACK_CC); - } else { + else m_bc.bc.setSymbol(BARCODE_RSS_EXPSTACK); - } break; + case BARCODE_PDF417: - m_bc.bc.setWidth(cmbPDFCols->currentIndex()); - m_bc.bc.setSecurityLevel(cmbPDFECC->currentIndex() - 1); - m_bc.bc.setPdf417CodeWords(codewords->value()); - if(radPDFStand->isChecked() == true) { + m_bc.bc.setWidth(m_optionWidget->findChild("cmbPDFCols")->currentIndex()); + m_bc.bc.setSecurityLevel(m_optionWidget->findChild("cmbPDFECC")->currentIndex()-1); + m_bc.bc.setPdf417CodeWords(m_optionWidget->findChild("codewords")->value()); + if(m_optionWidget->findChild("radPDFStand")->isChecked()) m_bc.bc.setSymbol(BARCODE_PDF417); - } - if(radPDFTruncated->isChecked() == true) { + + if(m_optionWidget->findChild("radPDFTruncated")->isChecked()) m_bc.bc.setSymbol(BARCODE_PDF417TRUNC); - } - if(radPDFHIBC->isChecked() == true) { + + if(m_optionWidget->findChild("radPDFHIBC")->isChecked()) m_bc.bc.setSymbol(BARCODE_HIBC_PDF); - } break; + case BARCODE_MICROPDF417: - m_bc.bc.setWidth(cmbMPDFCols->currentIndex()); - if(radMPDFStand->isChecked() == true) { + m_bc.bc.setWidth(m_optionWidget->findChild("cmbMPDFCols")->currentIndex()); + if(m_optionWidget->findChild("radMPDFStand")->isChecked()) m_bc.bc.setSymbol(BARCODE_MICROPDF417); - } - if(radMPDFHIBC->isChecked() == true) { + + if(m_optionWidget->findChild("radMPDFHIBC")->isChecked()) m_bc.bc.setSymbol(BARCODE_HIBC_MICPDF); - } break; + case BARCODE_AZTEC: m_bc.bc.setSymbol(BARCODE_AZTEC); - if(radAztecSize->isChecked() == true) { - m_bc.bc.setWidth(cmbAztecSize->currentIndex() + 1); - } - if(radAztecECC->isChecked() == true) { - m_bc.bc.setSecurityLevel(cmbAztecECC->currentIndex() + 1); - } - if(chkAztecMode->isChecked() == true) { + if(m_optionWidget->findChild("radAztecSize")->isChecked()) + m_bc.bc.setWidth(m_optionWidget->findChild("cmbAztecSize")->currentIndex() + 1); + + if(m_optionWidget->findChild("radAztecECC")->isChecked()) + m_bc.bc.setSecurityLevel(m_optionWidget->findChild("cmbAztecECC")->currentIndex() + 1); + + if(m_optionWidget->findChild("chkAztecMode")->isChecked()) m_bc.bc.setInputMode(GS1_MODE); - } break; + case MSI_PLESSEY: m_bc.bc.setSymbol(BARCODE_MSI_PLESSEY); - m_bc.bc.setWidth(cmbMSICheck->currentIndex()); + m_bc.bc.setWidth(m_optionWidget->findChild("cmbMSICheck")->currentIndex()); break; + case BARCODE_CODE39: - if(radC39HIBC->isChecked() == false) { + if(m_optionWidget->findChild("radC39HIBC")->isChecked()) + { m_bc.bc.setSymbol(BARCODE_CODE39); - if(radC39Check->isChecked() == true) { + if(m_optionWidget->findChild("radC39Check")->isChecked()) m_bc.bc.setWidth(1); - } - } else { + } + else m_bc.bc.setSymbol(BARCODE_HIBC_39); - } break; + case BARCODE_EXCODE39: m_bc.bc.setSymbol(BARCODE_EXCODE39); - if(radC39Check->isChecked() == true) { + if(m_optionWidget->findChild("radC39Check")->isChecked()) m_bc.bc.setWidth(1); - } + break; case BARCODE_CODE16K: m_bc.bc.setSymbol(BARCODE_CODE16K); - if(radC16kStand->isChecked() == true) { + if(m_optionWidget->findChild("radC16kStand")->isChecked()) m_bc.bc.setInputMode(UNICODE_MODE); - } else { + else m_bc.bc.setInputMode(GS1_MODE); - } break; + case BARCODE_CODABLOCKF: - if(radCodaGS1->isChecked() == true) { + if(m_optionWidget->findChild("radCodaGS1")->isChecked()) m_bc.bc.setInputMode(GS1_MODE); - } - if(radCodaHIBC->isChecked() == false) { - m_bc.bc.setSymbol(BARCODE_CODABLOCKF); - } else { + + if(m_optionWidget->findChild("radCodaHIBC")->isChecked()) m_bc.bc.setSymbol(BARCODE_HIBC_BLOCKF); - } + else + m_bc.bc.setSymbol(BARCODE_CODABLOCKF); break; + case BARCODE_DATAMATRIX: - m_bc.bc.setSecurityLevel(cmbDMMode->currentIndex() + 1); - if(cmbDMMode->currentIndex() == 0) { - /* ECC 200 */ - if(radDM200HIBC->isChecked() == true) { + m_bc.bc.setSecurityLevel(m_optionWidget->findChild("cmbDMMode")->currentIndex() + 1); + if(m_optionWidget->findChild("cmbDMMode")->currentIndex() == 0) + { /* ECC 200 */ + if(m_optionWidget->findChild("radDM200HIBC")->isChecked()) m_bc.bc.setSymbol(BARCODE_HIBC_DM); - } else { + else m_bc.bc.setSymbol(BARCODE_DATAMATRIX); - } - if(radDM200GS1->isChecked() == true) { + + if(m_optionWidget->findChild("radDM200GS1")->isChecked()) m_bc.bc.setInputMode(GS1_MODE); - } - m_bc.bc.setWidth(cmbDM200Size->currentIndex()); - } else { - /* Not ECC 200 */ + + m_bc.bc.setWidth(m_optionWidget->findChild("cmbDM200Size")->currentIndex()); + } + else + { /* Not ECC 200 */ m_bc.bc.setSymbol(BARCODE_DATAMATRIX); - m_bc.bc.setWidth(cmbDMNon200Size->currentIndex()); + m_bc.bc.setWidth(m_optionWidget->findChild("cmbDMNon200Size")->currentIndex()); } break; + case BARCODE_QRCODE: - if(chkQRHIBC->isChecked() == true) { + if(m_optionWidget->findChild("chkQRHIBC")->isChecked()) m_bc.bc.setSymbol(BARCODE_HIBC_QR); - } else { + else m_bc.bc.setSymbol(BARCODE_QRCODE); - } - if(radQRSize->isChecked() == true) { - m_bc.bc.setWidth(cmbQRSize->currentIndex() + 1); - } - if(radQRECC->isChecked() == true) { - m_bc.bc.setSecurityLevel(cmbQRECC->currentIndex() + 1); - } + + if(m_optionWidget->findChild("radQRSize")->isChecked()) + m_bc.bc.setWidth(m_optionWidget->findChild("cmbQRSize")->currentIndex() + 1); + + if(m_optionWidget->findChild("radQRECC")->isChecked()) + m_bc.bc.setSecurityLevel(m_optionWidget->findChild("cmbQRECC")->currentIndex() + 1); break; + case BARCODE_MICROQR: m_bc.bc.setSymbol(BARCODE_MICROQR); - if(radMQRSize->isChecked() == true) { - m_bc.bc.setWidth(cmbMQRSize->currentIndex() + 1); - } - if(radMQRECC->isChecked() == true) { - m_bc.bc.setSecurityLevel(cmbMQRECC->currentIndex() + 1); - } + if(m_optionWidget->findChild("radMQRSize")->isChecked()) + m_bc.bc.setWidth(m_optionWidget->findChild("cmbMQRSize")->currentIndex() + 1); + + if(m_optionWidget->findChild("radMQRECC")->isChecked()) + m_bc.bc.setSecurityLevel(m_optionWidget->findChild("cmbMQRECC")->currentIndex() + 1); break; + case BARCODE_MAXICODE: m_bc.bc.setSymbol(BARCODE_MAXICODE); - if(cmbMaxiMode->currentIndex() == 0) { + if(cmbMaxiMode->currentIndex() == 0) + { m_bc.bc.setSecurityLevel(2); m_bc.bc.setPrimaryMessage(txtMaxiPrimary->text()); - } else { - m_bc.bc.setSecurityLevel(cmbMaxiMode->currentIndex() + 3); } + else + m_bc.bc.setSecurityLevel(cmbMaxiMode->currentIndex() + 3); break; + case BARCODE_CHANNEL: m_bc.bc.setSymbol(BARCODE_CHANNEL); - if(cmbChannel->currentIndex() == 0) { + if(m_optionWidget->findChild("cmbChannel")->currentIndex() == 0) m_bc.bc.setWidth(0); - } else { - m_bc.bc.setWidth(cmbChannel->currentIndex() + 2); - } + else + m_bc.bc.setWidth(m_optionWidget->findChild("cmbChannel")->currentIndex() + 2); break; default: m_bc.bc.setSymbol(metaObject()->enumerator(0).value(bstyle->currentIndex())); break; } - if(chkComposite->isChecked() == true) { + + if(chkComposite->isChecked()) m_bc.bc.setSecurityLevel(cmbCompType->currentIndex()); - } + m_bc.bc.setBorderType((Zint::QZint::BorderType)(btype->currentIndex()*2)); m_bc.bc.setBorderWidth(bwidth->value()); m_bc.bc.setHeight(heightb->value()); diff --git a/frontend_qt4/mainwindow.h b/frontend_qt4/mainwindow.h index ca078640..64fdc726 100644 --- a/frontend_qt4/mainwindow.h +++ b/frontend_qt4/mainwindow.h @@ -19,15 +19,15 @@ #include #include - #include +#include #include "ui_mainWindow.h" #include "barcodeitem.h" - class QAction; - class QActionGroup; - class QLabel; - class QMenu; +class QAction; +class QActionGroup; +class QLabel; +class QMenu; class MainWindow : public QWidget, private Ui::mainWindow { @@ -104,6 +104,7 @@ public: MainWindow(QWidget* parent = 0, Qt::WFlags fl = 0); ~MainWindow(); + public slots: void update_preview(); void change_options(); @@ -111,21 +112,16 @@ public slots: void on_bgcolor_clicked(); void composite_enable(); void composite_ean_check(); - void aztec_size(); - void aztec_errorcorrect(); void datamatrix_options(); - void qr_size(); - void qr_errorcorrect(); - void mqr_size(); - void mqr_errorcorrect(); void maxi_primary(); void change_print_scale(); + void scaleRotate(); private slots: bool save(); void about(); void quit_now(); - /* void about(); */ + private: /* void createActions(); @@ -133,6 +129,7 @@ private: QColor m_fgcolor,m_bgcolor; BarcodeItem m_bc; + QWidget *m_optionWidget; /* QMenu *fileMenu; QMenu *helpMenu; QAction *saveAct; diff --git a/frontend_qt4/resources.qrc b/frontend_qt4/resources.qrc new file mode 100644 index 00000000..fd3ffb98 --- /dev/null +++ b/frontend_qt4/resources.qrc @@ -0,0 +1,20 @@ + + + zoomin.png + zoomout.png + rotateleft.png + rotateright.png + grpAztec.ui + grpC39.ui + grpDM.ui + grpMSICheck.ui + grpC128.ui + grpChannel.ui + grpMicroPDF.ui + grpPDF417.ui + grpC16k.ui + grpCodablock.ui + grpMQR.ui + grpQR.ui + + diff --git a/frontend_qt4/rotateleft.png b/frontend_qt4/rotateleft.png new file mode 100644 index 00000000..8cfa9319 Binary files /dev/null and b/frontend_qt4/rotateleft.png differ diff --git a/frontend_qt4/rotateright.png b/frontend_qt4/rotateright.png new file mode 100644 index 00000000..ec5e8664 Binary files /dev/null and b/frontend_qt4/rotateright.png differ diff --git a/frontend_qt4/zoomin.png b/frontend_qt4/zoomin.png new file mode 100644 index 00000000..8b0daeea Binary files /dev/null and b/frontend_qt4/zoomin.png differ diff --git a/frontend_qt4/zoomout.png b/frontend_qt4/zoomout.png new file mode 100644 index 00000000..1575dd24 Binary files /dev/null and b/frontend_qt4/zoomout.png differ