Commit Graph

318 Commits

Author SHA1 Message Date
Gavin MacGregor
9a17a3624f Change border from blue to GUI background colour 2025-10-05 21:48:11 +01:00
Gavin MacGregor
3a084e1561 Export region to zxnet editor 2025-09-11 21:14:39 +01:00
Gavin MacGregor
14ee3fb39a Avoid reserved values when creating G0 diacriticals 2025-08-31 21:53:00 +01:00
Gavin MacGregor
06ca1e13ae Rename a couple of DRCS widgets 2025-07-29 18:35:23 +01:00
Gavin MacGregor
5b250beedc Ensure DRCS mode doesn't affect past DRCS characters 2025-07-29 18:04:47 +01:00
Gavin MacGregor
ead6700002 Add transparency to exported images 2025-07-27 14:10:06 +01:00
Gavin MacGregor
4ef0b016aa Improve appearance of capital letters with diacriticals
Added reduced-height Latin G0 capital letters to the font to make room for
diacritical marks to sit on top.
2025-07-23 15:20:12 +01:00
Gavin MacGregor
d326748371 Add DCLUT editing 2025-07-20 15:32:13 +01:00
Gavin MacGregor
d8e0a2f3e2 Implement exporting subpage image to clipboard 2025-07-13 19:20:44 +01:00
Gavin MacGregor
dad86a80f4 Fix compiling with Qt 6.9 2025-06-29 13:46:22 +01:00
Gavin MacGregor
541654a7f7 Implement DRCS context menus 2025-06-19 16:10:41 +01:00
Gavin MacGregor
962d308b56 Avoid reserved values when creating DRCS Mode triplets 2025-06-19 11:56:36 +01:00
Gavin MacGregor
ebee613a22 Read DCLUTs from X/28/1
DCLUTs cannot be edited yet.
2025-06-18 12:28:00 +01:00
Gavin MacGregor
0fd581925a Uncolour mode 1-3 PTUs on monochrome rendering modes 2025-06-16 20:22:37 +01:00
Gavin MacGregor
7f0de4410b Do some checks for malformed tti files, wrt GH-10 2025-06-15 19:09:52 +01:00
Gavin MacGregor
e574526ca4 Workaround for DRCS menu sections on Windows 2025-06-10 12:45:53 +01:00
Gavin MacGregor
e1ba67484f Implement DRCS rendering
External pages with DRCS definitions can be loaded using the options in the
"DRCS pages" submenu within the "View" menu. Two DRCS pages can be loaded,
one for Global DRCS definitions and the other for Normal DRCS definitions.

Level 2.5 mode 0 PTUs are fully supported.

Partial support for Level 3.5 mode 1, 2 and 3 PTUs. DCLUTs defined in X/28/1
on the main page are not yet implemented; the characters currently appear in
the default DCLUTs described in D.1.6 and D.2.2 of the ETSI spec.
2025-06-09 18:57:16 +01:00
Gavin MacGregor
519c961cff Tweak flashing logic 2025-06-01 12:50:33 +01:00
Gavin MacGregor
07c6eed3fe Add getter for decoder level 2025-05-27 18:39:19 +01:00
Gavin MacGregor
8675cef6c5 Load files into QList of PageBase objects
A document is first loaded as a generic PageBase before being converted to
level one pages afterwards.

This is preparation for loading pages of other types such as DRCS and Public
Object Pages. The latter will need further work as the non-TTI file loaders
blindly assume X/1 to X/25 are 7-bit odd parity coded.

This also reverts 0a1c018 putting back the copy constructor that allows
a PageBase to be converted to a LevelOnePage.
2025-05-27 17:34:18 +01:00
Gavin MacGregor
42fd870749 Make setting NOS bits and Fastext links more agnostic
Uses generic setControlBit and setPacket instead of the Level One document
calls to set the NOS bits and FLOF links.
2025-05-25 22:01:42 +01:00
Gavin MacGregor
041a35a597 Move page function and packet coding 2025-05-25 14:42:03 +01:00
Gavin MacGregor
395f3769cb Separate metadata loading
"Metadata" is data which is stored in a teletext file format but is not part
of the page itself, such as DE description and CT cycle time in the TTI file
format.
2025-05-25 12:54:14 +01:00
Gavin MacGregor
3f93da8c1a Fix copy assignment 2025-04-02 19:05:22 +01:00
Gavin MacGregor
cc5219a16b Move document class 2025-04-02 14:44:30 +01:00
Gavin MacGregor
a1e2c743f3 Tag version 0.7.2-beta 0.7.2-beta 2025-03-30 12:19:40 +01:00
Gavin MacGregor
14568f9d93 Add a Level 3.5 example 2025-03-26 17:39:48 +00:00
Gavin MacGregor
e647b3e67a Decide to activate export option from loading class 2025-03-25 18:58:23 +00:00
Gavin MacGregor
8751783cb2 Port from std::vector to QList 2025-03-18 19:03:45 +00:00
Gavin MacGregor
4a15d9a206 Port from QVector to QList 2025-03-18 16:24:12 +00:00
Gavin MacGregor
0493f0e270 Allow header row editing 2025-03-18 14:48:03 +00:00
Gavin MacGregor
1d462f4355 Merge branch 'refactor/packets' 2025-03-09 11:57:25 +00:00
Gavin MacGregor
fc288e2a63 Rename "show control codes" to "control codes" 2025-03-05 18:50:05 +00:00
Gavin MacGregor
10059e5d0b Refuse to overwrite imported file with multiple subpages 2025-03-05 18:41:39 +00:00
Gavin MacGregor
564243822e Add RE command to TTI file handling 2025-03-02 23:01:33 +00:00
Gavin MacGregor
c9b797cff4 Refactor loading and saving code
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.
2025-03-02 21:56:11 +00:00
Gavin MacGregor
0901803186 Simplify storage of NOS control bits 2025-02-19 15:22:28 +00:00
Gavin MacGregor
923c5563d5 Store text in packets instead of array
This removes the character array from the LevelOnePage class and stores the
characters in packets 0 to 24 natively, adding a packet when a character is
first added to a row and removing a packet when a row becomes space
characters.
2025-02-13 22:55:11 +00:00
Gavin MacGregor
9427760631 Put back unhandled packet storage 2025-02-13 16:41:08 +00:00
Gavin MacGregor
0cc49e7ea5 Move from dynamically allocating arrays to fixed arrays
This should allow the page bass class to be copy constructed.
2025-02-12 21:49:56 +00:00
Gavin MacGregor
8bb05ed250 Use proper superclass 2025-02-11 21:29:58 +00:00
Gavin MacGregor
0a1c018a02 Remove unused and incorrect subclass copy constructor 2025-02-11 20:48:05 +00:00
Gavin MacGregor
4024efaf01 Rename packet variables
"y": packet number
"d": designation code
"t": triplet number

"packet" renamed to "pkt" in method parameters to avoid ambiguity with
the "packet" method.
2025-02-11 18:46:01 +00:00
Gavin MacGregor
42176f2fc0 Tag version 0.7.1-beta 0.7.1-beta 2025-02-11 10:20:34 +00:00
Gavin MacGregor
b937102139 Fix crash when copy constructing unhandled packets
Actually this is a workaround: it does not attempt to copy construct
unhandled packets, to avoid a bug in the base class where pointers were
copy constructed without copying the contents.

A proper fix will need refactoring of the packet storage code.
2025-02-11 09:43:36 +00:00
Gavin MacGregor
df1122f621 Fix clang compile warnings 2025-01-19 19:22:09 +00:00
Gavin MacGregor
6e4f1df285 Tag version 0.7-beta 0.7-beta 2025-01-12 19:19:54 +00:00
Gavin MacGregor
69eb891e7f Remove "ready" message on startup 2025-01-12 18:49:26 +00:00
Gavin MacGregor
21a9972ecb Default to minimal border size 2025-01-12 16:35:25 +00:00
Gavin MacGregor
f893ad5e1b Fix geometry when loading with zoom set to minimum 2025-01-12 15:36:18 +00:00