Implement Delete key command

This commit is contained in:
G.K.MacGregor
2021-02-12 21:33:06 +00:00
parent d5bb0417af
commit 9a997d1bfa
3 changed files with 75 additions and 0 deletions

View File

@@ -80,6 +80,24 @@ private:
bool m_firstDo;
};
class DeleteKeyCommand : public QUndoCommand
{
public:
enum { Id = 104 };
DeleteKeyCommand(TeletextDocument *, QUndoCommand *parent = 0);
void redo() override;
void undo() override;
bool mergeWith(const QUndoCommand *) override;
int id() const override { return Id; }
private:
TeletextDocument *m_teletextDocument;
unsigned char m_oldRowContents[40], m_newRowContents[40];
int m_subPageIndex, m_row, m_column;
};
class InsertSubPageCommand : public QUndoCommand
{
public: