Commit Graph

333 Commits

Author SHA1 Message Date
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
G.K.MacGregor
3125762133 Tag version 0.6-alpha 0.6-alpha 2023-03-05 14:38:45 +00:00
G.K.MacGregor
c0670c8281 Never mark a document cleanly saved after .t42 export
Amendment to 7493c8f so that a document even with only one subpage will not
be marked as cleanly saved. This should reinforce the fact that only TTI
files will be guaranteed to store everything.
2023-02-26 18:06:14 +00:00
G.K.MacGregor
7493c8f527 Add re-export option if .t42 file is loaded or exported
This allows a single keypress or menu click to repeatedly export a subpage
over the same .t42 file, like "Save" does for TTI files. If further teletext
page formats are added in the future this option should remember which
format was exported.

This option is deliberately different from "Save" as .t42 files are only
exported as the current subpage on view, and some metadata stored in TTI
files but not in .t42 files could be lost.

When exporting .t42 files the document is only marked as cleanly saved if it
consisted of a single subpage. Documents of more than one subpage will still
cause a confirmation dialog to be shown if unsaved, as the other subpages
will be lost unless the document is saved again as TTI.
2023-02-26 17:29:09 +00:00
G.K.MacGregor
9bd9f180c2 Don't hide control codes or grid when exporting PNG 2023-02-02 18:18:51 +00:00
G.K.MacGregor
c64be6a4c9 Update copyright notices to 2023 2022-12-31 21:19:15 +00:00
G.K.MacGregor
eb752835fd Auto-set row when inserting a Set Active Position triplet 2022-12-13 21:34:14 +00:00
G.K.MacGregor
72a2ef9660 Implement word wrapping when pasting plain text, wrt #6
When the clipboard has plain text data copied from a plain text or ASCII
text editor, pasting the text will perform word wrapping.

The text will originate from the cursor position and subsequent lines will
by default start from column 1 to provide room for alphanumeric colour
control codes in column 0.

If the cursor is at column 0 then all lines will start at column 0.

If a box selection is dragged before pasting the text will originate at
the top left of the selection box and be confined to the box. This can be
used if the second and subsequent lines need to start at a different
column, or if the pasted text must not overwrite an existing feature at
the right side of the page.

Note that cutting or copying text from within QTeletextMaker itself will
not be word wrapped on paste.
2022-11-20 17:36:53 +00:00
G.K.MacGregor
213eace512 Add dither to mosaic manipulating keypresses 2022-11-06 18:42:14 +00:00
G.K.MacGregor
06e0b401ca Tag version 0.5.5-alpha 0.5.5-alpha 2022-10-23 15:24:43 +01:00
G.K.MacGregor
bc8780608c Force refresh when switching decode Levels
This should fix palettes not updating when switching in and out of
Level 3.5
2022-10-23 12:43:27 +01:00
G.K.MacGregor
536c231941 Fix detect-on-load of Level 3.5 objects and DRCS mode 2022-10-23 12:30:50 +01:00
G.K.MacGregor
4faed597c0 Disable triplet widgets when no triplet is selected
This fixes a crash that occured when the last triplet in the X/26 list
is deleted.
2022-10-04 21:22:02 +01:00
G.K.MacGregor
75816e7750 Fix reserved data detection in DRCS character triplet 2022-09-22 21:28:29 +01:00
G.K.MacGregor
8b655afb2d Highlight reserved mode and data in X/26 triplet list 2022-08-30 21:07:14 +01:00
G.K.MacGregor
abf649d2ab Add reload from disk
This is typically mapped to the F5 key, so the "secret force refresh"
key has been temporarily moved to F6.
2022-07-17 15:16:53 +01:00
G.K.MacGregor
a8f2152c92 Try fixing the "unknown keypress types a block character" 2022-06-20 18:30:53 +01:00
G.K.MacGregor
9d05126e8f Fix non-flashing when page is force-refreshed 2022-06-18 17:55:19 +01:00
G.K.MacGregor
4d4bcc6151 Tag version 0.5.4-alpha 0.5.4-alpha 2022-05-30 19:44:55 +01:00
G.K.MacGregor
5b6fd56a37 Remove unused variable 2022-05-22 15:23:38 +01:00
G.K.MacGregor
bcc0d0d8e7 Keep keyboard focus if scene item other than proxy widget is clicked 2022-05-15 13:08:58 +01:00
G.K.MacGregor
ec4bdd6f7f Only check Local Object pointers 2022-05-15 11:22:19 +01:00
G.K.MacGregor
a8798260dc Rename Level method and variable 2022-05-02 22:24:04 +01:00
G.K.MacGregor
50582a95a4 Fix typo in comment 2022-05-02 22:22:58 +01:00
G.K.MacGregor
1302205911 Fix selecting X/26 triplets by keyboard 2022-05-01 16:49:23 +01:00
G.K.MacGregor
73c1b482e2 Force refresh in decoder constructor
Fixes broken initial rendering of pages with side panels.
2022-05-01 14:29:30 +01:00
G.K.MacGregor
d5487140cf Split compositional links from page enhancements 2022-05-01 12:55:08 +01:00
G.K.MacGregor
45bfa80340 Rename insert widgets 2022-04-28 21:37:44 +01:00
G.K.MacGregor
661a85066b Show Object related errors in X/26 triplet list 2022-04-05 22:11:01 +01:00
G.K.MacGregor
e16bb15310 Split decoder and render
decode.* will solely decode the teletext packets into a grid of characters and
colours and other attributes stored in an agnostic way, then render.* will read
this grid and render the characters onto the screen with the Qt specific
methods.
2022-04-02 22:38:38 +01:00
G.K.MacGregor
74ebc91ee6 Split Insert triplet button, and add mode menus
The "insert before" and "insert after" buttons will drop a menu to
select the new triplet mode, allowing triplets with different modes to
be inserted with one less mouse click.

