Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
BC_QRCoder.h
Go to the documentation of this file.
1
// Copyright 2014 The PDFium Authors
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7
#
ifndef
FXBARCODE_QRCODE_BC_QRCODER_H_
8
#
define
FXBARCODE_QRCODE_BC_QRCODER_H_
9
10
#
include
<
memory
>
11
12
#
include
"core/fxcrt/unowned_ptr.h"
13
14
class
CBC_QRCoderErrorCorrectionLevel
;
15
class
CBC_CommonByteMatrix;
16
17
class
CBC_QRCoder
final
{
18
public
:
19
static
constexpr
int32_t
kNumMaskPatterns
= 8;
20
21
CBC_QRCoder
();
22
~
CBC_QRCoder
();
23
24
static
bool
IsValidMaskPattern
(int32_t maskPattern);
25
26
const
CBC_QRCoderErrorCorrectionLevel
*
GetECLevel
()
const
;
27
int32_t
GetVersion
()
const
;
28
int32_t
GetMatrixWidth
()
const
;
29
int32_t
GetMaskPattern
()
const
;
30
int32_t
GetNumTotalBytes
()
const
;
31
int32_t
GetNumDataBytes
()
const
;
32
int32_t
GetNumRSBlocks
()
const
;
33
std
::
unique_ptr
<
CBC_CommonByteMatrix
>
TakeMatrix
();
34
35
bool
IsValid
()
const
;
36
37
void
SetECLevel
(
const
CBC_QRCoderErrorCorrectionLevel
* ecLevel);
38
void
SetVersion
(int32_t version);
39
void
SetMatrixWidth
(int32_t width);
40
void
SetMaskPattern
(int32_t pattern);
41
void
SetNumDataBytes
(int32_t bytes);
42
void
SetNumTotalBytes
(int32_t value);
43
void
SetNumECBytes
(int32_t value);
44
void
SetNumRSBlocks
(int32_t block);
45
void
SetMatrix
(std::unique_ptr<CBC_CommonByteMatrix> pMatrix);
46
47
private
:
48
UnownedPtr
<
const
CBC_QRCoderErrorCorrectionLevel
> m_ecLevel;
49
int32_t m_version = -1;
50
int32_t m_matrixWidth = -1;
51
int32_t m_maskPattern = -1;
52
int32_t m_numTotalBytes = -1;
53
int32_t m_numDataBytes = -1;
54
int32_t m_numECBytes = -1;
55
int32_t m_numRSBlocks = -1;
56
std::unique_ptr<CBC_CommonByteMatrix> m_matrix;
57
};
58
59
#
endif
// FXBARCODE_QRCODE_BC_QRCODER_H_
CBC_QRCoderErrorCorrectionLevel
Definition
BC_QRCoderErrorCorrectionLevel.h:12
CBC_QRCoder::SetMatrixWidth
void SetMatrixWidth(int32_t width)
Definition
BC_QRCoder.cpp:85
CBC_QRCoder::GetNumRSBlocks
int32_t GetNumRSBlocks() const
Definition
BC_QRCoder.cpp:59
CBC_QRCoder::SetMatrix
void SetMatrix(std::unique_ptr< CBC_CommonByteMatrix > pMatrix)
Definition
BC_QRCoder.cpp:113
CBC_QRCoder::GetNumTotalBytes
int32_t GetNumTotalBytes() const
Definition
BC_QRCoder.cpp:51
CBC_QRCoder::SetNumECBytes
void SetNumECBytes(int32_t value)
Definition
BC_QRCoder.cpp:105
CBC_QRCoder::SetECLevel
void SetECLevel(const CBC_QRCoderErrorCorrectionLevel *ecLevel)
Definition
BC_QRCoder.cpp:77
CBC_QRCoder::SetNumRSBlocks
void SetNumRSBlocks(int32_t block)
Definition
BC_QRCoder.cpp:101
CBC_QRCoder::GetECLevel
const CBC_QRCoderErrorCorrectionLevel * GetECLevel() const
Definition
BC_QRCoder.cpp:35
CBC_QRCoder::GetMatrixWidth
int32_t GetMatrixWidth() const
Definition
BC_QRCoder.cpp:43
CBC_QRCoder::GetNumDataBytes
int32_t GetNumDataBytes() const
Definition
BC_QRCoder.cpp:55
CBC_QRCoder::kNumMaskPatterns
static constexpr int32_t kNumMaskPatterns
Definition
BC_QRCoder.h:19
CBC_QRCoder::SetMaskPattern
void SetMaskPattern(int32_t pattern)
Definition
BC_QRCoder.cpp:89
CBC_QRCoder::GetMaskPattern
int32_t GetMaskPattern() const
Definition
BC_QRCoder.cpp:47
CBC_QRCoder::SetNumDataBytes
void SetNumDataBytes(int32_t bytes)
Definition
BC_QRCoder.cpp:93
CBC_QRCoder::IsValid
bool IsValid() const
Definition
BC_QRCoder.cpp:67
CBC_QRCoder::SetNumTotalBytes
void SetNumTotalBytes(int32_t value)
Definition
BC_QRCoder.cpp:97
CBC_QRCoder::~CBC_QRCoder
~CBC_QRCoder()
CBC_QRCoder::IsValidMaskPattern
static bool IsValidMaskPattern(int32_t maskPattern)
Definition
BC_QRCoder.cpp:109
CBC_QRCoder::TakeMatrix
std::unique_ptr< CBC_CommonByteMatrix > TakeMatrix()
Definition
BC_QRCoder.cpp:63
CBC_QRCoder::CBC_QRCoder
CBC_QRCoder()
CBC_QRCoder::GetVersion
int32_t GetVersion() const
Definition
BC_QRCoder.cpp:39
CBC_QRCoder::SetVersion
void SetVersion(int32_t version)
Definition
BC_QRCoder.cpp:81
fxcrt::UnownedPtr
Definition
unowned_ptr.h:76
std
[33]
Definition
src_corelib_tools_qhash.cpp:421
qtwebengine
src
3rdparty
chromium
third_party
pdfium
fxbarcode
qrcode
BC_QRCoder.h
Generated on
for Qt by
1.18.0