The saving code has been refactored into one class per format with common methods for each part of the saving process. This should make it easier to add further formats, and inheriting a format class can allow implementing a different format that is largely based on an existing format. The loading code is also in one class per format but is largely the same as what it was before. Both classes have the ability to warn the user if any issues or errors are or will be encountered when loading or saving. TTI files are now written with CR/LF line endings on all platforms as a result of using binary file writing for all formats, previously Linux builds would save TTI files with just LF line endings. TTI files are still loaded with readLine() and trimmed() which can cope with either type of line ending. Experimental support for loading and exporting EP1 and HMS SD-Teletext htt formats has been added. The htt format inherits from the t42 format as the format appears to be largely the same except for the bits being reversed within each byte and the clock run-in and framing code added before each packet.
33 lines
1003 B
C
33 lines
1003 B
C
/*
|
|
* Copyright (C) 2020-2025 Gavin MacGregor
|
|
*
|
|
* This file is part of QTeletextMaker.
|
|
*
|
|
* QTeletextMaker is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* QTeletextMaker is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with QTeletextMaker. If not, see <https://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef HASHFORMATS_H
|
|
#define HASHFORMATS_H
|
|
|
|
#include <QByteArray>
|
|
#include <QString>
|
|
|
|
#include "levelonepage.h"
|
|
#include "pagebase.h"
|
|
|
|
QString exportHashStringPage(LevelOnePage *subPage);
|
|
QString exportHashStringPackets(LevelOnePage *subPage);
|
|
|
|
#endif
|