QREncodeParams Class Documentation

classQREncodeParams

Namespace:datalogics_interface

Detailed Description

Used to control how the QR code is created.

Constructor & Destructor Documentation

QREncodeParams

QREncodeParams(const std::string &text, doublex, doubley, doublewidth, doubleheight, QRErrorCorrectionLevelerror_level, unsigned intquiet_zone_size, const QRColor &code_color, const QRColor &background_color)

Parameters

text: const std::string &

The text string to encode in the QR code.

x: double

The X coordinate of the lower-left corner of the QR code on the page, in user space units.

y: double

The Y coordinate of the lower-left corner of the QR code on the page, in user space units.

width: double

The width of the QR code, in user space units.

height: double

The height of the QR code, in user space units.

error_level: QRErrorCorrectionLevel

The error correction level for the QR code.

quiet_zone_size: unsigned int

The size of the quiet zone (margin) around the QR code, in modules.

code_color: const QRColor &

The color of the QR code modules (the dark elements).

background_color: const QRColor &

The color of the background behind the QR code modules.

Create a new QREncodeParams object using the specified values.

~QREncodeParams

~QREncodeParams()

Member Function Documentation

get_background_color

QRColorget_background_color()

Returns:

QRColor

Get the color of the background behind the QR code modules.

get_code_color

QRColorget_code_color()

Returns:

QRColor

Get the color of the QR code modules (the dark elements).

get_height

doubleget_height()

Returns:

double

Get the height of the QR code, in user space units.

get_quiet_zone_size

unsigned intget_quiet_zone_size()

Returns:

unsigned int

Get the quiet zone size (margin around the QR code), in modules.

get_text

std::stringget_text()

Returns:

std::string

Get the text string to be encoded in the QR code.

get_width

doubleget_width()

Returns:

double

Get the width of the QR code, in user space units.

get_x

doubleget_x()

Returns:

double

Get the X coordinate of the lower-left corner of the QR code on the page, in user space units.

get_y

doubleget_y()

Returns:

double

Get the Y coordinate of the lower-left corner of the QR code on the page, in user space units.

set_background_color

voidset_background_color(const QRColor &color)

Parameters

color: const QRColor &

the color of the background behind the QR code modules

Returns:

void

Set the color of the background behind the QR code modules.

set_code_color

voidset_code_color(const QRColor &color)

Parameters

color: const QRColor &

the color of the QR code modules (the dark elements)

Returns:

void

Set the color of the QR code modules (the dark elements).

set_error_correction_level

voidset_error_correction_level(QRErrorCorrectionLevellevel)

Parameters

level: QRErrorCorrectionLevel

the error correction level of the QR code

Returns:

void

Set the error correction level of the QR code.

set_height

voidset_height(doubleheight)

Parameters

height: double

the height of the QR code, in user space units

Returns:

void

Set the height of the QR code, in user space units.

set_quiet_zone_size

voidset_quiet_zone_size(unsigned intsize)

Parameters

size: unsigned int

the quiet zone size (margin around the QR code), in modules

Returns:

void

Set the quiet zone size (margin around the QR code), in modules.

set_text

voidset_text(const std::string &text)

Parameters

text: const std::string &

the text string to be encoded in the QR code

Returns:

void

Set the text string to be encoded in the QR code.

set_width

voidset_width(doublewidth)

Parameters

width: double

the width of the QR code, in user space units

Returns:

void

Set the width of the QR code, in user space units.

set_x

voidset_x(doublex)

Parameters

x: double

the X coordinate of the lower-left corner of the QR code on the page, in user space units

Returns:

void

Set the X coordinate of the lower-left corner of the QR code on the page, in user space units.

set_y

voidset_y(doubley)

Parameters

y: double

the Y coordinate of the lower-left corner of the QR code on the page, in user space units

Returns:

void

Set the Y coordinate of the lower-left corner of the QR code on the page, in user space units.