Commit Graph
100 Commits
Author SHA1 Message Date
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 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 1d889ab724 Update MXE notes 2024-12-01 18:07:43 +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
Gavin MacGregor 26b5974421 Remove duplicate row from template 2024-11-26 18:05:00 +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
G.K.MacGregor cf6c4855ce Disable triplet editing widgets when X/26 list is changed 2024-08-08 22:13:02 +01:00
G.K.MacGregor 343fd2cf26 Tag version 0.6.4-beta 2024-07-14 16:09:55 +01:00
G.K.MacGregor d184c50246 Implement mosaic shifting
When a selection box is dragged, holding Ctrl while pressing the arrow
keys will shift the mosaics one sixel at a time.

If a shifting sixel encounters a non-mosaic cell it will pass through to
the other side of it.
2024-07-10 21:13:54 +01:00
G.K.MacGregor 9045160d3a Convert storeCharacters to a function 2024-07-09 22:16:58 +01:00
G.K.MacGregor 98071d823c Split out X28 commands 2024-07-09 18:01:17 +01:00
G.K.MacGregor eb0dd7266b Remove secret F6 refresh key
Not needed as all non-refresh bugs seem to be squashed now.
2024-07-08 21:32:39 +01:00
G.K.MacGregor c32876600b Tweaks to mosaic character editing 2024-07-07 19:41:39 +01:00
G.K.MacGregor fbdde54fe4 Allow monochrome images to be cut and pasted as mosaic sixels
For cut and copy sixels are converted to a monochrome image; unset sixels
are black and set sixels are white. Alphanumerics and control codes are
ignored. Held mosaics are not considered.

For paste a clipboard with only an image is converted to black and white
for unset and set sixels. This only works reliably with fully-black and
fully-white pixels.
2024-07-07 13:20:47 +01:00
G.K.MacGregor 54bdf1783a Don't paste plain text at column 0 unless selection is active 2024-07-02 16:33:49 +01:00
G.K.MacGregor 23a0d3c47e Add QIcon to font encapsulation 2024-07-02 15:52:44 +01:00
G.K.MacGregor 9b4ee66e1c Revert "Convert font image straight to QIcons"
This reverts commit 7cd632b4e2.

The commit would cause the font icons to be inverted sometimes. This
reversion is altered to return the font bitmaps as a QPixmap instead of a
QBitmap to be compatible with Qt6.
2024-06-25 18:49:38 +01:00
G.K.MacGregor 7cd632b4e2 Convert font image straight to QIcons
Fixes a compile error with recent Qt6 versions
2024-06-17 22:11:38 +01:00
G.K.MacGregor a0dd98144a Show blast-through alphanumerics in G1 character selection 2024-06-09 22:13:24 +01:00
G.K.MacGregor 80a450e0de Implement object invoke context menu 2024-06-09 21:57:55 +01:00
G.K.MacGregor f90ea6ca9c Add an easy way to get list of object definitions 2024-06-04 18:13:59 +01:00
G.K.MacGregor dfff4c5e17 Implement font style context menu 2024-05-26 19:27:48 +01:00
G.K.MacGregor e9855ceba3 Implement display attributes context menu 2024-05-26 18:24:21 +01:00
G.K.MacGregor 238515006d Implement flash functions context menu 2024-05-26 17:39:21 +01:00
G.K.MacGregor 771bc66b89 Add insert options to context menu 2024-05-22 17:28:43 +01:00
G.K.MacGregor 5b688d47ea Present same context menu in all table columns 2024-05-07 21:58:45 +01:00
G.K.MacGregor 05cf313b63 Implement CLUT context menu 2024-04-30 21:12:35 +01:00
G.K.MacGregor 12649e3adf Implement character context menu 2024-04-28 18:46:31 +01:00
G.K.MacGregor 539c6c9b32 Make the model return character set numbers 2024-04-24 19:51:06 +01:00
G.K.MacGregor 5d0241ad43 Implement right-click to change triplet mode 2024-04-24 17:57:01 +01:00
G.K.MacGregor 9e64033d7c Break out triplet mode menu 2024-04-22 22:15:10 +01:00
G.K.MacGregor ecefa03559 Encapsulate the font bitmap 2024-04-17 22:15:01 +01:00
G.K.MacGregor 3db1815772 Add zoom slider to status bar 2024-04-09 21:33:17 +01:00
G.K.MacGregor ebb389b6d7 Tag version 0.6.3-beta 2024-02-05 18:02:30 +00:00
G.K.MacGregor 55814f1d6d Add some examples 2024-02-05 17:37:31 +00:00
G.K.MacGregor 7dc192e59b Say that it compiles with Qt 6 2024-02-05 17:29:16 +00:00
G.K.MacGregor 37f7be7db1 Render the page with QImage instead of QPixmap 2024-02-05 17:02:36 +00:00
G.K.MacGregor 680130f26e Remove a couple of spurious includes 2024-02-05 17:01:55 +00:00
G.K.MacGregor cbe0ad14e5 Try to make status bar smaller 2024-02-02 20:49:16 +00:00
G.K.MacGregor e3a8f43b52 Split text block saving into intermediate class 2024-02-02 18:00:43 +00:00
G.K.MacGregor baa20d69b7 Really simplify refresh signalling
Amendment to a468032, where refresh signal was not taken out of row loops.
2024-02-02 16:34:34 +00:00
G.K.MacGregor bd49ba9e47 Update copyright notices to 2024 2024-01-01 00:12:17 +00:00
G.K.MacGregor 16f6d353ed Revert "Make cycle time optional"
This reverts commit 3048e4dbc6.
Without a CT line vbit2 defaults to 1 cycle which could be too fast on
magazines with very few pages.
2023-11-30 22:05:14 +00:00
G.K.MacGregor 42d19b6e4b Properly set 2nd region combobox to unneeded 2023-11-29 22:10:58 +00:00
G.K.MacGregor 9759321566 Update URL of the ETS 300 706 teletext specification 2023-10-21 19:16:54 +01:00
G.K.MacGregor 426052f573 Port away from GNU case range extension
Hopefully this should now compile with MSVC and other compilers
2023-09-12 16:45:55 +01:00
G.K.MacGregor 3048e4dbc6 Make cycle time optional 2023-09-12 14:58:22 +01:00
G.K.MacGregor a4680326f0 Simplify refresh signalling 2023-09-12 13:50:00 +01:00
G.K.MacGregor a28e56797b Fix missing bottom half of double size text in passive objects 2023-09-05 20:25:08 +01:00
G.K.MacGregor e56fc40f8f Put parameter names into header files too 2023-08-27 14:25:16 +01:00
G.K.MacGregor 24cafa00d4 Force reload shortcut to F5 key
GNOME/GTK environments could map the reload shortcut to Ctrl+R which clashes
with the Reveal shortcut.
2023-08-22 21:42:36 +01:00
G.K.MacGregor 8e14d144fd [Qt6] Fix shortcut key sequences 2023-08-22 21:34:10 +01:00
G.K.MacGregor e001aa7896 [Qt6] Use setEncoding instead of deprecated setCodec 2023-08-20 22:16:51 +01:00
G.K.MacGregor 22703e4bfb [Qt6] Switch QRegExp usage to QRegularExpression 2023-08-20 19:39:13 +01:00
G.K.MacGregor 6d79329442 [Qt6] Include QActionGroup 2023-08-20 19:09:24 +01:00
G.K.MacGregor fe69e0cd0f [Qt6] Be explicit about QChar() 2023-08-20 19:01:53 +01:00
G.K.MacGregor fe53cabee1 [Qt6] Switch to Qt::SkipEmptyParts to fix deprecation warning 2023-08-20 18:50:55 +01:00
G.K.MacGregor 86e2856d50 Tag version 0.6.2-alpha 2023-08-15 19:50:56 +01:00
G.K.MacGregor 116b02d68f Refresh page when C5 or C6 bits are toggled 2023-08-15 18:41:26 +01:00
G.K.MacGregor c9a0d0bf84 Change default page timing from 8 to 20 seconds 2023-08-15 18:36:33 +01:00
G.K.MacGregor f36143e10f Really show correct G0 and G2 character set in widgets
Amendment to 7b59c78. This should prevent spurious NOS character sets from
appearing in the widgets, and should also prevent the G0 and G2 character
sets from getting mixed up in the widgets when those triplets are within
object definitions.

The G0 and G2 character set in the widgets may still be incorrect in corner
cases of objects invoked within areas of the page where the character set
has been changed either with the ESC/Switch spacing attribute or with the
"modified G0/G2 character set designation" triplet.
2023-08-15 18:11:40 +01:00
G.K.MacGregor 6185ca7110 Make full screen+row colours and CLUT remapping undoable 2023-08-13 21:47:22 +01:00
G.K.MacGregor 3729b293f0 Fix pasting 0x7f on unmapped plain text character 2023-08-13 14:38:56 +01:00
G.K.MacGregor b71c178840 Fix crash if Termination or Define Object was only triplet 2023-08-09 22:20:20 +01:00
G.K.MacGregor ba2d1241d0 Fix flashing rows with mixed 1Hz and 2Hz rates 2023-08-06 16:49:44 +01:00
G.K.MacGregor 07e0d757bb Forgot to remove "no mod'd G0 and G2 designation" from README 2023-06-24 23:55:55 +01:00
G.K.MacGregor 88ea066481 Tag version 0.6.1-alpha 2023-06-24 18:05:05 +01:00
G.K.MacGregor 7b59c78cee Show correct G0 and G2 character set from page in widgets 2023-06-23 18:39:36 +01:00
G.K.MacGregor c8f61d4d2c Fix default palette detection of CLUTs 1:7 and 3:7 2023-06-20 18:42:01 +01:00
G.K.MacGregor bd894a523e Show language names with mod'd G0/G2 character set triplet 2023-06-15 18:55:47 +01:00
G.K.MacGregor 27ae092b5e Lock out CLUT 0-1 editing when Level is not 3.5 2023-06-14 18:21:23 +01:00
G.K.MacGregor 43dcccb00c Fix to reserved value in mode menu 2023-06-12 21:54:59 +01:00
G.K.MacGregor 0d0db2f8b6 Implement modified G0 and G2 character set designation triplet 2023-06-12 16:37:50 +01:00
G.K.MacGregor 61c52fe7cc Fix resetting reserved bit for display attributes 2023-05-21 18:32:25 +01:00
G.K.MacGregor 4b6ea4398d Implement Level 3.5 bold and italic font style
Proportional font attributes are tracked within the decoder, but the effect
is not rendered.
2023-05-21 15:33:21 +01:00
G.K.MacGregor ed821bde45 Use proper composition mode when copying lines to flash buffers 2023-05-14 17:39:08 +01:00
G.K.MacGregor 955a1262e9 Clear invocation QMaps on empty triplet list
Fixes a bug where local enhancements hung around when switching to a subpage
without enhancements.
2023-05-09 23:35:29 +01:00
G.K.MacGregor 021fbfa60f Rewrite the decoder
A complete rewrite of decode.cpp and decode.h to make it easier to follow
and maintain. Rather than a set of "layers" descended from C++ classes, the
for-loop across the rows and columns explicitly lays out the order of
processing the Level 1 characters and attributes, the X/26 enhancements
that affect the page directly as well as those within each Invocation of an
Object, followed by selecting which Invoked Object to place in the character
cell or in the absence of an Object the underlying page fragment will be
placed in the cell.

The new decoder has the following improvements over the old...
- Local Enhancement Data has priority over Active Objects.
- Active Objects can set Full Screen and Full Row colours.
- Incremental/decremental flash phases are tracked correctly within Objects.
- X/26 characters overwriting the bottom half of Level 1 Double Height rows.
- Interaction between the underlying page and Objects where characters of
  different sizes overlap.
2023-05-07 19:25:06 +01:00
G.K.MacGregor 801efa570c Also track Active Position of Level 1.5 decoding
This is needed for the upcoming decoder write as decode.cpp will track the
Active Position from the internal data of x26triplets.

If decode.cpp is rewritten again to track the Active Position independently
of x26triplets this commit may be reverted, but then again tracking how the
Active Position moves on both levels 1.5 and 2.5+ may be useful in terms of
warning the user of differing results on different decoder levels.
2023-05-02 18:56:06 +01:00
G.K.MacGregor 0b50b064db Set address when inserting a Address Row 0 triplet 2023-04-12 21:18:22 +01:00
G.K.MacGregor c5e3fd5668 Optimise rendering of pages with flashing characters
Previously every character on the page was drawn up to six times. Now the
page is drawn once, quickly copied up to five times and then only the
flashing characters are redrawn on the copies.
2023-03-19 17:38:52 +00:00