Commit 32b24604 authored by Volker Krause's avatar Volker Krause
Browse files

Make 0080BL UIC 918.3 order blocks JS-accessible

parent c23addb3
......@@ -11,6 +11,7 @@
#include <KItinerary/Uic9183Parser>
#include <KItinerary/Rct2Ticket>
#include <uic9183/uic9183head.h>
#include <uic9183/vendor0080block.h>
#include <KLocalizedString>
......@@ -20,6 +21,11 @@
using namespace KItinerary;
Uic9183DocumentProcessor::Uic9183DocumentProcessor()
{
qRegisterMetaType<KItinerary::Vendor0080BLOrderBlock>();
}
bool Uic9183DocumentProcessor::canHandleData(const QByteArray &encodedData, [[maybe_unused]] QStringView fileName) const
{
return Uic9183Parser::maybeUic9183(encodedData);
......
......@@ -14,6 +14,7 @@ namespace KItinerary {
class Uic9183DocumentProcessor : public ExtractorDocumentProcessor
{
public:
explicit Uic9183DocumentProcessor();
bool canHandleData(const QByteArray &encodedData, QStringView fileName) const override;
ExtractorDocumentNode createNodeFromData(const QByteArray &encodedData) const override;
void expandNode(ExtractorDocumentNode &node, const ExtractorEngine *engine) const override;
......
......@@ -80,7 +80,7 @@ public:
int orderBlockCount() const;
/** Order block at index @p i. */
Vendor0080BLOrderBlock orderBlock(int i) const;
Q_INVOKABLE KItinerary::Vendor0080BLOrderBlock orderBlock(int i) const;
/** First S-block, for iterating. */
Vendor0080BLSubBlock firstBlock() const;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment