Port saving pages to packet handling framework

Any unhandled packets within pages are now loaded and saved intact
albeit with no way to edit them.

File handling is now two separate processes: parsing TTI files into
packets, and then interpreting the packets into how pages are
displayed. This will allow us to import other file formats, and to deal
with page functions other than Level 1 Teletext pages.
This commit is contained in:
G.K.MacGregor
2020-09-15 22:37:50 +01:00
parent c99525abd4
commit a1e0986e5c
4 changed files with 162 additions and 135 deletions

View File

@@ -35,18 +35,21 @@ public:
PageBase();
~PageBase();
QByteArray packet(int, int=0) const;
bool packetNeeded(int, int=0) const;
bool setPacket(int, QByteArray);
bool setPacket(int, int, QByteArray);
bool deletePacket(int, int=0);
PageFunctionEnum pageFunction() const { return m_pageFunction; }
bool setPageFunction(PageFunctionEnum);
PacketCodingEnum packetCoding(int=0, int=0) const;
bool setPacketCoding(PacketCodingEnum);
bool packetNeeded(int, int=0) const { return true; }
private:
PageFunctionEnum m_pageFunction;
PacketCodingEnum m_packetCoding;
QByteArray *m_packets[89]; // X/1 to X/25, plus 16 packets for X/26, another 16 for X/27, for X28 and for X/29
QByteArray *m_packets[90]; // X/0 to X/25, plus 16 packets for X/26, another 16 for X/27, for X28 and for X/29
};
#endif