From 4156f88b1b5f42bea69d4486220a5024113ae014 Mon Sep 17 00:00:00 2001 From: Nikolaos Ftylitakis Date: Mon, 12 Feb 2018 21:19:03 +0200 Subject: [PATCH] Visual enhancements on the paragraph referrers --- README.md | 68 ++++++++++++++++++++++++++++++++----------------------- 1 file changed, 40 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index bd79bb4..526714b 100644 --- a/README.md +++ b/README.md @@ -25,68 +25,75 @@ Supports barcode decoding for the following types: 1. [How to include](#howToInclude) 1. [Embed the source code](#embedInSourceCode) 1. [Compile the project as an external library](#externalLibrary) - 1. [Control dependencies](#controlDependencies) - 1. [QZXing (core)](#controlDependenciesCore) - 1. [QZXing (core + QML)](#controlDependenciesCoreQML) - 1. [QZXing + QZXingFilter](#controlDependenciesCoreQMLQZXingFilter) + 1. [Control dependencies](#controlDependencies) + 1. [QZXing (core)](#controlDependenciesCore) + 1. [QZXing (core + QML)](#controlDependenciesCoreQML) + 1. [QZXing + QZXingFilter](#controlDependenciesCoreQMLQZXingFilter) 1. [How to use](#howTo) 1. [Decoding operation](#howToDecoding) - 1. [C++/Qt](#howToDecodingCPP) - 1. [Qt Quick](#howToDecodingQtQuick) - 1. [Encoding operation](#howToEncoding) - 1. [C++/Qt](#howToEncodingCPP) - 1. [Qt Quick](#howToEncodingQtQuick) + 1. [C++/Qt](#howToDecodingCPP) + 1. [Qt Quick](#howToDecodingQtQuick) + 1. [Encoding operation](#howToEncoding) + 1. [C++/Qt](#howToEncodingCPP) + 1. [Qt Quick](#howToEncodingQtQuick) 1. [Contact](#contact) -# How to include + +# How to include The project can be used in two ways: -## Embed the source code. + +## Embed the source code. Copy source code folder of QZXing to the root of your project. Add the following line to your .pro file. For more information see [here](https://github.com/ftylitak/qzxing/wiki/Using-the-QZXing-through-the-source-code). ```qmake include(QZXing/QZXing.pri) ``` - -## Compile the project as an external library + +## Compile the project as an external library Open QZXing project (QZXing.pro) and compile. If it is needed to compile as static library, uncomment the following line in the .pro file. ```qmake CONFIG += staticlib ``` - -## Control dependencies + +## Control dependencies Project file config tags are now introduced to be able to control the dependencies of the library accoring to the needs. The core part requires only "core" and "gui" Qt modules. Though for backward compatibility "quick" Qt module is also required. The 3 level of dependencies are: -### QZXing (core) + +### QZXing (core) By including QZXing.pri or by building QZXing.pro you get the core functionality of QZXing which requires only QtCore and QtGui (because of QImage). Warning! The initial default configuration till 20/03/2017 was including qzxing_qml. This tag could not be removed once added, so it was needed to be removed from the defaults. -### QZXing (core + QML) + +### QZXing (core + QML) If an application is going to use QML functionality, it is now possible to add the dependency to it. This can be done by adding the folloing line to the .pro file of its project: ```qmake CONFIG += qzxing_qml ``` - -### QZXing + QZXingFilter + + +### QZXing + QZXingFilter QZXing includes QZXingFilter, a QAbstractVideoFilter implementation to provide a mean of providing live feed to the decoding library. It automatically includes QML implementation as well. This option requires "multimedia" Qt module this is why it is considered as a separate configuration. It can be used by adding the folloing line to the .pro file of a project: ```qmake CONFIG += qzxing_multimedia ``` - -# How to use + +# How to use Follows simple code snippets that brefly show the use of the library. For more details advise the examples included in the repository and the [wiki](https://github.com/ftylitak/qzxing/wiki). -## Decoding operation + +## Decoding operation -### C++/Qt + +### C++/Qt ```cpp #include @@ -100,7 +107,8 @@ int main() } ``` -### Qt Quick + +### Qt Quick First register QZXing type to the QML engine. @@ -142,9 +150,11 @@ QZXing{ } ``` -## Encoding operation + +## Encoding operation -### C++/Qt + +### C++/Qt The encoding function has been written as static as it does not have any dependencies to data other than the ones provided by the arguments. @@ -167,7 +177,8 @@ QImage barcode = QZXing::encodeData(data, QZXing::EncoderFormat_QR_CODE, QSize(width.toInt(), height.toInt()), QZXing::EncodeErrorCorrectionLevel_H); ``` -### Qt Quick + +### Qt Quick The encoding function can be easily used in QML through QZXing's Image Provider: "image://QZXing/encode/". As with the C++ example, it can either be used with the default settings or with custom settings. @@ -211,5 +222,6 @@ Image{ } ``` -# Contact + +# Contact In case of bug reports or feature requests feel free to open an [issue](https://github.com/ftylitak/qzxing/issues).