Skip to content

Commit c9435c1

Browse files
committed
Various updates
1 parent a9e72ef commit c9435c1

4 files changed

Lines changed: 44 additions & 37 deletions

File tree

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,11 @@ message(STATUS "[CMAKE] CMAKE_VERSION = ${CMAKE_VERSION}")
2121
message(STATUS "[CMAKE] CMAKE_PREFIX_PATH = ${CMAKE_PREFIX_PATH}")
2222
message(STATUS "[SYSTEM] (HOST) SYSTEM NAME = ${CMAKE_HOST_SYSTEM_NAME}")
2323
message(STATUS "[SYSTEM] (HOST) SYSTEM VERSION = ${CMAKE_HOST_SYSTEM_VERSION}")
24+
message(STATUS "[SYSTEM] (HOST) SYSTEM PROCESSOR = ${CMAKE_HOST_SYSTEM_PROCESSOR}")
2425
message(STATUS "[SYSTEM] (TARGET) SYSTEM NAME = ${CMAKE_SYSTEM_NAME}")
2526
message(STATUS "[SYSTEM] (TARGET) SYSTEM VERSION = ${CMAKE_SYSTEM_VERSION}")
27+
message(STATUS "[SYSTEM] (TARGET) SYSTEM PROCESSOR = ${CMAKE_SYSTEM_PROCESSOR}")
28+
message(STATUS "[PROJECT] CURRENT_SOURCE_DIR = ${CMAKE_CURRENT_SOURCE_DIR}")
2629
message(STATUS "[PROJECT] SOURCE_DIR = ${CMAKE_SOURCE_DIR}")
2730
message(STATUS "[PROJECT] BUILD_TYPE = ${CMAKE_BUILD_TYPE}")
2831
message(STATUS "[PROJECT] TOOLCHAIN_FILE = ${CMAKE_TOOLCHAIN_FILE}")