The "insert copy" button still does the old behaviour of inserting a
copy of the currently selected triplet.
2022-03-06 12:00:53 +00:00
G.K.MacGregor
cda458b5bf Trim layout margins within triplet parameter stack 2022-02-14 23:00:47 +00:00
G.K.MacGregor
9d27ae24e7 Show selection size in status bar
Also remove the "subpage", "row" and "column" texts from the status
bar to better cope with tiny screens.
2022-02-13 18:50:50 +00:00
G.K.MacGregor
1eeeafb51e Show CLUT 1:0 as transparent in widgets 2022-02-08 17:31:34 +00:00
G.K.MacGregor
4aa77395c0 Tag version 0.5.3-alpha 0.5.3-alpha 2022-01-05 21:45:17 +00:00
G.K.MacGregor
ae1aef63f9 Fix incorrect C8 and C14 bits on t42 exporing 2022-01-05 20:57:26 +00:00
G.K.MacGregor
406ab6c6ed Update copyright notices to 2022 2021-12-31 21:40:36 +00:00
G.K.MacGregor
2da8da8c8e Tag version 0.5.2-alpha 0.5.2-alpha 2021-12-28 12:33:58 +00:00
G.K.MacGregor
c2057e979d Fix SC incorrectly saved as hexadecimal 2021-12-28 12:22:29 +00:00
G.K.MacGregor
f5402d216a Show filename when asking about unsaved changes 2021-12-14 22:06:18 +00:00
G.K.MacGregor
43e3155a08 Tag version 0.5.1-alpha 0.5.1-alpha 2021-11-16 17:48:26 +00:00
G.K.MacGregor
fa29f25c91 Fix object definitions stuck on Level 2.5 only 2021-11-10 09:16:24 +00:00
G.K.MacGregor
dab124cf80 Remove unused variable 2021-09-15 14:42:03 +01:00
G.K.MacGregor
2f23c83d49 Clarify that font style is Level 3.5 only 2021-09-10 21:18:06 +01:00
G.K.MacGregor
3d68e384a5 Tag version 0.5-alpha 0.5-alpha 2021-09-10 17:14:27 +01:00
G.K.MacGregor
dc2f1cffe6 Remove debug config that sneaked in 2021-09-10 16:50:31 +01:00
G.K.MacGregor
f61dfbf654 Allow deeper zoom 2021-09-09 21:40:36 +01:00