Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KItinerary
Commits
33d964b0
Commit
33d964b0
authored
May 08, 2021
by
Volker Krause
Browse files
Add raw data access for ERA SSB ticket objects
Needed to generate correct barcodes out of this again.
parent
8736d57e
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/lib/era/ssbticket.cpp
View file @
33d964b0
...
...
@@ -96,3 +96,8 @@ QDate SSBTicket::type1DepartureDay(const QDate& contextDate)
const
auto
d
=
issueDate
(
contextDate
);
return
d
.
addDays
(
type1DepartureDate
());
}
QByteArray
SSBTicket
::
rawData
()
const
{
return
m_data
;
}
src/lib/era/ssbticket.h
View file @
33d964b0
...
...
@@ -109,6 +109,8 @@ class KITINERARY_EXPORT SSBTicket {
};
Q_ENUM
(
TicketType
)
Q_PROPERTY
(
QByteArray
rawData
READ
rawData
)
public:
SSBTicket
();
explicit
SSBTicket
(
const
QByteArray
&
data
);
...
...
@@ -122,6 +124,9 @@ public:
/** Departure day for type 1 (IRT/RES/BOA) tickets. */
Q_INVOKABLE
QDate
type1DepartureDay
(
const
QDate
&
contextDate
=
QDate
::
currentDate
());
/** Raw barcode data. */
QByteArray
rawData
()
const
;
/** Returns @c true if @p data might be an ERA SSB ticket. */
static
bool
maybeSSB
(
const
QByteArray
&
data
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment