QREncodeParams Class Documentation

class QREncodeParams

Namespace:datalogics_interface

Detailed Description

Used to control how the QR code is created.

Constructor & Destructor Documentation

QREncodeParams

QREncodeParams(const std::string & text, double x, double y, double width, double height, QRErrorCorrectionLevel error_level, unsigned int quiet_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

QRColor get_background_color()

Returns:

QRColor

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

get_code_color

QRColor get_code_color()

Returns:

QRColor

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

get_height

double get_height()

Returns:

double

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

get_quiet_zone_size

unsigned int get_quiet_zone_size()

Returns:

unsigned int

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

get_text

std::string get_text()

Returns:

std::string

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

get_width

double get_width()

Returns:

double

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

get_x

double get_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

double get_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

void set_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

void set_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

void set_error_correction_level(QRErrorCorrectionLevel level)

Parameters

level: QRErrorCorrectionLevel

the error correction level of the QR code

Returns:

void

Set the error correction level of the QR code.

set_height

void set_height(double height)

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

void set_quiet_zone_size(unsigned int size)

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

void set_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

void set_width(double width)

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

void set_x(double x)

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

void set_y(double y)

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.