Commit Graph

32 Commits

Author SHA1 Message Date
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 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 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
Gavin MacGregor
203e44ee87 Fix pixel 1:2 aspect ratio not being remembered 2025-01-12 15:06:35 +00:00
Gavin MacGregor
d5d173bb84 Fix filename suggestion of exported image
If the filename had a non-TTI extension it would not have been changed to
PNG or GIF.
2025-01-12 14:54:08 +00:00
Gavin MacGregor
cdfcdd8754 Add export to animated GIF, wrt GH-9 2025-01-08 23:23:14 +00:00
Gavin MacGregor
e2f794c658 Update copyright notices to 2025 2024-12-31 10:51:06 +00:00
Gavin MacGregor
568469d41e Fix deprecation warnings 2024-12-29 18:24:37 +00:00
Gavin MacGregor
dfbfd47191 Add mosaic manipulation across a selected area 2024-12-08 21:21:13 +00:00
Gavin MacGregor
900c2a79b2 Separate finding of mosaics within selection 2024-12-08 14:08:13 +00:00
Gavin MacGregor
cf4f85cc51 Tag version 0.6.5-beta 2024-12-04 12:33:03 +00:00
Gavin MacGregor
f96b973ff3 Warn when Active Position differs between Levels 2024-12-01 21:51:32 +00:00
Gavin MacGregor
48a2b48964 Add monochrome rendering modes
These modes can be used to see the inner workings of colourful artworks that
frequently use "foreground colour, new background, foreground colour",
particularly to show exactly which colours are represented by set or clear
sixels.

One mode renders all characters in white on a black background and the other
mode renders black characters on a white background. The latter could be used
to save ink if the resulting image is printed.

Flash is suppressed in these mono modes, this may or may not change.
2024-12-01 17:44:58 +00:00
G.K.MacGregor
4743b26400 Remove duplicate widget disabling 2024-08-28 13:40:43 +01:00
G.K.MacGregor
40fc1e38d8 Port to CMake from qmake, and split decoder into subdirectory
Qt 5 has had to be dropped as CMakeLists.txt uses qt_* specific commands
which are implemented in Qt 6 onwards.

cmake --install is only working on Linux at the moment; it installs the
executable and the bundled example tti files into /usr/local/share/doc

The teletext decoder with its document storage has been moved to a
subdirectory with the intention of making it possible to use in other
projects, but some further separation of editing stuff will be needed.
2024-08-11 15:35:49 +01:00