Put parameter names into header files too
This commit is contained in:
40
decode.h
40
decode.h
@@ -37,10 +37,10 @@ public:
|
|||||||
TeletextPageDecode();
|
TeletextPageDecode();
|
||||||
~TeletextPageDecode();
|
~TeletextPageDecode();
|
||||||
bool refresh(int r, int c) const { return m_refresh[r][c]; }
|
bool refresh(int r, int c) const { return m_refresh[r][c]; }
|
||||||
void setRefresh(int, int, bool);
|
void setRefresh(int r, int c, bool refresh);
|
||||||
void decodePage();
|
void decodePage();
|
||||||
LevelOnePage *teletextPage() const { return m_levelOnePage; };
|
LevelOnePage *teletextPage() const { return m_levelOnePage; };
|
||||||
void setTeletextPage(LevelOnePage *);
|
void setTeletextPage(LevelOnePage *newCurrentPage);
|
||||||
void updateSidePanels();
|
void updateSidePanels();
|
||||||
|
|
||||||
unsigned char cellCharacterCode(int r, int c) const { return m_cell[r][c].character.code; };
|
unsigned char cellCharacterCode(int r, int c) const { return m_cell[r][c].character.code; };
|
||||||
@@ -50,9 +50,9 @@ public:
|
|||||||
int cellG2CharacterSet(int r, int c) const { return m_cell[r][c].g2Set; };
|
int cellG2CharacterSet(int r, int c) const { return m_cell[r][c].g2Set; };
|
||||||
int cellForegroundCLUT(int r, int c) const { return m_cell[r][c].attribute.foregroundCLUT; };
|
int cellForegroundCLUT(int r, int c) const { return m_cell[r][c].attribute.foregroundCLUT; };
|
||||||
int cellBackgroundCLUT(int r, int c) const { return m_cell[r][c].attribute.backgroundCLUT; };
|
int cellBackgroundCLUT(int r, int c) const { return m_cell[r][c].attribute.backgroundCLUT; };
|
||||||
QColor cellForegroundQColor(int, int);
|
QColor cellForegroundQColor(int r, int c);
|
||||||
QColor cellBackgroundQColor(int, int);
|
QColor cellBackgroundQColor(int r, int c);
|
||||||
QColor cellFlashForegroundQColor(int, int);
|
QColor cellFlashForegroundQColor(int r, int c);
|
||||||
int cellFlashMode(int r, int c) const { return m_cell[r][c].attribute.flash.mode; };
|
int cellFlashMode(int r, int c) const { return m_cell[r][c].attribute.flash.mode; };
|
||||||
int cellFlashRatePhase(int r, int c) const { return m_cell[r][c].attribute.flash.ratePhase; };
|
int cellFlashRatePhase(int r, int c) const { return m_cell[r][c].attribute.flash.ratePhase; };
|
||||||
int cellFlash2HzPhaseNumber(int r, int c) const { return m_cell[r][c].attribute.flash.phase2HzShown; };
|
int cellFlash2HzPhaseNumber(int r, int c) const { return m_cell[r][c].attribute.flash.phase2HzShown; };
|
||||||
@@ -75,16 +75,16 @@ public:
|
|||||||
int rightSidePanelColumns() const { return m_rightSidePanelColumns; };
|
int rightSidePanelColumns() const { return m_rightSidePanelColumns; };
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void setLevel(int);
|
void setLevel(int level);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void fullScreenColourChanged(QColor);
|
void fullScreenColourChanged(QColor newColour);
|
||||||
void fullRowColourChanged(int, QColor);
|
void fullRowColourChanged(int r, QColor newColour);
|
||||||
void sidePanelsChanged();
|
void sidePanelsChanged();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
inline void setFullScreenColour(int);
|
inline void setFullScreenColour(int newColour);
|
||||||
inline void setFullRowColour(int, int);
|
inline void setFullRowColour(int row, int newColour);
|
||||||
|
|
||||||
int m_finalFullScreenColour, m_level;
|
int m_finalFullScreenColour, m_level;
|
||||||
QColor m_finalFullScreenQColor;
|
QColor m_finalFullScreenQColor;
|
||||||
@@ -219,15 +219,15 @@ private:
|
|||||||
|
|
||||||
X26TripletList *tripletList() const { return m_tripletList; };
|
X26TripletList *tripletList() const { return m_tripletList; };
|
||||||
void clear();
|
void clear();
|
||||||
void setTripletList(X26TripletList *);
|
void setTripletList(X26TripletList *tripletList);
|
||||||
int startTripletNumber() const { return m_startTripletNumber; };
|
int startTripletNumber() const { return m_startTripletNumber; };
|
||||||
void setStartTripletNumber(int);
|
void setStartTripletNumber(int n);
|
||||||
int endTripletNumber() const { return m_endTripletNumber; };
|
int endTripletNumber() const { return m_endTripletNumber; };
|
||||||
void setEndTripletNumber(int);
|
void setEndTripletNumber(int n);
|
||||||
int originRow() const { return m_originRow; };
|
int originRow() const { return m_originRow; };
|
||||||
int originColumn() const { return m_originColumn; };
|
int originColumn() const { return m_originColumn; };
|
||||||
void setOrigin(int, int);
|
void setOrigin(int row, int column);
|
||||||
void buildMap(int);
|
void buildMap(int level);
|
||||||
|
|
||||||
QList<QPair<int, int>> charPositions() const { return m_characterMap.uniqueKeys(); };
|
QList<QPair<int, int>> charPositions() const { return m_characterMap.uniqueKeys(); };
|
||||||
QList<QPair<int, int>> attrPositions() const { return m_attributeMap.uniqueKeys(); };
|
QList<QPair<int, int>> attrPositions() const { return m_attributeMap.uniqueKeys(); };
|
||||||
@@ -253,11 +253,11 @@ private:
|
|||||||
static textPainter s_blankPainter;
|
static textPainter s_blankPainter;
|
||||||
|
|
||||||
void decodeRow(int r);
|
void decodeRow(int r);
|
||||||
QColor cellQColor(int, int, ColourPart);
|
QColor cellQColor(int r, int c, ColourPart colourPart);
|
||||||
textCell& cellAtCharacterOrigin(int, int);
|
textCell& cellAtCharacterOrigin(int r, int c);
|
||||||
void buildInvocationList(Invocation &, int);
|
void buildInvocationList(Invocation &invocation, int objectType);
|
||||||
textCharacter characterFromTriplets(const QList<X26Triplet>);
|
textCharacter characterFromTriplets(const QList<X26Triplet> triplets);
|
||||||
inline void rotateFlashMovement(flashFunctions &);
|
inline void rotateFlashMovement(flashFunctions &flash);
|
||||||
|
|
||||||
bool m_refresh[25][72];
|
bool m_refresh[25][72];
|
||||||
textCell m_cell[25][72];
|
textCell m_cell[25][72];
|
||||||
|
|||||||
30
document.h
30
document.h
@@ -67,19 +67,19 @@ public:
|
|||||||
LevelOnePage* subPage(int p) const { return m_subPages[p]; }
|
LevelOnePage* subPage(int p) const { return m_subPages[p]; }
|
||||||
LevelOnePage* currentSubPage() const { return m_subPages[m_currentSubPageIndex]; }
|
LevelOnePage* currentSubPage() const { return m_subPages[m_currentSubPageIndex]; }
|
||||||
int currentSubPageIndex() const { return m_currentSubPageIndex; }
|
int currentSubPageIndex() const { return m_currentSubPageIndex; }
|
||||||
void selectSubPageIndex(int, bool=false);
|
void selectSubPageIndex(int newSubPageIndex, bool refresh=false);
|
||||||
void selectSubPageNext();
|
void selectSubPageNext();
|
||||||
void selectSubPagePrevious();
|
void selectSubPagePrevious();
|
||||||
void insertSubPage(int, bool);
|
void insertSubPage(int beforeSubPageIndex, bool copySubPage);
|
||||||
void deleteSubPage(int);
|
void deleteSubPage(int subPageToDelete);
|
||||||
void deleteSubPageToRecycle(int);
|
void deleteSubPageToRecycle(int subPageToRecycle);
|
||||||
void unDeleteSubPageFromRecycle(int);
|
void unDeleteSubPageFromRecycle(int subPage);
|
||||||
int pageNumber() const { return m_pageNumber; }
|
int pageNumber() const { return m_pageNumber; }
|
||||||
void setPageNumber(int);
|
void setPageNumber(int pageNumber);
|
||||||
void setPageNumberFromString(QString);
|
void setPageNumberFromString(QString pageNumberString);
|
||||||
QString description() const { return m_description; }
|
QString description() const { return m_description; }
|
||||||
void setDescription(QString);
|
void setDescription(QString newDescription);
|
||||||
void setFastTextLinkPageNumberOnAllSubPages(int, int);
|
void setFastTextLinkPageNumberOnAllSubPages(int linkNumber, int pageNumber);
|
||||||
QUndoStack *undoStack() const { return m_undoStack; }
|
QUndoStack *undoStack() const { return m_undoStack; }
|
||||||
ClutModel *clutModel() const { return m_clutModel; }
|
ClutModel *clutModel() const { return m_clutModel; }
|
||||||
int cursorRow() const { return m_cursorRow; }
|
int cursorRow() const { return m_cursorRow; }
|
||||||
@@ -88,7 +88,7 @@ public:
|
|||||||
void cursorDown(bool shiftKey=false);
|
void cursorDown(bool shiftKey=false);
|
||||||
void cursorLeft(bool shiftKey=false);
|
void cursorLeft(bool shiftKey=false);
|
||||||
void cursorRight(bool shiftKey=false);
|
void cursorRight(bool shiftKey=false);
|
||||||
void moveCursor(int, int, bool selectionInProgress=false);
|
void moveCursor(int cursorRow, int cursorColumn, bool selectionInProgress=false);
|
||||||
int selectionTopRow() const { return m_selectionCornerRow == -1 ? m_cursorRow : qMin(m_selectionCornerRow, m_cursorRow); }
|
int selectionTopRow() const { return m_selectionCornerRow == -1 ? m_cursorRow : qMin(m_selectionCornerRow, m_cursorRow); }
|
||||||
int selectionBottomRow() const { return qMax(m_selectionCornerRow, m_cursorRow); }
|
int selectionBottomRow() const { return qMax(m_selectionCornerRow, m_cursorRow); }
|
||||||
int selectionLeftColumn() const { return m_selectionCornerColumn == -1 ? m_cursorColumn : qMin(m_selectionCornerColumn, m_cursorColumn); }
|
int selectionLeftColumn() const { return m_selectionCornerColumn == -1 ? m_cursorColumn : qMin(m_selectionCornerColumn, m_cursorColumn); }
|
||||||
@@ -98,22 +98,22 @@ public:
|
|||||||
bool selectionActive() const { return m_selectionSubPage == currentSubPage(); }
|
bool selectionActive() const { return m_selectionSubPage == currentSubPage(); }
|
||||||
int selectionCornerRow() const { return m_selectionCornerRow == -1 ? m_cursorRow : m_selectionCornerRow; }
|
int selectionCornerRow() const { return m_selectionCornerRow == -1 ? m_cursorRow : m_selectionCornerRow; }
|
||||||
int selectionCornerColumn() const { return m_selectionCornerColumn == -1 ? m_cursorColumn : m_selectionCornerColumn; }
|
int selectionCornerColumn() const { return m_selectionCornerColumn == -1 ? m_cursorColumn : m_selectionCornerColumn; }
|
||||||
void setSelectionCorner(int, int);
|
void setSelectionCorner(int row, int column);
|
||||||
void setSelection(int, int, int, int);
|
void setSelection(int topRow, int leftColumn, int bottomRow, int rightColumn);
|
||||||
void cancelSelection();
|
void cancelSelection();
|
||||||
int levelRequired() const;
|
int levelRequired() const;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void cursorMoved();
|
void cursorMoved();
|
||||||
void selectionMoved();
|
void selectionMoved();
|
||||||
void colourChanged(int);
|
void colourChanged(int i);
|
||||||
void contentsChange(int);
|
void contentsChange(int row);
|
||||||
void pageOptionsChanged();
|
void pageOptionsChanged();
|
||||||
void aboutToChangeSubPage();
|
void aboutToChangeSubPage();
|
||||||
void subPageSelected();
|
void subPageSelected();
|
||||||
void refreshNeeded();
|
void refreshNeeded();
|
||||||
|
|
||||||
void tripletCommandHighlight(int);
|
void tripletCommandHighlight(int tripletNumber);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString m_description;
|
QString m_description;
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
class LevelOneCommand : public QUndoCommand
|
class LevelOneCommand : public QUndoCommand
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LevelOneCommand(TeletextDocument *, QUndoCommand *parent = 0);
|
LevelOneCommand(TeletextDocument *teletextDocument, QUndoCommand *parent = 0);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
TeletextDocument *m_teletextDocument;
|
TeletextDocument *m_teletextDocument;
|
||||||
@@ -41,11 +41,11 @@ class TypeCharacterCommand : public LevelOneCommand
|
|||||||
public:
|
public:
|
||||||
enum { Id = 101 };
|
enum { Id = 101 };
|
||||||
|
|
||||||
TypeCharacterCommand(TeletextDocument *, unsigned char, bool, QUndoCommand *parent = 0);
|
TypeCharacterCommand(TeletextDocument *teletextDocument, unsigned char newCharacter, bool insertMode, QUndoCommand *parent = 0);
|
||||||
|
|
||||||
void redo() override;
|
void redo() override;
|
||||||
void undo() override;
|
void undo() override;
|
||||||
bool mergeWith(const QUndoCommand *) override;
|
bool mergeWith(const QUndoCommand *command) override;
|
||||||
int id() const override { return Id; }
|
int id() const override { return Id; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -59,11 +59,11 @@ class ToggleMosaicBitCommand : public LevelOneCommand
|
|||||||
public:
|
public:
|
||||||
enum { Id = 102 };
|
enum { Id = 102 };
|
||||||
|
|
||||||
ToggleMosaicBitCommand(TeletextDocument *, unsigned char, QUndoCommand *parent = 0);
|
ToggleMosaicBitCommand(TeletextDocument *teletextDocument, unsigned char bitToToggle, QUndoCommand *parent = 0);
|
||||||
|
|
||||||
void redo() override;
|
void redo() override;
|
||||||
void undo() override;
|
void undo() override;
|
||||||
bool mergeWith(const QUndoCommand *) override;
|
bool mergeWith(const QUndoCommand *command) override;
|
||||||
int id() const override { return Id; }
|
int id() const override { return Id; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -75,11 +75,11 @@ class BackspaceKeyCommand : public LevelOneCommand
|
|||||||
public:
|
public:
|
||||||
enum { Id = 103 };
|
enum { Id = 103 };
|
||||||
|
|
||||||
BackspaceKeyCommand(TeletextDocument *, bool insertMode, QUndoCommand *parent = 0);
|
BackspaceKeyCommand(TeletextDocument *teletextDocument, bool insertMode, QUndoCommand *parent = 0);
|
||||||
|
|
||||||
void redo() override;
|
void redo() override;
|
||||||
void undo() override;
|
void undo() override;
|
||||||
bool mergeWith(const QUndoCommand *) override;
|
bool mergeWith(const QUndoCommand *command) override;
|
||||||
int id() const override { return Id; }
|
int id() const override { return Id; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -93,11 +93,11 @@ class DeleteKeyCommand : public LevelOneCommand
|
|||||||
public:
|
public:
|
||||||
enum { Id = 104 };
|
enum { Id = 104 };
|
||||||
|
|
||||||
DeleteKeyCommand(TeletextDocument *, QUndoCommand *parent = 0);
|
DeleteKeyCommand(TeletextDocument *teletextDocument, QUndoCommand *parent = 0);
|
||||||
|
|
||||||
void redo() override;
|
void redo() override;
|
||||||
void undo() override;
|
void undo() override;
|
||||||
bool mergeWith(const QUndoCommand *) override;
|
bool mergeWith(const QUndoCommand *command) override;
|
||||||
int id() const override { return Id; }
|
int id() const override { return Id; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -107,7 +107,7 @@ private:
|
|||||||
class InsertSubPageCommand : public LevelOneCommand
|
class InsertSubPageCommand : public LevelOneCommand
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
InsertSubPageCommand(TeletextDocument *, bool, bool, QUndoCommand *parent = 0);
|
InsertSubPageCommand(TeletextDocument *teletextDocument, bool afterCurrentSubPage, bool copySubPage, QUndoCommand *parent = 0);
|
||||||
|
|
||||||
void redo() override;
|
void redo() override;
|
||||||
void undo() override;
|
void undo() override;
|
||||||
@@ -120,7 +120,7 @@ private:
|
|||||||
class DeleteSubPageCommand : public LevelOneCommand
|
class DeleteSubPageCommand : public LevelOneCommand
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DeleteSubPageCommand(TeletextDocument *, QUndoCommand *parent = 0);
|
DeleteSubPageCommand(TeletextDocument *teletextDocument, QUndoCommand *parent = 0);
|
||||||
|
|
||||||
void redo() override;
|
void redo() override;
|
||||||
void undo() override;
|
void undo() override;
|
||||||
@@ -129,7 +129,7 @@ public:
|
|||||||
class InsertRowCommand : public LevelOneCommand
|
class InsertRowCommand : public LevelOneCommand
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
InsertRowCommand(TeletextDocument *, bool, QUndoCommand *parent = 0);
|
InsertRowCommand(TeletextDocument *teletextDocument, bool copyRow, QUndoCommand *parent = 0);
|
||||||
|
|
||||||
void redo() override;
|
void redo() override;
|
||||||
void undo() override;
|
void undo() override;
|
||||||
@@ -142,7 +142,7 @@ private:
|
|||||||
class DeleteRowCommand : public LevelOneCommand
|
class DeleteRowCommand : public LevelOneCommand
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DeleteRowCommand(TeletextDocument *, QUndoCommand *parent = 0);
|
DeleteRowCommand(TeletextDocument *teletextDocument, QUndoCommand *parent = 0);
|
||||||
|
|
||||||
void redo() override;
|
void redo() override;
|
||||||
void undo() override;
|
void undo() override;
|
||||||
@@ -155,7 +155,7 @@ private:
|
|||||||
class CutCommand : public LevelOneCommand
|
class CutCommand : public LevelOneCommand
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CutCommand(TeletextDocument *, QUndoCommand *parent = 0);
|
CutCommand(TeletextDocument *teletextDocument, QUndoCommand *parent = 0);
|
||||||
|
|
||||||
void redo() override;
|
void redo() override;
|
||||||
void undo() override;
|
void undo() override;
|
||||||
@@ -169,7 +169,7 @@ private:
|
|||||||
class PasteCommand : public LevelOneCommand
|
class PasteCommand : public LevelOneCommand
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PasteCommand(TeletextDocument *, int, QUndoCommand *parent = 0);
|
PasteCommand(TeletextDocument *teletextDocument, int pageCharSet, QUndoCommand *parent = 0);
|
||||||
|
|
||||||
void redo() override;
|
void redo() override;
|
||||||
void undo() override;
|
void undo() override;
|
||||||
@@ -188,11 +188,11 @@ class SetFullScreenColourCommand : public LevelOneCommand
|
|||||||
public:
|
public:
|
||||||
enum { Id = 105 };
|
enum { Id = 105 };
|
||||||
|
|
||||||
SetFullScreenColourCommand(TeletextDocument *, int, QUndoCommand *parent = 0);
|
SetFullScreenColourCommand(TeletextDocument *teletextDocument, int newColour, QUndoCommand *parent = 0);
|
||||||
|
|
||||||
void redo() override;
|
void redo() override;
|
||||||
void undo() override;
|
void undo() override;
|
||||||
bool mergeWith(const QUndoCommand *) override;
|
bool mergeWith(const QUndoCommand *command) override;
|
||||||
int id() const override { return Id; }
|
int id() const override { return Id; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -204,11 +204,11 @@ class SetFullRowColourCommand : public LevelOneCommand
|
|||||||
public:
|
public:
|
||||||
enum { Id = 106 };
|
enum { Id = 106 };
|
||||||
|
|
||||||
SetFullRowColourCommand(TeletextDocument *, int, QUndoCommand *parent = 0);
|
SetFullRowColourCommand(TeletextDocument *teletextDocument, int newColour, QUndoCommand *parent = 0);
|
||||||
|
|
||||||
void redo() override;
|
void redo() override;
|
||||||
void undo() override;
|
void undo() override;
|
||||||
bool mergeWith(const QUndoCommand *) override;
|
bool mergeWith(const QUndoCommand *command) override;
|
||||||
int id() const override { return Id; }
|
int id() const override { return Id; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -220,11 +220,11 @@ class SetCLUTRemapCommand : public LevelOneCommand
|
|||||||
public:
|
public:
|
||||||
enum { Id = 107 };
|
enum { Id = 107 };
|
||||||
|
|
||||||
SetCLUTRemapCommand(TeletextDocument *, int, QUndoCommand *parent = 0);
|
SetCLUTRemapCommand(TeletextDocument *teletextDocument, int newMap, QUndoCommand *parent = 0);
|
||||||
|
|
||||||
void redo() override;
|
void redo() override;
|
||||||
void undo() override;
|
void undo() override;
|
||||||
bool mergeWith(const QUndoCommand *) override;
|
bool mergeWith(const QUndoCommand *command) override;
|
||||||
int id() const override { return Id; }
|
int id() const override { return Id; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -236,11 +236,11 @@ class SetBlackBackgroundSubstCommand : public LevelOneCommand
|
|||||||
public:
|
public:
|
||||||
enum { Id = 108 };
|
enum { Id = 108 };
|
||||||
|
|
||||||
SetBlackBackgroundSubstCommand(TeletextDocument *, bool, QUndoCommand *parent = 0);
|
SetBlackBackgroundSubstCommand(TeletextDocument *teletextDocument, bool newSub, QUndoCommand *parent = 0);
|
||||||
|
|
||||||
void redo() override;
|
void redo() override;
|
||||||
void undo() override;
|
void undo() override;
|
||||||
bool mergeWith(const QUndoCommand *) override;
|
bool mergeWith(const QUndoCommand *command) override;
|
||||||
int id() const override { return Id; }
|
int id() const override { return Id; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -250,7 +250,7 @@ private:
|
|||||||
class SetColourCommand : public LevelOneCommand
|
class SetColourCommand : public LevelOneCommand
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SetColourCommand(TeletextDocument *, int, int, QUndoCommand *parent = 0);
|
SetColourCommand(TeletextDocument *teletextDocument, int colourIndex, int newColour, QUndoCommand *parent = 0);
|
||||||
|
|
||||||
void redo() override;
|
void redo() override;
|
||||||
void undo() override;
|
void undo() override;
|
||||||
@@ -262,7 +262,7 @@ private:
|
|||||||
class ResetCLUTCommand : public LevelOneCommand
|
class ResetCLUTCommand : public LevelOneCommand
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ResetCLUTCommand(TeletextDocument *, int, QUndoCommand *parent = 0);
|
ResetCLUTCommand(TeletextDocument *teletextDocument, int colourTable, QUndoCommand *parent = 0);
|
||||||
|
|
||||||
void redo() override;
|
void redo() override;
|
||||||
void undo() override;
|
void undo() override;
|
||||||
|
|||||||
@@ -36,19 +36,19 @@ public:
|
|||||||
enum CycleTypeEnum { CTcycles, CTseconds };
|
enum CycleTypeEnum { CTcycles, CTseconds };
|
||||||
|
|
||||||
LevelOnePage();
|
LevelOnePage();
|
||||||
LevelOnePage(const PageBase &);
|
LevelOnePage(const PageBase &other);
|
||||||
|
|
||||||
bool isEmpty() const override;
|
bool isEmpty() const override;
|
||||||
|
|
||||||
QByteArray packet(int) const override;
|
QByteArray packet(int packetNumber) const override;
|
||||||
QByteArray packet(int, int) const override;
|
QByteArray packet(int packetNumber, int designationCode) const override;
|
||||||
bool packetExists(int) const override;
|
bool packetExists(int packetNumber) const override;
|
||||||
bool packetExists(int, int) const override;
|
bool packetExists(int packetNumber, int designationCode) const override;
|
||||||
bool setPacket(int, QByteArray) override;
|
bool setPacket(int packetNumber, QByteArray packetContents) override;
|
||||||
bool setPacket(int, int, QByteArray) override;
|
bool setPacket(int packetNumber, int designationCode, QByteArray packetContents) override;
|
||||||
|
|
||||||
bool controlBit(int bitNumber) const override;
|
bool controlBit(int bitNumber) const override;
|
||||||
bool setControlBit(int, bool) override;
|
bool setControlBit(int bitNumber, bool active) override;
|
||||||
|
|
||||||
void clearPage();
|
void clearPage();
|
||||||
|
|
||||||
@@ -56,53 +56,53 @@ public:
|
|||||||
|
|
||||||
/* void setSubPageNumber(int); */
|
/* void setSubPageNumber(int); */
|
||||||
int cycleValue() const { return m_cycleValue; };
|
int cycleValue() const { return m_cycleValue; };
|
||||||
void setCycleValue(int);
|
void setCycleValue(int newValue);
|
||||||
CycleTypeEnum cycleType() const { return m_cycleType; };
|
CycleTypeEnum cycleType() const { return m_cycleType; };
|
||||||
void setCycleType(CycleTypeEnum);
|
void setCycleType(CycleTypeEnum newType);
|
||||||
int defaultCharSet() const { return m_defaultCharSet; }
|
int defaultCharSet() const { return m_defaultCharSet; }
|
||||||
void setDefaultCharSet(int);
|
void setDefaultCharSet(int newDefaultCharSet);
|
||||||
int defaultNOS() const { return m_defaultNOS; }
|
int defaultNOS() const { return m_defaultNOS; }
|
||||||
void setDefaultNOS(int);
|
void setDefaultNOS(int defaultNOS);
|
||||||
int secondCharSet() const { return m_secondCharSet; }
|
int secondCharSet() const { return m_secondCharSet; }
|
||||||
void setSecondCharSet(int);
|
void setSecondCharSet(int newSecondCharSet);
|
||||||
int secondNOS() const { return m_secondNOS; }
|
int secondNOS() const { return m_secondNOS; }
|
||||||
void setSecondNOS(int);
|
void setSecondNOS(int newSecondNOS);
|
||||||
unsigned char character(int row, int column) const { return m_level1Page[row][column]; }
|
unsigned char character(int row, int column) const { return m_level1Page[row][column]; }
|
||||||
void setCharacter(int, int, unsigned char);
|
void setCharacter(int row, int column, unsigned char newCharacter);
|
||||||
int defaultScreenColour() const { return m_defaultScreenColour; }
|
int defaultScreenColour() const { return m_defaultScreenColour; }
|
||||||
void setDefaultScreenColour(int);
|
void setDefaultScreenColour(int newDefaultScreenColour);
|
||||||
int defaultRowColour() const { return m_defaultRowColour; }
|
int defaultRowColour() const { return m_defaultRowColour; }
|
||||||
void setDefaultRowColour(int);
|
void setDefaultRowColour(int newDefaultRowColour);
|
||||||
int colourTableRemap() const { return m_colourTableRemap; }
|
int colourTableRemap() const { return m_colourTableRemap; }
|
||||||
void setColourTableRemap(int);
|
void setColourTableRemap(int newColourTableRemap);
|
||||||
bool blackBackgroundSubst() const { return m_blackBackgroundSubst; }
|
bool blackBackgroundSubst() const { return m_blackBackgroundSubst; }
|
||||||
void setBlackBackgroundSubst(bool);
|
void setBlackBackgroundSubst(bool newBlackBackgroundSubst);
|
||||||
int CLUT(int index, int renderLevel=3) const;
|
int CLUT(int index, int renderLevel=3) const;
|
||||||
void setCLUT(int, int);
|
void setCLUT(int index, int newColour);
|
||||||
QColor CLUTtoQColor(int index, int renderlevel=3) const;
|
QColor CLUTtoQColor(int index, int renderlevel=3) const;
|
||||||
bool isPaletteDefault(int) const;
|
bool isPaletteDefault(int colour) const;
|
||||||
bool isPaletteDefault(int, int) const;
|
bool isPaletteDefault(int fromColour, int toColour) const;
|
||||||
int levelRequired() const;
|
int levelRequired() const;
|
||||||
bool leftSidePanelDisplayed() const { return m_leftSidePanelDisplayed; }
|
bool leftSidePanelDisplayed() const { return m_leftSidePanelDisplayed; }
|
||||||
void setLeftSidePanelDisplayed(bool);
|
void setLeftSidePanelDisplayed(bool newLeftSidePanelDisplayed);
|
||||||
bool rightSidePanelDisplayed() const { return m_rightSidePanelDisplayed; }
|
bool rightSidePanelDisplayed() const { return m_rightSidePanelDisplayed; }
|
||||||
void setRightSidePanelDisplayed(bool);
|
void setRightSidePanelDisplayed(bool newRightSidePanelDisplayed);
|
||||||
int sidePanelColumns() const { return m_sidePanelColumns; }
|
int sidePanelColumns() const { return m_sidePanelColumns; }
|
||||||
void setSidePanelColumns(int);
|
void setSidePanelColumns(int newSidePanelColumns);
|
||||||
bool sidePanelStatusL25() const { return m_sidePanelStatusL25; }
|
bool sidePanelStatusL25() const { return m_sidePanelStatusL25; }
|
||||||
void setSidePanelStatusL25(bool);
|
void setSidePanelStatusL25(bool newSidePanelStatusL25);
|
||||||
int fastTextLinkPageNumber(int linkNumber) const { return m_fastTextLink[linkNumber].pageNumber; }
|
int fastTextLinkPageNumber(int linkNumber) const { return m_fastTextLink[linkNumber].pageNumber; }
|
||||||
void setFastTextLinkPageNumber(int, int);
|
void setFastTextLinkPageNumber(int linkNumber, int pageNumber);
|
||||||
int composeLinkFunction(int linkNumber) const { return m_composeLink[linkNumber].function; }
|
int composeLinkFunction(int linkNumber) const { return m_composeLink[linkNumber].function; }
|
||||||
void setComposeLinkFunction(int, int);
|
void setComposeLinkFunction(int linkNumber, int newFunction);
|
||||||
bool composeLinkLevel2p5(int linkNumber) const { return m_composeLink[linkNumber].level2p5; }
|
bool composeLinkLevel2p5(int linkNumber) const { return m_composeLink[linkNumber].level2p5; }
|
||||||
void setComposeLinkLevel2p5(int, bool);
|
void setComposeLinkLevel2p5(int linkNumber, bool newRequired);
|
||||||
bool composeLinkLevel3p5(int linkNumber) const { return m_composeLink[linkNumber].level3p5; }
|
bool composeLinkLevel3p5(int linkNumber) const { return m_composeLink[linkNumber].level3p5; }
|
||||||
void setComposeLinkLevel3p5(int, bool);
|
void setComposeLinkLevel3p5(int linkNumber, bool newRequired);
|
||||||
int composeLinkPageNumber(int linkNumber) const { return m_composeLink[linkNumber].pageNumber; }
|
int composeLinkPageNumber(int linkNumber) const { return m_composeLink[linkNumber].pageNumber; }
|
||||||
void setComposeLinkPageNumber(int, int);
|
void setComposeLinkPageNumber(int linkNumber, int newPageNumber);
|
||||||
int composeLinkSubPageCodes(int linkNumber) const { return m_composeLink[linkNumber].subPageCodes; }
|
int composeLinkSubPageCodes(int linkNumber) const { return m_composeLink[linkNumber].subPageCodes; }
|
||||||
void setComposeLinkSubPageCodes(int, int);
|
void setComposeLinkSubPageCodes(int linkNumber, int newSubPageCodes);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
unsigned char m_level1Page[25][40];
|
unsigned char m_level1Page[25][40];
|
||||||
|
|||||||
16
loadsave.h
16
loadsave.h
@@ -30,18 +30,18 @@
|
|||||||
#include "levelonepage.h"
|
#include "levelonepage.h"
|
||||||
#include "pagebase.h"
|
#include "pagebase.h"
|
||||||
|
|
||||||
void loadTTI(QFile *, TeletextDocument *);
|
void loadTTI(QFile *inFile, TeletextDocument *document);
|
||||||
void importT42(QFile *, TeletextDocument *);
|
void importT42(QFile *inFile, TeletextDocument *document);
|
||||||
|
|
||||||
int controlBitsToPS(PageBase *);
|
int controlBitsToPS(PageBase *subPage);
|
||||||
|
|
||||||
void saveTTI(QSaveFile &, const TeletextDocument &);
|
void saveTTI(QSaveFile &file, const TeletextDocument &document);
|
||||||
void exportT42File(QSaveFile &, const TeletextDocument &);
|
void exportT42File(QSaveFile &file, const TeletextDocument &document);
|
||||||
void exportM29File(QSaveFile &, const TeletextDocument &);
|
void exportM29File(QSaveFile &file, const TeletextDocument &document);
|
||||||
|
|
||||||
QByteArray rowPacketAlways(PageBase *, int);
|
QByteArray rowPacketAlways(PageBase *subPage, int packetNumber);
|
||||||
|
|
||||||
QString exportHashStringPage(LevelOnePage *);
|
QString exportHashStringPage(LevelOnePage *subPage);
|
||||||
QString exportHashStringPackets(LevelOnePage *subPage);
|
QString exportHashStringPackets(LevelOnePage *subPage);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
52
mainwidget.h
52
mainwidget.h
@@ -43,15 +43,15 @@ class TeletextWidget : public QFrame
|
|||||||
public:
|
public:
|
||||||
TeletextWidget(QFrame *parent = 0);
|
TeletextWidget(QFrame *parent = 0);
|
||||||
~TeletextWidget();
|
~TeletextWidget();
|
||||||
void setCharacter(unsigned char);
|
void setCharacter(unsigned char newCharacter);
|
||||||
void toggleCharacterBit(unsigned char);
|
void toggleCharacterBit(unsigned char bitToToggle);
|
||||||
bool insertMode() const { return m_insertMode; };
|
bool insertMode() const { return m_insertMode; };
|
||||||
void setInsertMode(bool);
|
void setInsertMode(bool insertMode);
|
||||||
bool showControlCodes() const { return m_pageRender.showControlCodes(); };
|
bool showControlCodes() const { return m_pageRender.showControlCodes(); };
|
||||||
|
|
||||||
QSize sizeHint() { return QSize(480+(pageDecode()->leftSidePanelColumns()+pageDecode()->rightSidePanelColumns())*12, 250); }
|
QSize sizeHint() { return QSize(480+(pageDecode()->leftSidePanelColumns()+pageDecode()->rightSidePanelColumns())*12, 250); }
|
||||||
|
|
||||||
void inputMethodEvent(QInputMethodEvent *);
|
void inputMethodEvent(QInputMethodEvent *event);
|
||||||
|
|
||||||
TeletextDocument* document() const { return m_teletextDocument; }
|
TeletextDocument* document() const { return m_teletextDocument; }
|
||||||
TeletextPageDecode *pageDecode() { return &m_pageDecode; }
|
TeletextPageDecode *pageDecode() { return &m_pageDecode; }
|
||||||
@@ -64,18 +64,18 @@ signals:
|
|||||||
public slots:
|
public slots:
|
||||||
void subPageSelected();
|
void subPageSelected();
|
||||||
void refreshPage();
|
void refreshPage();
|
||||||
void setReveal(bool);
|
void setReveal(bool reveal);
|
||||||
void setMix(bool);
|
void setMix(bool mix);
|
||||||
void setShowControlCodes(bool);
|
void setShowControlCodes(bool showControlCodes);
|
||||||
void updateFlashTimer(int);
|
void updateFlashTimer(int newFlashTimer);
|
||||||
void pauseFlash(bool);
|
void pauseFlash(bool pauseNow);
|
||||||
void refreshRow(int);
|
void refreshRow(int rowChanged);
|
||||||
|
|
||||||
void setControlBit(int, bool);
|
void setControlBit(int bitNumber, bool active);
|
||||||
void setDefaultCharSet(int);
|
void setDefaultCharSet(int newDefaultCharSet);
|
||||||
void setDefaultNOS(int);
|
void setDefaultNOS(int newDefaultNOS);
|
||||||
void setSidePanelWidths(int, int);
|
void setSidePanelWidths(int newLeftSidePanelColumns, int newRightSidePanelColumns);
|
||||||
void setSidePanelAtL35Only(bool);
|
void setSidePanelAtL35Only(bool newSidePanelAtL35Only);
|
||||||
|
|
||||||
void cut();
|
void cut();
|
||||||
void copy();
|
void copy();
|
||||||
@@ -105,7 +105,7 @@ private:
|
|||||||
void timerEvent(QTimerEvent *event) override;
|
void timerEvent(QTimerEvent *event) override;
|
||||||
void selectionToClipboard();
|
void selectionToClipboard();
|
||||||
|
|
||||||
QPair<int, int> mouseToRowAndColumn(const QPoint &);
|
QPair<int, int> mouseToRowAndColumn(const QPoint &mousePosition);
|
||||||
};
|
};
|
||||||
|
|
||||||
class LevelOneScene : public QGraphicsScene
|
class LevelOneScene : public QGraphicsScene
|
||||||
@@ -113,27 +113,27 @@ class LevelOneScene : public QGraphicsScene
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
LevelOneScene(QWidget *, QObject *parent = nullptr);
|
LevelOneScene(QWidget *levelOneWidget, QObject *parent = nullptr);
|
||||||
void setBorderDimensions(int, int, int, int, int);
|
void setBorderDimensions(int sceneWidth, int sceneHeight, int widgetWidth, int leftSidePanelColumns, int rightSidePanelColumns);
|
||||||
QGraphicsRectItem *cursorRectItem() const { return m_cursorRectItem; }
|
QGraphicsRectItem *cursorRectItem() const { return m_cursorRectItem; }
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void updateCursor();
|
void updateCursor();
|
||||||
void updateSelection();
|
void updateSelection();
|
||||||
void setMix(bool);
|
void setMix(bool mix);
|
||||||
void toggleGrid(bool);
|
void toggleGrid(bool gridOn);
|
||||||
void hideGUIElements(bool);
|
void hideGUIElements(bool hidden);
|
||||||
void setFullScreenColour(const QColor &);
|
void setFullScreenColour(const QColor &newColor);
|
||||||
void setFullRowColour(int, const QColor &);
|
void setFullRowColour(int row, const QColor &newColor);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void mouseZoomIn();
|
void mouseZoomIn();
|
||||||
void mouseZoomOut();
|
void mouseZoomOut();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool eventFilter(QObject *, QEvent *);
|
bool eventFilter(QObject *object, QEvent *event);
|
||||||
void keyPressEvent(QKeyEvent *);
|
void keyPressEvent(QKeyEvent *event);
|
||||||
void keyReleaseEvent(QKeyEvent *);
|
void keyReleaseEvent(QKeyEvent *keyEvent);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QGraphicsRectItem *m_fullScreenTopRectItem, *m_fullScreenBottomRectItem;
|
QGraphicsRectItem *m_fullScreenTopRectItem, *m_fullScreenBottomRectItem;
|
||||||
|
|||||||
12
mainwindow.h
12
mainwindow.h
@@ -61,7 +61,7 @@ private slots:
|
|||||||
bool saveAs();
|
bool saveAs();
|
||||||
void reload();
|
void reload();
|
||||||
void exportAuto();
|
void exportAuto();
|
||||||
void exportT42(bool);
|
void exportT42(bool fromAuto);
|
||||||
void exportZXNet();
|
void exportZXNet();
|
||||||
void exportEditTF();
|
void exportEditTF();
|
||||||
void exportPNG();
|
void exportPNG();
|
||||||
@@ -73,15 +73,15 @@ private slots:
|
|||||||
void updatePageWidgets();
|
void updatePageWidgets();
|
||||||
void updateCursorPosition();
|
void updateCursorPosition();
|
||||||
|
|
||||||
void insertRow(bool);
|
void insertRow(bool copyRow);
|
||||||
void deleteRow();
|
void deleteRow();
|
||||||
void insertSubPage(bool, bool);
|
void insertSubPage(bool afterCurrentSubPage, bool copyCurrentSubPage);
|
||||||
void deleteSubPage();
|
void deleteSubPage();
|
||||||
|
|
||||||
void setSceneDimensions();
|
void setSceneDimensions();
|
||||||
void setBorder(int);
|
void setBorder(int newViewBorder);
|
||||||
void setAspectRatio(int);
|
void setAspectRatio(int newViewAspectRatio);
|
||||||
void setSmoothTransform(bool);
|
void setSmoothTransform(bool smoothTransform);
|
||||||
void zoomIn();
|
void zoomIn();
|
||||||
void zoomOut();
|
void zoomOut();
|
||||||
void zoomReset();
|
void zoomReset();
|
||||||
|
|||||||
10
pagebase.h
10
pagebase.h
@@ -35,17 +35,17 @@ public:
|
|||||||
|
|
||||||
virtual bool isEmpty() const;
|
virtual bool isEmpty() const;
|
||||||
|
|
||||||
virtual QByteArray packet(int) const;
|
virtual QByteArray packet(int i) const;
|
||||||
virtual QByteArray packet(int, int) const;
|
virtual QByteArray packet(int i, int j) const;
|
||||||
virtual bool packetExists(int i) const { return m_displayPackets[i] != nullptr; }
|
virtual bool packetExists(int i) const { return m_displayPackets[i] != nullptr; }
|
||||||
virtual bool packetExists(int i, int j) const { return m_designationPackets[i-26][j] != nullptr; }
|
virtual bool packetExists(int i, int j) const { return m_designationPackets[i-26][j] != nullptr; }
|
||||||
virtual bool setPacket(int, QByteArray);
|
virtual bool setPacket(int i, QByteArray packetContents);
|
||||||
virtual bool setPacket(int, int, QByteArray);
|
virtual bool setPacket(int i, int j, QByteArray packetContents);
|
||||||
// bool deletePacket(int);
|
// bool deletePacket(int);
|
||||||
// bool deletePacket(int, int);
|
// bool deletePacket(int, int);
|
||||||
|
|
||||||
virtual bool controlBit(int bitNumber) const { return m_controlBits[bitNumber]; }
|
virtual bool controlBit(int bitNumber) const { return m_controlBits[bitNumber]; }
|
||||||
virtual bool setControlBit(int, bool);
|
virtual bool setControlBit(int bitNumber, bool active);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_controlBits[11];
|
bool m_controlBits[11];
|
||||||
|
|||||||
@@ -38,8 +38,8 @@ public:
|
|||||||
void updateWidgets();
|
void updateWidgets();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void setComposeLinkPageNumber(int, const QString &);
|
void setComposeLinkPageNumber(int linkNumber, const QString &newPageNumberString);
|
||||||
void setComposeLinkSubPageNumbers(int, const QString &);
|
void setComposeLinkSubPageNumbers(int linkNumber, const QString &newSubPagesString);
|
||||||
|
|
||||||
TeletextWidget *m_parentMainWidget;
|
TeletextWidget *m_parentMainWidget;
|
||||||
QCheckBox *m_composeLinkLevelCheckbox[4][2]; // For links 0-3
|
QCheckBox *m_composeLinkLevelCheckbox[4][2]; // For links 0-3
|
||||||
|
|||||||
@@ -36,8 +36,8 @@ public:
|
|||||||
void updateWidgets();
|
void updateWidgets();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void setLeftSidePanelWidth(int);
|
void setLeftSidePanelWidth(int newLeftPanelSize);
|
||||||
void setRightSidePanelWidth(int);
|
void setRightSidePanelWidth(int newRightPanelSize);
|
||||||
|
|
||||||
TeletextWidget *m_parentMainWidget;
|
TeletextWidget *m_parentMainWidget;
|
||||||
QComboBox *m_defaultScreenColourCombo, *m_defaultRowColourCombo, *m_colourTableCombo;
|
QComboBox *m_defaultScreenColourCombo, *m_defaultRowColourCombo, *m_colourTableCombo;
|
||||||
|
|||||||
@@ -48,8 +48,8 @@ private:
|
|||||||
|
|
||||||
QRegularExpressionValidator *m_pageNumberValidator;
|
QRegularExpressionValidator *m_pageNumberValidator;
|
||||||
|
|
||||||
void addRegionList(QComboBox *);
|
void addRegionList(QComboBox *regionCombo);
|
||||||
void setFastTextLinkPageNumber(int, const QString &);
|
void setFastTextLinkPageNumber(int linkNumber, const QString &pageNumberString);
|
||||||
void setDefaultRegion();
|
void setDefaultRegion();
|
||||||
void setDefaultNOS();
|
void setDefaultNOS();
|
||||||
void setSecondRegion();
|
void setSecondRegion();
|
||||||
|
|||||||
@@ -35,8 +35,8 @@ public:
|
|||||||
virtual int maxEnhancements() const =0;
|
virtual int maxEnhancements() const =0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QByteArray packetFromEnhancementList(int) const;
|
QByteArray packetFromEnhancementList(int packetNumber) const;
|
||||||
void setEnhancementListFromPacket(int, QByteArray);
|
void setEnhancementListFromPacket(int packetNumber, QByteArray packetContents);
|
||||||
bool packetFromEnhancementListNeeded(int n) const { return ((m_enhancements.size()+12) / 13) > n; };
|
bool packetFromEnhancementListNeeded(int n) const { return ((m_enhancements.size()+12) / 13) > n; };
|
||||||
|
|
||||||
X26TripletList m_enhancements;
|
X26TripletList m_enhancements;
|
||||||
|
|||||||
@@ -35,19 +35,19 @@ public:
|
|||||||
void updateAllColourButtons();
|
void updateAllColourButtons();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void updateColourButton(int);
|
void updateColourButton(int colourIndex);
|
||||||
void setLevel3p5Accepted(bool);
|
void setLevel3p5Accepted(bool b);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void showEvent(QShowEvent *);
|
void showEvent(QShowEvent *event);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void selectColour(int);
|
void selectColour(int colourIndex);
|
||||||
void setLevel3p5Seen(bool);
|
void setLevel3p5Seen(bool b);
|
||||||
void updateLevel3p5Cursor();
|
void updateLevel3p5Cursor();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void resetCLUT(int);
|
void resetCLUT(int colourTable);
|
||||||
|
|
||||||
QPushButton *m_colourButton[32], *m_resetButton[4];
|
QPushButton *m_colourButton[32], *m_resetButton[4];
|
||||||
QCheckBox *m_showHexValuesCheckBox;
|
QCheckBox *m_showHexValuesCheckBox;
|
||||||
|
|||||||
12
render.h
12
render.h
@@ -48,18 +48,18 @@ public:
|
|||||||
|
|
||||||
QPixmap* pagePixmap(int i) const { return m_pagePixmap[i]; };
|
QPixmap* pagePixmap(int i) const { return m_pagePixmap[i]; };
|
||||||
bool mix() const { return m_mix; };
|
bool mix() const { return m_mix; };
|
||||||
void setDecoder(TeletextPageDecode *);
|
void setDecoder(TeletextPageDecode *decoder);
|
||||||
void renderPage(bool force=false);
|
void renderPage(bool force=false);
|
||||||
bool showControlCodes() const { return m_showControlCodes; };
|
bool showControlCodes() const { return m_showControlCodes; };
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void colourChanged(int);
|
void colourChanged(int index);
|
||||||
void setReveal(bool);
|
void setReveal(bool reveal);
|
||||||
void setMix(bool);
|
void setMix(bool mix);
|
||||||
void setShowControlCodes(bool);
|
void setShowControlCodes(bool showControlCodes);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void flashChanged(int);
|
void flashChanged(int newFlashHz);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
TeletextFontBitmap m_fontBitmap;
|
TeletextFontBitmap m_fontBitmap;
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
class InsertTripletCommand : public QUndoCommand
|
class InsertTripletCommand : public QUndoCommand
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
InsertTripletCommand(TeletextDocument *, X26Model *, int, int, const X26Triplet, QUndoCommand *parent = 0);
|
InsertTripletCommand(TeletextDocument *teletextDocument, X26Model *x26Model, int row, int count, const X26Triplet newTriplet, QUndoCommand *parent = 0);
|
||||||
|
|
||||||
void redo() override;
|
void redo() override;
|
||||||
void undo() override;
|
void undo() override;
|
||||||
@@ -45,7 +45,7 @@ private:
|
|||||||
class DeleteTripletCommand : public QUndoCommand
|
class DeleteTripletCommand : public QUndoCommand
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DeleteTripletCommand(TeletextDocument *, X26Model *, int, int, QUndoCommand *parent = 0);
|
DeleteTripletCommand(TeletextDocument *teletextDocument, X26Model *x26Model, int row, int count, QUndoCommand *parent = 0);
|
||||||
|
|
||||||
void redo() override;
|
void redo() override;
|
||||||
void undo() override;
|
void undo() override;
|
||||||
@@ -63,7 +63,7 @@ public:
|
|||||||
enum { Id = 201 };
|
enum { Id = 201 };
|
||||||
enum EditTripletEnum { ETaddress, ETmode, ETdata };
|
enum EditTripletEnum { ETaddress, ETmode, ETdata };
|
||||||
|
|
||||||
EditTripletCommand(TeletextDocument *, X26Model *, int, int, int, int, int, QUndoCommand *parent = 0);
|
EditTripletCommand(TeletextDocument *teletextDocument, X26Model *x26Model, int row, int tripletPart, int bitsToKeep, int newValue, int role, QUndoCommand *parent = 0);
|
||||||
|
|
||||||
void redo() override;
|
void redo() override;
|
||||||
void undo() override;
|
void undo() override;
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ public:
|
|||||||
|
|
||||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||||
void setCharacterSet(int);
|
void setCharacterSet(int characterSet);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
TeletextFontBitmap m_fontBitmap;
|
TeletextFontBitmap m_fontBitmap;
|
||||||
@@ -61,24 +61,24 @@ public:
|
|||||||
X26DockWidget(TeletextWidget *parent);
|
X26DockWidget(TeletextWidget *parent);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void insertTriplet(int, bool);
|
void insertTriplet(int modeExt, bool after);
|
||||||
void insertTripletCopy();
|
void insertTripletCopy();
|
||||||
void deleteTriplet();
|
void deleteTriplet();
|
||||||
void customMenuRequested(QPoint pos);
|
void customMenuRequested(QPoint pos);
|
||||||
void loadX26List();
|
void loadX26List();
|
||||||
void unloadX26List();
|
void unloadX26List();
|
||||||
void rowSelected(const QModelIndex &, const QModelIndex &);
|
void rowSelected(const QModelIndex ¤t, const QModelIndex &previous);
|
||||||
void updateAllRawTripletSpinBoxes(const QModelIndex &);
|
void updateAllRawTripletSpinBoxes(const QModelIndex &index);
|
||||||
void updateRawTripletDataSpinBox(const QModelIndex &);
|
void updateRawTripletDataSpinBox(const QModelIndex &index);
|
||||||
void updateAllCookedTripletWidgets(const QModelIndex &);
|
void updateAllCookedTripletWidgets(const QModelIndex & index);
|
||||||
void rawTripletAddressSpinBoxChanged(int);
|
void rawTripletAddressSpinBoxChanged(int value);
|
||||||
void rawTripletModeSpinBoxChanged(int);
|
void rawTripletModeSpinBoxChanged(int value);
|
||||||
void rawTripletDataSpinBoxChanged(int);
|
void rawTripletDataSpinBoxChanged(int value);
|
||||||
void cookedRowSpinBoxChanged(const int);
|
void cookedRowSpinBoxChanged(const int value);
|
||||||
void cookedColumnSpinBoxChanged(const int);
|
void cookedColumnSpinBoxChanged(const int value);
|
||||||
void cookedModeMenuSelected(const int);
|
void cookedModeMenuSelected(const int value);
|
||||||
void updateModelFromCookedWidget(const int, const int);
|
void updateModelFromCookedWidget(const int value, const int role);
|
||||||
void selectX26ListRow(int);
|
void selectX26ListRow(int row);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void keyPressEvent(QKeyEvent *event) override;
|
void keyPressEvent(QKeyEvent *event) override;
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ class X26Model : public QAbstractListModel
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
X26Model(TeletextWidget *parent);
|
X26Model(TeletextWidget *parent);
|
||||||
void setX26ListLoaded(bool);
|
void setX26ListLoaded(bool newListLoaded);
|
||||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override ;
|
int rowCount(const QModelIndex &parent = QModelIndex()) const override ;
|
||||||
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
|
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public:
|
|||||||
|
|
||||||
// X26Triplet &operator=(const X26Triplet &other);
|
// X26Triplet &operator=(const X26Triplet &other);
|
||||||
|
|
||||||
X26Triplet(int, int, int);
|
X26Triplet(int address, int mode, int data);
|
||||||
|
|
||||||
int address() const { return m_address; }
|
int address() const { return m_address; }
|
||||||
int mode() const { return m_mode; }
|
int mode() const { return m_mode; }
|
||||||
@@ -44,20 +44,20 @@ public:
|
|||||||
int addressColumn() const { return (m_address); }
|
int addressColumn() const { return (m_address); }
|
||||||
bool isRowTriplet() const { return (m_address >= 40); }
|
bool isRowTriplet() const { return (m_address >= 40); }
|
||||||
|
|
||||||
void setAddress(int);
|
void setAddress(int address);
|
||||||
void setMode(int);
|
void setMode(int mode);
|
||||||
void setData(int);
|
void setData(int data);
|
||||||
void setAddressRow(int);
|
void setAddressRow(int addressRow);
|
||||||
void setAddressColumn(int);
|
void setAddressColumn(int addressColumn);
|
||||||
|
|
||||||
int objectSource() const { return (m_address & 0x18) >> 3; }
|
int objectSource() const { return (m_address & 0x18) >> 3; }
|
||||||
|
|
||||||
int objectLocalDesignationCode() const { return (((m_address & 0x01) << 3) | (m_data >> 4)); }
|
int objectLocalDesignationCode() const { return (((m_address & 0x01) << 3) | (m_data >> 4)); }
|
||||||
int objectLocalTripletNumber() const { return m_data & 0x0f; }
|
int objectLocalTripletNumber() const { return m_data & 0x0f; }
|
||||||
int objectLocalIndex() const { return objectLocalDesignationCode() * 13 + objectLocalTripletNumber(); }
|
int objectLocalIndex() const { return objectLocalDesignationCode() * 13 + objectLocalTripletNumber(); }
|
||||||
void setObjectLocalDesignationCode(int);
|
void setObjectLocalDesignationCode(int i);
|
||||||
void setObjectLocalTripletNumber(int);
|
void setObjectLocalTripletNumber(int i);
|
||||||
void setObjectLocalIndex(int);
|
void setObjectLocalIndex(int i);
|
||||||
|
|
||||||
int activePositionRow() const { return m_activePositionRow; }
|
int activePositionRow() const { return m_activePositionRow; }
|
||||||
int activePositionColumn() const { return m_activePositionColumn; }
|
int activePositionColumn() const { return m_activePositionColumn; }
|
||||||
@@ -85,10 +85,10 @@ private:
|
|||||||
class X26TripletList
|
class X26TripletList
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void append(const X26Triplet &);
|
void append(const X26Triplet &value);
|
||||||
void insert(int, const X26Triplet &);
|
void insert(int i, const X26Triplet &value);
|
||||||
void removeAt(int);
|
void removeAt(int i);
|
||||||
void replace(int, const X26Triplet &);
|
void replace(int i, const X26Triplet &value);
|
||||||
|
|
||||||
void removeLast() { m_list.removeLast(); }
|
void removeLast() { m_list.removeLast(); }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user