qml/ScreenBarcodeWriter.qml

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ Loader {
120120
smooth: false
121121

122122
sourceSize.width: width
123-
sourceSize.height: height
123+
sourceSize.height: (selectorBarcodes.currentMode === "2d") ? height : height/4
124124
fillMode: Image.PreserveAspectFit
125125

126126
source: {
@@ -382,17 +382,18 @@ Loader {
382382
id: lmSelectorBarcodes_zintqml
383383

384384
// matrix
385-
ListElement { idx: 0; type: "2d"; txt: "QrCode"; format: "qrcode"; maxnum: 0; maxchar: 4296; maxbytes: 2953; ecc: 4; }
385+
ListElement { idx: 0; type: "2d"; txt: "QR Code"; format: "qrcode"; maxnum: 0; maxchar: 4296; maxbytes: 2953; ecc: 4; }
386386
ListElement { idx: 1; type: "2d"; txt: "µQrCode"; format: "microqrcode"; maxnum: 0; maxchar: 21; maxbytes: 256; ecc: 4; }
387387
ListElement { idx: 2; type: "2d"; txt: "rect. µQrCode"; format: "rmqr"; maxnum: 0; maxchar: 21; maxbytes: 256; ecc: 4; }
388-
ListElement { idx: 3; type: "2d"; txt: "Aztec"; format: "aztec"; maxnum: 0; maxchar: 3067; maxbytes: 3067; ecc: 8; }
388+
ListElement { idx: 3; type: "2d"; txt: "Aztec Code"; format: "aztec"; maxnum: 0; maxchar: 3067; maxbytes: 3067; ecc: 8; }
389+
//ListElement { idx: 4; type: "2d"; txt: "Aztec Rune"; format: "aztecrune"; maxnum: 0; maxchar: 3067; maxbytes: 3067; ecc: 8; }
389390
ListElement { idx: 4; type: "2d"; txt: "DataMatrix"; format: "datamatrix"; maxnum: 0; maxchar: 2335; maxbytes: 1556; ecc: 0; }
390391
ListElement { idx: 5; type: "2d"; txt: "PDF417"; format: "pdf417"; maxnum: 0; maxchar: 1850; maxbytes: 1108; ecc: 8; }
391392
ListElement { idx: 6; type: "2d"; txt: "µPDF417"; format: "micropdf417"; maxnum: 0; maxchar: 256; maxbytes: 1108; ecc: 8; }
392393
ListElement { idx: 7; type: "2d"; txt: "GridMatrix"; format: "gridmatrix"; maxnum: 0; maxchar: 2335; maxbytes: 1556; ecc: 0; }
393394
// esoteric (but fun)
394-
ListElement { idx: 8; type: "2d"; txt: "DotCode"; format: "dotcode"; maxnum: 0; maxchar: 2335; maxbytes: 1556; ecc: 0; }
395-
ListElement { idx: 9; type: "2d"; txt: "MaxiCode"; format: "maxicode"; maxnum: 0; maxchar: 2335; maxbytes: 1556; ecc: 0; }
395+
ListElement { idx: 8; type: "2d"; txt: "DotCode"; format: "dotcode"; maxnum: 0; maxchar: 2335; maxbytes: 1556; ecc: 0; }
396+
ListElement { idx: 9; type: "2d"; txt: "MaxiCode"; format: "maxicode"; maxnum: 0; maxchar: 2335; maxbytes: 1556; ecc: 0; }
396397
ListElement { idx: 10; type: "2d"; txt: "UltraCode"; format: "ultracode"; maxnum: 0; maxchar: 2335; maxbytes: 1556; ecc: 0; }
397398
ListElement { idx: 11; type: "2d"; txt: "Code One"; format: "codeone"; maxnum: 0; maxchar: 2335; maxbytes: 1556; ecc: 0; }
398399
// esoteric (but not particularly fun)
@@ -406,16 +407,17 @@ Loader {
406407

407408
// matrix
408409
ListElement { idx: 0; type: "2d"; txt: "QR Code"; format: "qrcode"; maxchar: 4296; maxbytes: 2953; ecc: 4; }
409-
ListElement { idx: 1; type: "2d"; txt: "Aztec"; format: "aztec"; maxchar: 3067; maxbytes: 3067; ecc: 8; }
410+
ListElement { idx: 1; type: "2d"; txt: "Aztec Code"; format: "aztec"; maxchar: 3067; maxbytes: 3067; ecc: 8; }
411+
//ListElement { idx: 2; type: "2d"; txt: "Aztec Rune"; format: "aztecrune"; maxchar: 3067; maxbytes: 3067; ecc: 8; }
410412
ListElement { idx: 2; type: "2d"; txt: "DataMatrix"; format: "datamatrix"; maxchar: 2335; maxbytes: 1556; ecc: 0; }
411413
// linear
412-
ListElement { idx: 3; type: "1d"; txt: "Codabar"; format: "codabar"; maxnum: 12; }
413-
ListElement { idx: 4; type: "1d"; txt: "EAN 13"; format: "ean13"; maxnum: 12; }
414-
ListElement { idx: 5; type: "1d"; txt: "EAN 8"; format: "ean8"; maxnum: 7; }
415-
ListElement { idx: 6; type: "1d"; txt: "UPC-A"; format: "upca"; maxnum: 11; }
416-
ListElement { idx: 7; type: "1d"; txt: "UPC-E"; format: "upce"; maxnum: 7; }
417-
ListElement { idx: 8; type: "1d"; txt: "Code 39"; format: "code39"; maxnum: 39; }
418-
ListElement { idx: 9; type: "1d"; txt: "Code 93"; format: "code93"; maxnum: 93; }
414+
ListElement { idx: 3; type: "1d"; txt: "Codabar"; format: "codabar"; maxnum: 12; }
415+
ListElement { idx: 4; type: "1d"; txt: "EAN 13"; format: "ean13"; maxnum: 12; }
416+
ListElement { idx: 5; type: "1d"; txt: "EAN 8"; format: "ean8"; maxnum: 7; }
417+
ListElement { idx: 6; type: "1d"; txt: "UPC-A"; format: "upca"; maxnum: 11; }
418+
ListElement { idx: 7; type: "1d"; txt: "UPC-E"; format: "upce"; maxnum: 7; }
419+
ListElement { idx: 8; type: "1d"; txt: "Code 39"; format: "code39"; maxnum: 39; }
420+
ListElement { idx: 9; type: "1d"; txt: "Code 93"; format: "code93"; maxnum: 93; }
419421
ListElement { idx: 10; type: "1d"; txt: "Code 128"; format: "code128"; maxnum: 128; }
420422
ListElement { idx: 11; type: "1d"; txt: "ITF"; format: "itf"; maxnum: 10; }
421423
}
@@ -496,7 +498,9 @@ Loader {
496498

497499
currentSelection: 0
498500
model: {
499-
if (barcodeAdvanced.format === "aztec") return lmBarcodeEccAz
501+
if (barcodeAdvanced.format === "aztec" ||
502+
barcodeAdvanced.format === "azteccode"||
503+
barcodeAdvanced.format === "aztecrune") return lmBarcodeEccAz
500504
if (barcodeAdvanced.format === "datamatrix") return lmBarcodeEccDM
501505
if (barcodeAdvanced.format === "qrcode" ||
502506
barcodeAdvanced.format === "microqrcode" ||
@@ -514,7 +518,9 @@ Loader {
514518
currentSelection = index
515519

516520
var vvv = 0
517-
if (barcodeAdvanced.format === "aztec") vvv = lmBarcodeEccAz.get(index).ecc
521+
if (barcodeAdvanced.format === "aztec" ||
522+
barcodeAdvanced.format === "azteccode"||
523+
barcodeAdvanced.format === "aztecrune") vvv = lmBarcodeEccAz.get(index).ecc
518524
if (barcodeAdvanced.format === "datamatrix") vvv = lmBarcodeEccDM.get(index).ecc
519525
if (barcodeAdvanced.format === "qrcode" ||
520526
barcodeAdvanced.format === "microqrcode" ||

src/BarcodeManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ void BarcodeManager::addHistory(const QString &data, const QString &format,
258258
}
259259
addBarcode.bindValue(":data", data);
260260
addBarcode.bindValue(":format", format);
261-
addBarcode.bindValue(":date", QDateTime::currentDateTime().toMSecsSinceEpoch());
261+
addBarcode.bindValue(":date", QDateTime::currentMSecsSinceEpoch());
262262

263263
if (addBarcode.exec() == false)
264264
{

thirdparty/QZXing/QZXing.h

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
#ifndef QZXING_H
1818
#define QZXING_H
1919

20-
#include "QZXing_global.h"
21-
2220
#include <QObject>
2321
#include <QImage>
2422
#include <QVariantList>
@@ -68,25 +66,25 @@ class QZXing : public QObject {
6866

6967
public:
7068
enum DecoderFormat {
71-
DecoderFormat_None = 0,
72-
DecoderFormat_Aztec = 1 << 1,
73-
DecoderFormat_CODABAR = 1 << 2,
74-
DecoderFormat_CODE_39 = 1 << 3,
75-
DecoderFormat_CODE_93 = 1 << 4,
76-
DecoderFormat_CODE_128 = 1 << 5,
77-
DecoderFormat_DATA_MATRIX = 1 << 6,
78-
DecoderFormat_EAN_8 = 1 << 7,
79-
DecoderFormat_EAN_13 = 1 << 8,
80-
DecoderFormat_ITF = 1 << 9,
81-
DecoderFormat_MAXICODE = 1 << 10,
82-
DecoderFormat_PDF_417 = 1 << 11,
83-
DecoderFormat_QR_CODE = 1 << 12,
84-
DecoderFormat_RSS_14 = 1 << 13,
85-
DecoderFormat_RSS_EXPANDED = 1 << 14,
86-
DecoderFormat_UPC_A = 1 << 15,
87-
DecoderFormat_UPC_E = 1 << 16,
88-
DecoderFormat_UPC_EAN_EXTENSION = 1 << 17,
89-
DecoderFormat_CODE_128_GS1 = 1 << 18,
69+
DecoderFormat_None = 0,
70+
DecoderFormat_Aztec = (1 << 1),
71+
DecoderFormat_CODABAR = (1 << 2),
72+
DecoderFormat_CODE_39 = (1 << 3),
73+
DecoderFormat_CODE_93 = (1 << 4),
74+
DecoderFormat_CODE_128 = (1 << 5),
75+
DecoderFormat_DATA_MATRIX = (1 << 6),
76+
DecoderFormat_EAN_8 = (1 << 7),
77+
DecoderFormat_EAN_13 = (1 << 8),
78+
DecoderFormat_ITF = (1 << 9),
79+
DecoderFormat_MAXICODE = (1 << 10),
80+
DecoderFormat_PDF_417 = (1 << 11),
81+
DecoderFormat_QR_CODE = (1 << 12),
82+
DecoderFormat_RSS_14 = (1 << 13),
83+
DecoderFormat_RSS_EXPANDED = (1 << 14),
84+
DecoderFormat_UPC_A = (1 << 15),
85+
DecoderFormat_UPC_E = (1 << 16),
86+
DecoderFormat_UPC_EAN_EXTENSION = (1 << 17),
87+
DecoderFormat_CODE_128_GS1 = (1 << 18),
9088

9189
LinearCodes = DecoderFormat_CODABAR | DecoderFormat_CODE_39 | DecoderFormat_CODE_93 | DecoderFormat_CODE_128 |
9290
DecoderFormat_EAN_8 | DecoderFormat_EAN_13 | DecoderFormat_ITF |

0 commit comments

Comments
 (0)