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.
This commit is contained in:
G.K.MacGregor
2023-02-26 17:29:09 +00:00
parent 9bd9f180c2
commit 7493c8f527
2 changed files with 63 additions and 12 deletions

View File

@@ -60,12 +60,14 @@ private slots:
bool save();
bool saveAs();
void reload();
void exportT42();
void exportAuto();
void exportT42(bool);
void exportZXNet();
void exportEditTF();
void exportPNG();
void exportM29();
void updateRecentFileActions();
void updateExportAutoAction();
void openRecentFile();
void about();
void updatePageWidgets();
@@ -121,6 +123,7 @@ private:
QAction *m_recentFileActs[m_MaxRecentFiles];
QAction *m_recentFileSeparator;
QAction *m_recentFileSubMenuAct;
QAction *m_exportAutoAct;
QAction *m_deleteSubPageAction;
QAction *m_borderActs[3];
QAction *m_aspectRatioActs[4];
@@ -131,7 +134,7 @@ private:
QPushButton *m_insertModePushButton;
QRadioButton *m_levelRadioButton[4];
QString m_curFile;
QString m_curFile, m_exportAutoFileName;
bool m_isUntitled;
};