KItinerary::Uic9183TicketLayout

Search for usage in LXR

KItinerary::Uic9183TicketLayout Class Reference

#include <uic9183ticketlayout.h>

Properties

KItinerary::Uic9183TicketLayoutField firstField
 
QSize size
 
QString type
 

Public Member Functions

 Uic9183TicketLayout (const Uic9183Block &block)
 
 Uic9183TicketLayout (const Uic9183TicketLayout &)
 
std::vector< Uic9183TicketLayoutFieldcontainedFields (int row, int column, int width, int height) const
 
std::vector< Uic9183TicketLayoutFieldfields (int row, int column, int width, int height) const
 
Uic9183TicketLayoutField firstField () const
 
bool isValid () const
 
Uic9183TicketLayoutoperator= (const Uic9183TicketLayout &)
 
QSize size () const
 
Q_INVOKABLE QString text (int row, int column, int width, int height) const
 
QString type () const
 

Static Public Attributes

static constexpr const char RecordId [] = "U_TLAY"
 

Detailed Description

Parser for a U_TLAY block in a UIC 918-3 ticket container, such as a ERA TLB ticket.

See also
ERA TAP TSI TD B.12 Digital Security Elements For Rail Passenger Ticketing - ยง10 TLB - Ticket Layout Barcode

Definition at line 63 of file uic9183ticketlayout.h.

Property Documentation

◆ firstField

KItinerary::Uic9183TicketLayoutField KItinerary::Uic9183TicketLayout::firstField
read

Definition at line 69 of file uic9183ticketlayout.h.

◆ size

QSize KItinerary::Uic9183TicketLayout::size
read

Definition at line 68 of file uic9183ticketlayout.h.

◆ type

QString KItinerary::Uic9183TicketLayout::type
read

Ticket type (e.g.

RCT2).

Definition at line 67 of file uic9183ticketlayout.h.

Constructor & Destructor Documentation

◆ Uic9183TicketLayout() [1/2]

Uic9183TicketLayout::Uic9183TicketLayout ( )

Definition at line 106 of file uic9183ticketlayout.cpp.

◆ Uic9183TicketLayout() [2/2]

Uic9183TicketLayout::Uic9183TicketLayout ( const Uic9183Block & block)

Parse U_TLAY ticket layout block in data.

It's the callers responsibility to ensure data outlives this instance, the data is not copied.

Parameters
blockA UIC 918.3 U_TLAY data block

Definition at line 111 of file uic9183ticketlayout.cpp.

Member Function Documentation

◆ containedFields()

std::vector< Uic9183TicketLayoutField > Uic9183TicketLayout::containedFields ( int row,
int column,
int width,
int height ) const

All fields contained in the given area.

Definition at line 219 of file uic9183ticketlayout.cpp.

◆ fields()

std::vector< Uic9183TicketLayoutField > Uic9183TicketLayout::fields ( int row,
int column,
int width,
int height ) const

All fields covering the given area.

Definition at line 201 of file uic9183ticketlayout.cpp.

◆ firstField()

Uic9183TicketLayoutField Uic9183TicketLayout::firstField ( ) const

Low-level field iteration access.

Prefer text() over this to avoid doing your own text layout assembly.

Definition at line 92 of file uic9183ticketlayout.cpp.

◆ isValid()

bool Uic9183TicketLayout::isValid ( ) const

Returns whether this is a valid U_TLAY layout block.

Definition at line 139 of file uic9183ticketlayout.cpp.

◆ size()

QSize Uic9183TicketLayout::size ( ) const

The size of the layout, as width and height in layout coordinates.

Definition at line 190 of file uic9183ticketlayout.cpp.

◆ text()

QString Uic9183TicketLayout::text ( int row,
int column,
int width,
int height ) const

Returns the text in the given coordinates.

Note
row and column are 0-based unlike the U_TLAY spec, which is 1-based!

Definition at line 144 of file uic9183ticketlayout.cpp.

◆ type()

QString Uic9183TicketLayout::type ( ) const

Type of the ticket layout.

Definition at line 134 of file uic9183ticketlayout.cpp.

Member Data Documentation

◆ RecordId

const char KItinerary::Uic9183TicketLayout::RecordId[] = "U_TLAY"
staticconstexpr

Definition at line 106 of file uic9183ticketlayout.h.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 11 2024 12:14:43 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.