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