diff --git a/binary/Harmattan-Maemo5/libQZXing.so b/binary/Harmattan-Maemo5/libQZXing.so index 90dc2f3..f573139 100644 Binary files a/binary/Harmattan-Maemo5/libQZXing.so and b/binary/Harmattan-Maemo5/libQZXing.so differ diff --git a/binary/Harmattan-Maemo5/qzxing.h b/binary/Harmattan-Maemo5/qzxing.h index 4dad602..6b17035 100644 --- a/binary/Harmattan-Maemo5/qzxing.h +++ b/binary/Harmattan-Maemo5/qzxing.h @@ -18,48 +18,71 @@ * * Regarding DecoderFormat, by default all of those are enabled (except DataMatrix will is still not supported) */ -class QZXINGSHARED_EXPORT QZXing : public QObject{ +class +#ifndef DISABLE_LIBRARY_FEATURES + QZXINGSHARED_EXPORT +#endif + QZXing : public QObject{ + Q_OBJECT Q_ENUMS(DecoderFormat) + Q_PROPERTY(int processingTime READ getProcessTimeOfLastDecoding) + Q_PROPERTY(uint enabledDecoders READ getEnabledFormats WRITE setDecoder NOTIFY enabledFormatsChanged) + public: + /* + * + */ enum DecoderFormat { - DecoderFormat_None = 0, - DecoderFormat_QR_CODE = 1, - DecoderFormat_DATA_MATRIX = 2, - DecoderFormat_UPC_E = 4, - DecoderFormat_UPC_A = 8, - DecoderFormat_EAN_8 = 16, - DecoderFormat_EAN_13 = 32, - DecoderFormat_CODE_128 = 64, - DecoderFormat_CODE_39 = 128, - DecoderFormat_ITF = 256, - DecoderFormat_Aztec = 512 - } ; + DecoderFormat_None = 0, + DecoderFormat_Aztec = 1 << 1, + DecoderFormat_CODABAR = 1 << 2, + DecoderFormat_CODE_39 = 1 << 3, + DecoderFormat_CODE_93 = 1 << 4, + DecoderFormat_CODE_128 = 1 << 5, + DecoderFormat_DATA_MATRIX = 1 << 6, + DecoderFormat_EAN_8 = 1 << 7, + DecoderFormat_EAN_13 = 1 << 8, + DecoderFormat_ITF = 1 << 9, + DecoderFormat_MAXICODE = 1 << 10, + DecoderFormat_PDF_417 = 1 << 11, + DecoderFormat_QR_CODE = 1 << 12, + DecoderFormat_RSS_14 = 1 << 13, + DecoderFormat_RSS_EXPANDED = 1 << 14, + DecoderFormat_UPC_A = 1 << 15, + DecoderFormat_UPC_E = 1 << 16, + DecoderFormat_UPC_EAN_EXTENSION = 1 << 17 + } ; typedef unsigned int DecoderFormatType; -public: QZXing(QObject *parent = NULL); - /** - * Set the enabled decoders. - * As argument it is possible to pass conjuction of decoders by using logic OR. - * e.x. setDecoder ( DecoderFormat_QR_CODE | DecoderFormat_EAN_13 | DecoderFormat_CODE_39 ) - */ - void setDecoder(DecoderFormatType hint); + QZXing(DecoderFormat decodeHints, QObject *parent = NULL); #if QT_VERSION >= 0x040700 static void registerQMLTypes() { - qmlRegisterType("QZXing", 1, 2, "QZXing"); + qmlRegisterType("QZXing", 2, 2, "QZXing"); } #endif public slots: /** * The decoding function. Will try to decode the given image based on the enabled decoders. + * If the image width is larger than maxWidth or image height is larger + * than maxHeight then the image will be scaled down. Either way, in case of scaling, the aspect + * ratio of the image will be kept. * + * The smoothTransformation flag determines whether the transformation will be smooth or fast. + * Smooth transformation provides better results but fast transformation is...faster. */ - QString decodeImage(QImage image); + QString decodeImage(QImage image, int maxWidth=-1, int maxHeight=-1, bool smoothTransformation = false); + + /** + * The decoding function. Will try to decode the given image based on the enabled decoders. + * The input image is read from a local image file. + */ + QString decodeImageFromFile(QString imageFilePath, int maxWidth=-1, int maxHeight=-1, bool smoothTransformation = false); /** * The decoding function accessible from QML @@ -74,15 +97,41 @@ public slots: const double offsetX = 0 , const double offsetY = 0, const double width = 0, const double height = 0); + /** + * Get the prossecing time in millisecond of the last decode operation. + * Added mainly as a statistic measure. + * Decoding operation fails, the processing time equals to -1. + */ + int getProcessTimeOfLastDecoding(); + + /** + * Get the decoders that are enabled at the moment. + * Returns a uint which is a bitwise OR of DecoderFormat enumeration values. + */ + uint getEnabledFormats() const; + /** + * Set the enabled decoders. + * As argument it is possible to pass conjuction of decoders by using logic OR. + * e.x. setDecoder ( DecoderFormat_QR_CODE | DecoderFormat_EAN_13 | DecoderFormat_CODE_39 ) + */ + void setDecoder(const uint& hint); + signals: void decodingStarted(); void decodingFinished(bool succeeded); void tagFound(QString tag); + void enabledFormatsChanged(); private: void* decoder; - DecoderFormatType supportedFormats; + DecoderFormatType enabledDecoders; QObject* imageHandler; + int processingTime; + + /** + * If true, the decoding operation will take place at a different thread. + */ + bool isThreaded; }; #endif // QZXING_H diff --git a/binary/Qt_4.6.3_Symbian^1/InstallToDevice/QZXing_S60_FP1_selfsigned.sis b/binary/Qt_4.6.3_Symbian^1/InstallToDevice/QZXing_S60_FP1_selfsigned.sis deleted file mode 100644 index 17cb229..0000000 Binary files a/binary/Qt_4.6.3_Symbian^1/InstallToDevice/QZXing_S60_FP1_selfsigned.sis and /dev/null differ diff --git a/binary/Qt_4.6.3_Symbian^1/InstallToDevice/QZXing_selfsigned.sis b/binary/Qt_4.6.3_Symbian^1/InstallToDevice/QZXing_selfsigned.sis deleted file mode 100644 index 3200710..0000000 Binary files a/binary/Qt_4.6.3_Symbian^1/InstallToDevice/QZXing_selfsigned.sis and /dev/null differ diff --git a/binary/Qt_4.6.3_Symbian^1/InstallToDevice/qzxing.sis b/binary/Qt_4.6.3_Symbian^1/InstallToDevice/qzxing.sis deleted file mode 100644 index f6f9430..0000000 Binary files a/binary/Qt_4.6.3_Symbian^1/InstallToDevice/qzxing.sis and /dev/null differ diff --git a/binary/Qt_4.6.3_Symbian^1/include/qzxing.h b/binary/Qt_4.6.3_Symbian^1/include/qzxing.h deleted file mode 100644 index e312fff..0000000 --- a/binary/Qt_4.6.3_Symbian^1/include/qzxing.h +++ /dev/null @@ -1,74 +0,0 @@ -#ifndef QZXING_H -#define QZXING_H - -#include "QZXing_global.h" -#include -#include - -#if QT_VERSION >= 0x040700 -#include -#endif - -/** - * A class containing a very very small subset of the ZXing library. - * Created for ease of use. - * - * Anyone interested in using more technical stuff - * from the ZXing library is welcomed to add/edit on free will. - * - * Regarding DecoderFormat, by default all of those are enabled (except DataMatrix will is still not supported) - */ -class QZXINGSHARED_EXPORT QZXing : public QObject{ - Q_OBJECT - Q_ENUMS(DecoderFormat) -public: - enum DecoderFormat { - DecoderFormat_None = 0, - DecoderFormat_QR_CODE = 1, - DecoderFormat_DATA_MATRIX = 2, - DecoderFormat_UPC_E = 4, - DecoderFormat_UPC_A = 8, - DecoderFormat_EAN_8 = 16, - DecoderFormat_EAN_13 = 32, - DecoderFormat_CODE_128 = 64, - DecoderFormat_CODE_39 = 128, - DecoderFormat_ITF = 256 - } ; - typedef unsigned int DecoderFormatType; - -public: - QZXing(QObject *parent = NULL); - - /** - * Set the enabled decoders. - * As argument it is possible to pass conjuction of decoders by using logic OR. - * e.x. setDecoder ( DecoderFormat_QR_CODE | DecoderFormat_EAN_13 | DecoderFormat_CODE_39 ) - */ - void setDecoder(DecoderFormatType hint); - -#if QT_VERSION >= 0x040700 - static void registerQMLTypes() - { - qmlRegisterType("QZXing", 1, 0, "QZXing"); - } -#endif - -public slots: - /** - * The decoding function. Will try to decode the given image based on the enabled decoders. - * - */ - QString decodeImage(QImage image); - -signals: - void decodingStarted(); - void decodingFinished(bool succeeded); - void tagFound(QString tag); - -private: - void* decoder; - DecoderFormatType supportedFormats; -}; - -#endif // QZXING_H - diff --git a/binary/Qt_4.6.3_Symbian^1/release/armv5/lib/QZXing.dso b/binary/Qt_4.6.3_Symbian^1/release/armv5/lib/QZXing.dso deleted file mode 100644 index 1ceecd1..0000000 Binary files a/binary/Qt_4.6.3_Symbian^1/release/armv5/lib/QZXing.dso and /dev/null differ diff --git a/binary/Qt_4.6.3_Symbian^1/release/armv5/lib/QZXing{000a0000}.dso b/binary/Qt_4.6.3_Symbian^1/release/armv5/lib/QZXing{000a0000}.dso deleted file mode 100644 index 1ceecd1..0000000 Binary files a/binary/Qt_4.6.3_Symbian^1/release/armv5/lib/QZXing{000a0000}.dso and /dev/null differ diff --git a/binary/Qt_4.7.3_Symbian/InstallToDevice/QZXing_selfsigned.sis b/binary/Qt_4.7.3_Symbian/InstallToDevice/QZXing_selfsigned.sis index 9a3940b..e5e8141 100644 Binary files a/binary/Qt_4.7.3_Symbian/InstallToDevice/QZXing_selfsigned.sis and b/binary/Qt_4.7.3_Symbian/InstallToDevice/QZXing_selfsigned.sis differ diff --git a/binary/Qt_4.7.3_Symbian/InstallToDevice/QZXing_unsigned.sis b/binary/Qt_4.7.3_Symbian/InstallToDevice/QZXing_unsigned.sis index d5e4d4c..db73f3b 100644 Binary files a/binary/Qt_4.7.3_Symbian/InstallToDevice/QZXing_unsigned.sis and b/binary/Qt_4.7.3_Symbian/InstallToDevice/QZXing_unsigned.sis differ diff --git a/binary/Qt_4.7.3_Symbian/include/QZXing.h b/binary/Qt_4.7.3_Symbian/include/QZXing.h index 4dad602..6b17035 100644 --- a/binary/Qt_4.7.3_Symbian/include/QZXing.h +++ b/binary/Qt_4.7.3_Symbian/include/QZXing.h @@ -18,48 +18,71 @@ * * Regarding DecoderFormat, by default all of those are enabled (except DataMatrix will is still not supported) */ -class QZXINGSHARED_EXPORT QZXing : public QObject{ +class +#ifndef DISABLE_LIBRARY_FEATURES + QZXINGSHARED_EXPORT +#endif + QZXing : public QObject{ + Q_OBJECT Q_ENUMS(DecoderFormat) + Q_PROPERTY(int processingTime READ getProcessTimeOfLastDecoding) + Q_PROPERTY(uint enabledDecoders READ getEnabledFormats WRITE setDecoder NOTIFY enabledFormatsChanged) + public: + /* + * + */ enum DecoderFormat { - DecoderFormat_None = 0, - DecoderFormat_QR_CODE = 1, - DecoderFormat_DATA_MATRIX = 2, - DecoderFormat_UPC_E = 4, - DecoderFormat_UPC_A = 8, - DecoderFormat_EAN_8 = 16, - DecoderFormat_EAN_13 = 32, - DecoderFormat_CODE_128 = 64, - DecoderFormat_CODE_39 = 128, - DecoderFormat_ITF = 256, - DecoderFormat_Aztec = 512 - } ; + DecoderFormat_None = 0, + DecoderFormat_Aztec = 1 << 1, + DecoderFormat_CODABAR = 1 << 2, + DecoderFormat_CODE_39 = 1 << 3, + DecoderFormat_CODE_93 = 1 << 4, + DecoderFormat_CODE_128 = 1 << 5, + DecoderFormat_DATA_MATRIX = 1 << 6, + DecoderFormat_EAN_8 = 1 << 7, + DecoderFormat_EAN_13 = 1 << 8, + DecoderFormat_ITF = 1 << 9, + DecoderFormat_MAXICODE = 1 << 10, + DecoderFormat_PDF_417 = 1 << 11, + DecoderFormat_QR_CODE = 1 << 12, + DecoderFormat_RSS_14 = 1 << 13, + DecoderFormat_RSS_EXPANDED = 1 << 14, + DecoderFormat_UPC_A = 1 << 15, + DecoderFormat_UPC_E = 1 << 16, + DecoderFormat_UPC_EAN_EXTENSION = 1 << 17 + } ; typedef unsigned int DecoderFormatType; -public: QZXing(QObject *parent = NULL); - /** - * Set the enabled decoders. - * As argument it is possible to pass conjuction of decoders by using logic OR. - * e.x. setDecoder ( DecoderFormat_QR_CODE | DecoderFormat_EAN_13 | DecoderFormat_CODE_39 ) - */ - void setDecoder(DecoderFormatType hint); + QZXing(DecoderFormat decodeHints, QObject *parent = NULL); #if QT_VERSION >= 0x040700 static void registerQMLTypes() { - qmlRegisterType("QZXing", 1, 2, "QZXing"); + qmlRegisterType("QZXing", 2, 2, "QZXing"); } #endif public slots: /** * The decoding function. Will try to decode the given image based on the enabled decoders. + * If the image width is larger than maxWidth or image height is larger + * than maxHeight then the image will be scaled down. Either way, in case of scaling, the aspect + * ratio of the image will be kept. * + * The smoothTransformation flag determines whether the transformation will be smooth or fast. + * Smooth transformation provides better results but fast transformation is...faster. */ - QString decodeImage(QImage image); + QString decodeImage(QImage image, int maxWidth=-1, int maxHeight=-1, bool smoothTransformation = false); + + /** + * The decoding function. Will try to decode the given image based on the enabled decoders. + * The input image is read from a local image file. + */ + QString decodeImageFromFile(QString imageFilePath, int maxWidth=-1, int maxHeight=-1, bool smoothTransformation = false); /** * The decoding function accessible from QML @@ -74,15 +97,41 @@ public slots: const double offsetX = 0 , const double offsetY = 0, const double width = 0, const double height = 0); + /** + * Get the prossecing time in millisecond of the last decode operation. + * Added mainly as a statistic measure. + * Decoding operation fails, the processing time equals to -1. + */ + int getProcessTimeOfLastDecoding(); + + /** + * Get the decoders that are enabled at the moment. + * Returns a uint which is a bitwise OR of DecoderFormat enumeration values. + */ + uint getEnabledFormats() const; + /** + * Set the enabled decoders. + * As argument it is possible to pass conjuction of decoders by using logic OR. + * e.x. setDecoder ( DecoderFormat_QR_CODE | DecoderFormat_EAN_13 | DecoderFormat_CODE_39 ) + */ + void setDecoder(const uint& hint); + signals: void decodingStarted(); void decodingFinished(bool succeeded); void tagFound(QString tag); + void enabledFormatsChanged(); private: void* decoder; - DecoderFormatType supportedFormats; + DecoderFormatType enabledDecoders; QObject* imageHandler; + int processingTime; + + /** + * If true, the decoding operation will take place at a different thread. + */ + bool isThreaded; }; #endif // QZXING_H diff --git a/binary/Qt_4.7.3_Symbian/include/QZXing_global.h b/binary/Qt_4.7.3_Symbian/include/QZXing_global.h index 617e77b..02ccf12 100644 --- a/binary/Qt_4.7.3_Symbian/include/QZXing_global.h +++ b/binary/Qt_4.7.3_Symbian/include/QZXing_global.h @@ -1,7 +1,8 @@ #ifndef QZXING_GLOBAL_H #define QZXING_GLOBAL_H -#include +#include +#include #if defined(QZXING_LIBRARY) # define QZXINGSHARED_EXPORT Q_DECL_EXPORT @@ -9,4 +10,4 @@ # define QZXINGSHARED_EXPORT Q_DECL_IMPORT #endif -#endif // QZXING_GLOBAL_H +#endif //QZXING_GLOBAL_H diff --git a/binary/Qt_4.7.3_Symbian/release/armv5/lib/QZXing.dso b/binary/Qt_4.7.3_Symbian/release/armv5/lib/QZXing.dso index ab565ee..bb765f0 100644 Binary files a/binary/Qt_4.7.3_Symbian/release/armv5/lib/QZXing.dso and b/binary/Qt_4.7.3_Symbian/release/armv5/lib/QZXing.dso differ diff --git a/binary/Qt_4.7.3_Symbian/release/armv5/lib/QZXing{00010200}.dso b/binary/Qt_4.7.3_Symbian/release/armv5/lib/QZXing{00010200}.dso deleted file mode 100644 index ab565ee..0000000 Binary files a/binary/Qt_4.7.3_Symbian/release/armv5/lib/QZXing{00010200}.dso and /dev/null differ diff --git a/binary/Qt_4.7.3_Symbian/release/armv5/lib/QZXing{00020200}.dso b/binary/Qt_4.7.3_Symbian/release/armv5/lib/QZXing{00020200}.dso new file mode 100644 index 0000000..bb765f0 Binary files /dev/null and b/binary/Qt_4.7.3_Symbian/release/armv5/lib/QZXing{00020200}.dso differ diff --git a/binary/Qt_4.7.4_Desktop_Mingw/QZXing.h b/binary/Qt_4.7.4_Desktop_Mingw/QZXing.h index 4dad602..6b17035 100644 --- a/binary/Qt_4.7.4_Desktop_Mingw/QZXing.h +++ b/binary/Qt_4.7.4_Desktop_Mingw/QZXing.h @@ -18,48 +18,71 @@ * * Regarding DecoderFormat, by default all of those are enabled (except DataMatrix will is still not supported) */ -class QZXINGSHARED_EXPORT QZXing : public QObject{ +class +#ifndef DISABLE_LIBRARY_FEATURES + QZXINGSHARED_EXPORT +#endif + QZXing : public QObject{ + Q_OBJECT Q_ENUMS(DecoderFormat) + Q_PROPERTY(int processingTime READ getProcessTimeOfLastDecoding) + Q_PROPERTY(uint enabledDecoders READ getEnabledFormats WRITE setDecoder NOTIFY enabledFormatsChanged) + public: + /* + * + */ enum DecoderFormat { - DecoderFormat_None = 0, - DecoderFormat_QR_CODE = 1, - DecoderFormat_DATA_MATRIX = 2, - DecoderFormat_UPC_E = 4, - DecoderFormat_UPC_A = 8, - DecoderFormat_EAN_8 = 16, - DecoderFormat_EAN_13 = 32, - DecoderFormat_CODE_128 = 64, - DecoderFormat_CODE_39 = 128, - DecoderFormat_ITF = 256, - DecoderFormat_Aztec = 512 - } ; + DecoderFormat_None = 0, + DecoderFormat_Aztec = 1 << 1, + DecoderFormat_CODABAR = 1 << 2, + DecoderFormat_CODE_39 = 1 << 3, + DecoderFormat_CODE_93 = 1 << 4, + DecoderFormat_CODE_128 = 1 << 5, + DecoderFormat_DATA_MATRIX = 1 << 6, + DecoderFormat_EAN_8 = 1 << 7, + DecoderFormat_EAN_13 = 1 << 8, + DecoderFormat_ITF = 1 << 9, + DecoderFormat_MAXICODE = 1 << 10, + DecoderFormat_PDF_417 = 1 << 11, + DecoderFormat_QR_CODE = 1 << 12, + DecoderFormat_RSS_14 = 1 << 13, + DecoderFormat_RSS_EXPANDED = 1 << 14, + DecoderFormat_UPC_A = 1 << 15, + DecoderFormat_UPC_E = 1 << 16, + DecoderFormat_UPC_EAN_EXTENSION = 1 << 17 + } ; typedef unsigned int DecoderFormatType; -public: QZXing(QObject *parent = NULL); - /** - * Set the enabled decoders. - * As argument it is possible to pass conjuction of decoders by using logic OR. - * e.x. setDecoder ( DecoderFormat_QR_CODE | DecoderFormat_EAN_13 | DecoderFormat_CODE_39 ) - */ - void setDecoder(DecoderFormatType hint); + QZXing(DecoderFormat decodeHints, QObject *parent = NULL); #if QT_VERSION >= 0x040700 static void registerQMLTypes() { - qmlRegisterType("QZXing", 1, 2, "QZXing"); + qmlRegisterType("QZXing", 2, 2, "QZXing"); } #endif public slots: /** * The decoding function. Will try to decode the given image based on the enabled decoders. + * If the image width is larger than maxWidth or image height is larger + * than maxHeight then the image will be scaled down. Either way, in case of scaling, the aspect + * ratio of the image will be kept. * + * The smoothTransformation flag determines whether the transformation will be smooth or fast. + * Smooth transformation provides better results but fast transformation is...faster. */ - QString decodeImage(QImage image); + QString decodeImage(QImage image, int maxWidth=-1, int maxHeight=-1, bool smoothTransformation = false); + + /** + * The decoding function. Will try to decode the given image based on the enabled decoders. + * The input image is read from a local image file. + */ + QString decodeImageFromFile(QString imageFilePath, int maxWidth=-1, int maxHeight=-1, bool smoothTransformation = false); /** * The decoding function accessible from QML @@ -74,15 +97,41 @@ public slots: const double offsetX = 0 , const double offsetY = 0, const double width = 0, const double height = 0); + /** + * Get the prossecing time in millisecond of the last decode operation. + * Added mainly as a statistic measure. + * Decoding operation fails, the processing time equals to -1. + */ + int getProcessTimeOfLastDecoding(); + + /** + * Get the decoders that are enabled at the moment. + * Returns a uint which is a bitwise OR of DecoderFormat enumeration values. + */ + uint getEnabledFormats() const; + /** + * Set the enabled decoders. + * As argument it is possible to pass conjuction of decoders by using logic OR. + * e.x. setDecoder ( DecoderFormat_QR_CODE | DecoderFormat_EAN_13 | DecoderFormat_CODE_39 ) + */ + void setDecoder(const uint& hint); + signals: void decodingStarted(); void decodingFinished(bool succeeded); void tagFound(QString tag); + void enabledFormatsChanged(); private: void* decoder; - DecoderFormatType supportedFormats; + DecoderFormatType enabledDecoders; QObject* imageHandler; + int processingTime; + + /** + * If true, the decoding operation will take place at a different thread. + */ + bool isThreaded; }; #endif // QZXING_H diff --git a/binary/Qt_4.7.4_Desktop_Mingw/QZXing1.dll b/binary/Qt_4.7.4_Desktop_Mingw/QZXing1.dll deleted file mode 100644 index 0c9afcf..0000000 Binary files a/binary/Qt_4.7.4_Desktop_Mingw/QZXing1.dll and /dev/null differ diff --git a/binary/Qt_4.7.4_Desktop_Mingw/QZXing2.dll b/binary/Qt_4.7.4_Desktop_Mingw/QZXing2.dll new file mode 100644 index 0000000..5bd9ac1 Binary files /dev/null and b/binary/Qt_4.7.4_Desktop_Mingw/QZXing2.dll differ diff --git a/binary/Qt_4.7.4_Desktop_Mingw/QZXing_global.h b/binary/Qt_4.7.4_Desktop_Mingw/QZXing_global.h index 617e77b..02ccf12 100644 --- a/binary/Qt_4.7.4_Desktop_Mingw/QZXing_global.h +++ b/binary/Qt_4.7.4_Desktop_Mingw/QZXing_global.h @@ -1,7 +1,8 @@ #ifndef QZXING_GLOBAL_H #define QZXING_GLOBAL_H -#include +#include +#include #if defined(QZXING_LIBRARY) # define QZXINGSHARED_EXPORT Q_DECL_EXPORT @@ -9,4 +10,4 @@ # define QZXINGSHARED_EXPORT Q_DECL_IMPORT #endif -#endif // QZXING_GLOBAL_H +#endif //QZXING_GLOBAL_H diff --git a/binary/Qt_4.7.4_Desktop_Mingw/libQZXing1.a b/binary/Qt_4.7.4_Desktop_Mingw/libQZXing1.a deleted file mode 100644 index 9caf32a..0000000 Binary files a/binary/Qt_4.7.4_Desktop_Mingw/libQZXing1.a and /dev/null differ diff --git a/binary/Qt_4.7.4_Desktop_Mingw/libQZXing2.a b/binary/Qt_4.7.4_Desktop_Mingw/libQZXing2.a new file mode 100644 index 0000000..b88cfa4 Binary files /dev/null and b/binary/Qt_4.7.4_Desktop_Mingw/libQZXing2.a differ diff --git a/binary/Qt_4_7_4_Desktop_MSCV/QZXing.h b/binary/Qt_4_7_4_Desktop_MSCV/QZXing.h new file mode 100644 index 0000000..6b17035 --- /dev/null +++ b/binary/Qt_4_7_4_Desktop_MSCV/QZXing.h @@ -0,0 +1,138 @@ +#ifndef QZXING_H +#define QZXING_H + +#include "QZXing_global.h" +#include +#include + +#if QT_VERSION >= 0x040700 +#include +#endif + +/** + * A class containing a very very small subset of the ZXing library. + * Created for ease of use. + * + * Anyone interested in using more technical stuff + * from the ZXing library is welcomed to add/edit on free will. + * + * Regarding DecoderFormat, by default all of those are enabled (except DataMatrix will is still not supported) + */ +class +#ifndef DISABLE_LIBRARY_FEATURES + QZXINGSHARED_EXPORT +#endif + QZXing : public QObject{ + + Q_OBJECT + Q_ENUMS(DecoderFormat) + Q_PROPERTY(int processingTime READ getProcessTimeOfLastDecoding) + Q_PROPERTY(uint enabledDecoders READ getEnabledFormats WRITE setDecoder NOTIFY enabledFormatsChanged) + +public: + /* + * + */ + enum DecoderFormat { + DecoderFormat_None = 0, + DecoderFormat_Aztec = 1 << 1, + DecoderFormat_CODABAR = 1 << 2, + DecoderFormat_CODE_39 = 1 << 3, + DecoderFormat_CODE_93 = 1 << 4, + DecoderFormat_CODE_128 = 1 << 5, + DecoderFormat_DATA_MATRIX = 1 << 6, + DecoderFormat_EAN_8 = 1 << 7, + DecoderFormat_EAN_13 = 1 << 8, + DecoderFormat_ITF = 1 << 9, + DecoderFormat_MAXICODE = 1 << 10, + DecoderFormat_PDF_417 = 1 << 11, + DecoderFormat_QR_CODE = 1 << 12, + DecoderFormat_RSS_14 = 1 << 13, + DecoderFormat_RSS_EXPANDED = 1 << 14, + DecoderFormat_UPC_A = 1 << 15, + DecoderFormat_UPC_E = 1 << 16, + DecoderFormat_UPC_EAN_EXTENSION = 1 << 17 + } ; + typedef unsigned int DecoderFormatType; + + QZXing(QObject *parent = NULL); + + QZXing(DecoderFormat decodeHints, QObject *parent = NULL); + +#if QT_VERSION >= 0x040700 + static void registerQMLTypes() + { + qmlRegisterType("QZXing", 2, 2, "QZXing"); + } +#endif + +public slots: + /** + * The decoding function. Will try to decode the given image based on the enabled decoders. + * If the image width is larger than maxWidth or image height is larger + * than maxHeight then the image will be scaled down. Either way, in case of scaling, the aspect + * ratio of the image will be kept. + * + * The smoothTransformation flag determines whether the transformation will be smooth or fast. + * Smooth transformation provides better results but fast transformation is...faster. + */ + QString decodeImage(QImage image, int maxWidth=-1, int maxHeight=-1, bool smoothTransformation = false); + + /** + * The decoding function. Will try to decode the given image based on the enabled decoders. + * The input image is read from a local image file. + */ + QString decodeImageFromFile(QString imageFilePath, int maxWidth=-1, int maxHeight=-1, bool smoothTransformation = false); + + /** + * The decoding function accessible from QML + */ + QString decodeImageQML(QObject *item); + + /** + * The decoding function accessible from QML. Able to set the decoding + * of a portion of the image. + */ + QString decodeSubImageQML(QObject* item, + const double offsetX = 0 , const double offsetY = 0, + const double width = 0, const double height = 0); + + /** + * Get the prossecing time in millisecond of the last decode operation. + * Added mainly as a statistic measure. + * Decoding operation fails, the processing time equals to -1. + */ + int getProcessTimeOfLastDecoding(); + + /** + * Get the decoders that are enabled at the moment. + * Returns a uint which is a bitwise OR of DecoderFormat enumeration values. + */ + uint getEnabledFormats() const; + /** + * Set the enabled decoders. + * As argument it is possible to pass conjuction of decoders by using logic OR. + * e.x. setDecoder ( DecoderFormat_QR_CODE | DecoderFormat_EAN_13 | DecoderFormat_CODE_39 ) + */ + void setDecoder(const uint& hint); + +signals: + void decodingStarted(); + void decodingFinished(bool succeeded); + void tagFound(QString tag); + void enabledFormatsChanged(); + +private: + void* decoder; + DecoderFormatType enabledDecoders; + QObject* imageHandler; + int processingTime; + + /** + * If true, the decoding operation will take place at a different thread. + */ + bool isThreaded; +}; + +#endif // QZXING_H + diff --git a/binary/Qt_4_7_4_Desktop_MSCV/QZXing2.dll b/binary/Qt_4_7_4_Desktop_MSCV/QZXing2.dll new file mode 100644 index 0000000..9455688 Binary files /dev/null and b/binary/Qt_4_7_4_Desktop_MSCV/QZXing2.dll differ diff --git a/binary/Qt_4_7_4_Desktop_MSCV/QZXing2.lib b/binary/Qt_4_7_4_Desktop_MSCV/QZXing2.lib new file mode 100644 index 0000000..ebe2a75 Binary files /dev/null and b/binary/Qt_4_7_4_Desktop_MSCV/QZXing2.lib differ diff --git a/binary/Qt_4.6.3_Symbian^1/include/QZXing_global.h b/binary/Qt_4_7_4_Desktop_MSCV/QZXing_global.h similarity index 73% rename from binary/Qt_4.6.3_Symbian^1/include/QZXing_global.h rename to binary/Qt_4_7_4_Desktop_MSCV/QZXing_global.h index 617e77b..02ccf12 100644 --- a/binary/Qt_4.6.3_Symbian^1/include/QZXing_global.h +++ b/binary/Qt_4_7_4_Desktop_MSCV/QZXing_global.h @@ -1,7 +1,8 @@ #ifndef QZXING_GLOBAL_H #define QZXING_GLOBAL_H -#include +#include +#include #if defined(QZXING_LIBRARY) # define QZXINGSHARED_EXPORT Q_DECL_EXPORT @@ -9,4 +10,4 @@ # define QZXINGSHARED_EXPORT Q_DECL_IMPORT #endif -#endif // QZXING_GLOBAL_H +#endif //QZXING_GLOBAL_H diff --git a/source/QZXing.pri b/source/QZXing.pri index 3594940..158c35e 100644 --- a/source/QZXing.pri +++ b/source/QZXing.pri @@ -250,7 +250,7 @@ unix:!symbian { } DEFINES += NOFMAXL - INSTALLS += target + INSTALLS q+= target } win32-msvc*{ diff --git a/source/eabi/QZXingu.def b/source/eabi/QZXingu.def new file mode 100644 index 0000000..41e6b6b --- /dev/null +++ b/source/eabi/QZXingu.def @@ -0,0 +1,128 @@ +EXPORTS + _ZN6QZXing10setDecoderERKj @ 1 NONAME + _ZN6QZXing11decodeImageE6QImageiib @ 2 NONAME + _ZN6QZXing11qt_metacallEN11QMetaObject4CallEiPPv @ 3 NONAME + _ZN6QZXing11qt_metacastEPKc @ 4 NONAME + _ZN6QZXing14decodeImageQMLEP7QObject @ 5 NONAME + _ZN6QZXing15decodingStartedEv @ 6 NONAME + _ZN6QZXing16decodingFinishedEb @ 7 NONAME + _ZN6QZXing16staticMetaObjectE @ 8 NONAME DATA 16 + _ZN6QZXing17decodeSubImageQMLEP7QObjectdddd @ 9 NONAME + _ZN6QZXing19decodeImageFromFileE7QStringiib @ 10 NONAME + _ZN6QZXing19getStaticMetaObjectEv @ 11 NONAME + _ZN6QZXing21enabledFormatsChangedEv @ 12 NONAME + _ZN6QZXing28getProcessTimeOfLastDecodingEv @ 13 NONAME + _ZN6QZXing8tagFoundE7QString @ 14 NONAME + _ZN6QZXingC1ENS_13DecoderFormatEP7QObject @ 15 NONAME + _ZN6QZXingC1EP7QObject @ 16 NONAME + _ZN6QZXingC2ENS_13DecoderFormatEP7QObject @ 17 NONAME + _ZN6QZXingC2EP7QObject @ 18 NONAME + _ZNK6QZXing10metaObjectEv @ 19 NONAME + _ZNK6QZXing17getEnabledFormatsEv @ 20 NONAME + _ZTI12ImageHandler @ 21 NONAME + _ZTI18CameraImageWrapper @ 22 NONAME + _ZTI6QZXing @ 23 NONAME + _ZTIN5zxing10datamatrix16DataMatrixReaderE @ 24 NONAME + _ZTIN5zxing10datamatrix17DetectorExceptionE @ 25 NONAME + _ZTIN5zxing10datamatrix7VersionE @ 26 NONAME + _ZTIN5zxing10datamatrix8DetectorE @ 27 NONAME + _ZTIN5zxing11ResultPointE @ 28 NONAME + _ZTIN5zxing12BinaryBitmapE @ 29 NONAME + _ZTIN5zxing15FormatExceptionE @ 30 NONAME + _ZTIN5zxing15HybridBinarizerE @ 31 NONAME + _ZTIN5zxing15LuminanceSourceE @ 32 NONAME + _ZTIN5zxing17ChecksumExceptionE @ 33 NONAME + _ZTIN5zxing17MultiFormatReaderE @ 34 NONAME + _ZTIN5zxing19ResultPointCallbackE @ 35 NONAME + _ZTIN5zxing20ReedSolomonExceptionE @ 36 NONAME + _ZTIN5zxing23InvertedLuminanceSourceE @ 37 NONAME + _ZTIN5zxing24GlobalHistogramBinarizerE @ 38 NONAME + _ZTIN5zxing24GreyscaleLuminanceSourceE @ 39 NONAME + _ZTIN5zxing24IllegalArgumentExceptionE @ 40 NONAME + _ZTIN5zxing31GreyscaleRotatedLuminanceSourceE @ 41 NONAME + _ZTIN5zxing4oned10EAN8ReaderE @ 42 NONAME + _ZTIN5zxing4oned10OneDReaderE @ 43 NONAME + _ZTIN5zxing4oned10UPCAReaderE @ 44 NONAME + _ZTIN5zxing4oned10UPCEReaderE @ 45 NONAME + _ZTIN5zxing4oned11EAN13ReaderE @ 46 NONAME + _ZTIN5zxing4oned12Code39ReaderE @ 47 NONAME + _ZTIN5zxing4oned12Code93ReaderE @ 48 NONAME + _ZTIN5zxing4oned12UPCEANReaderE @ 49 NONAME + _ZTIN5zxing4oned13CodaBarReaderE @ 50 NONAME + _ZTIN5zxing4oned13Code128ReaderE @ 51 NONAME + _ZTIN5zxing4oned21MultiFormatOneDReaderE @ 52 NONAME + _ZTIN5zxing4oned23MultiFormatUPCEANReaderE @ 53 NONAME + _ZTIN5zxing4oned9ITFReaderE @ 54 NONAME + _ZTIN5zxing5aztec11AztecReaderE @ 55 NONAME + _ZTIN5zxing5multi13MultiDetectorE @ 56 NONAME + _ZTIN5zxing5multi16ByQuadrantReaderE @ 57 NONAME + _ZTIN5zxing5multi17QRCodeMultiReaderE @ 58 NONAME + _ZTIN5zxing5multi21MultipleBarcodeReaderE @ 59 NONAME + _ZTIN5zxing5multi24MultiFinderPatternFinderE @ 60 NONAME + _ZTIN5zxing5multi28GenericMultipleBarcodeReaderE @ 61 NONAME + _ZTIN5zxing6ReaderE @ 62 NONAME + _ZTIN5zxing6ResultE @ 63 NONAME + _ZTIN5zxing6pdf41712PDF417ReaderE @ 64 NONAME + _ZTIN5zxing6pdf4177decoder2ec11ModulusPolyE @ 65 NONAME + _ZTIN5zxing6qrcode12QRCodeReaderE @ 66 NONAME + _ZTIN5zxing6qrcode22AlignmentPatternFinderE @ 67 NONAME + _ZTIN5zxing6qrcode7VersionE @ 68 NONAME + _ZTIN5zxing6qrcode8DataMaskE @ 69 NONAME + _ZTIN5zxing6qrcode8DetectorE @ 70 NONAME + _ZTIN5zxing8BitArrayE @ 71 NONAME + _ZTIN5zxing9BinarizerE @ 72 NONAME + _ZTIN5zxing9BitMatrixE @ 73 NONAME + _ZTV12ImageHandler @ 74 NONAME + _ZTV18CameraImageWrapper @ 75 NONAME + _ZTV6QZXing @ 76 NONAME + _ZTVN5zxing10datamatrix16DataMatrixReaderE @ 77 NONAME + _ZTVN5zxing10datamatrix17DetectorExceptionE @ 78 NONAME + _ZTVN5zxing10datamatrix7VersionE @ 79 NONAME + _ZTVN5zxing10datamatrix8DetectorE @ 80 NONAME + _ZTVN5zxing11ResultPointE @ 81 NONAME + _ZTVN5zxing12BinaryBitmapE @ 82 NONAME + _ZTVN5zxing15FormatExceptionE @ 83 NONAME + _ZTVN5zxing15HybridBinarizerE @ 84 NONAME + _ZTVN5zxing15LuminanceSourceE @ 85 NONAME + _ZTVN5zxing17ChecksumExceptionE @ 86 NONAME + _ZTVN5zxing17MultiFormatReaderE @ 87 NONAME + _ZTVN5zxing19ResultPointCallbackE @ 88 NONAME + _ZTVN5zxing20ReedSolomonExceptionE @ 89 NONAME + _ZTVN5zxing23InvertedLuminanceSourceE @ 90 NONAME + _ZTVN5zxing24GlobalHistogramBinarizerE @ 91 NONAME + _ZTVN5zxing24GreyscaleLuminanceSourceE @ 92 NONAME + _ZTVN5zxing24IllegalArgumentExceptionE @ 93 NONAME + _ZTVN5zxing31GreyscaleRotatedLuminanceSourceE @ 94 NONAME + _ZTVN5zxing4oned10EAN8ReaderE @ 95 NONAME + _ZTVN5zxing4oned10OneDReaderE @ 96 NONAME + _ZTVN5zxing4oned10UPCAReaderE @ 97 NONAME + _ZTVN5zxing4oned10UPCEReaderE @ 98 NONAME + _ZTVN5zxing4oned11EAN13ReaderE @ 99 NONAME + _ZTVN5zxing4oned12Code39ReaderE @ 100 NONAME + _ZTVN5zxing4oned12Code93ReaderE @ 101 NONAME + _ZTVN5zxing4oned12UPCEANReaderE @ 102 NONAME + _ZTVN5zxing4oned13CodaBarReaderE @ 103 NONAME + _ZTVN5zxing4oned13Code128ReaderE @ 104 NONAME + _ZTVN5zxing4oned21MultiFormatOneDReaderE @ 105 NONAME + _ZTVN5zxing4oned23MultiFormatUPCEANReaderE @ 106 NONAME + _ZTVN5zxing4oned9ITFReaderE @ 107 NONAME + _ZTVN5zxing5aztec11AztecReaderE @ 108 NONAME + _ZTVN5zxing5multi13MultiDetectorE @ 109 NONAME + _ZTVN5zxing5multi16ByQuadrantReaderE @ 110 NONAME + _ZTVN5zxing5multi17QRCodeMultiReaderE @ 111 NONAME + _ZTVN5zxing5multi21MultipleBarcodeReaderE @ 112 NONAME + _ZTVN5zxing5multi24MultiFinderPatternFinderE @ 113 NONAME + _ZTVN5zxing5multi28GenericMultipleBarcodeReaderE @ 114 NONAME + _ZTVN5zxing6ReaderE @ 115 NONAME + _ZTVN5zxing6ResultE @ 116 NONAME + _ZTVN5zxing6pdf41712PDF417ReaderE @ 117 NONAME + _ZTVN5zxing6pdf4177decoder2ec11ModulusPolyE @ 118 NONAME + _ZTVN5zxing6qrcode12QRCodeReaderE @ 119 NONAME + _ZTVN5zxing6qrcode22AlignmentPatternFinderE @ 120 NONAME + _ZTVN5zxing6qrcode7VersionE @ 121 NONAME + _ZTVN5zxing6qrcode8DataMaskE @ 122 NONAME + _ZTVN5zxing6qrcode8DetectorE @ 123 NONAME + _ZTVN5zxing8BitArrayE @ 124 NONAME + _ZTVN5zxing9BinarizerE @ 125 NONAME + _ZTVN5zxing9BitMatrixE @ 126 NONAME +