NMA4.BarCode

g GObject.Object GObject.Object NMA4.BarCode NMA4.BarCode GObject.Object->NMA4.BarCode

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (text)

draw (cr)

get_size ()

set_text (text)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

size

int

r

text

str

w

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class NMA4.BarCode(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

NMA4.BarCodeClass

classmethod new(text)
Parameters:

text (str) – set the bar code text

Returns:

the bar code instance

Return type:

NMA4.BarCode

New in version 1.8.22.

draw(cr)
Parameters:

cr (cairo.Context) – cairo context

Draws the QR code onto the given context.

New in version 1.8.22.

get_size()
Returns:

the side of a QR code square.

Return type:

int

New in version 1.8.22.

set_text(text)
Parameters:

text (str) – new bar code text

Regenerates the QR code for a different text.

New in version 1.8.22.

Property Details

NMA4.BarCode.props.size
Name:

size

Type:

int

Default Value:

0

Flags:

READABLE

NMA4.BarCode.props.text
Name:

text

Type:

str

Default Value:

''

Flags:

WRITABLE