Compare commits
3 Commits
0.7-beta
...
0.7.1-beta
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
42176f2fc0 | ||
|
|
b937102139 | ||
|
|
df1122f621 |
@@ -33,6 +33,7 @@ LevelOnePage::LevelOnePage()
|
|||||||
clearPage();
|
clearPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// BUG this copy constructor isn't used? Parameter should be LevelOnePage
|
||||||
LevelOnePage::LevelOnePage(const PageBase &other)
|
LevelOnePage::LevelOnePage(const PageBase &other)
|
||||||
{
|
{
|
||||||
m_enhancements.reserve(maxEnhancements());
|
m_enhancements.reserve(maxEnhancements());
|
||||||
@@ -186,7 +187,9 @@ bool LevelOnePage::setPacket(int packetNumber, QByteArray packetContents)
|
|||||||
}
|
}
|
||||||
|
|
||||||
qDebug("LevelOnePage unhandled setPacket X/%d", packetNumber);
|
qDebug("LevelOnePage unhandled setPacket X/%d", packetNumber);
|
||||||
return PageBase::setPacket(packetNumber, packetContents);
|
// BUG can't store unhandled packets as default copy constructor uses pointers
|
||||||
|
//return PageBase::setPacket(packetNumber, packetContents);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LevelOnePage::setPacket(int packetNumber, int designationCode, QByteArray packetContents)
|
bool LevelOnePage::setPacket(int packetNumber, int designationCode, QByteArray packetContents)
|
||||||
@@ -253,7 +256,9 @@ bool LevelOnePage::setPacket(int packetNumber, int designationCode, QByteArray p
|
|||||||
}
|
}
|
||||||
|
|
||||||
qDebug("LevelOnePage unhandled setPacket X/%d/%d", packetNumber, designationCode);
|
qDebug("LevelOnePage unhandled setPacket X/%d/%d", packetNumber, designationCode);
|
||||||
return PageBase::setPacket(packetNumber, designationCode, packetContents);
|
// BUG can't store unhandled packets as default copy constructor uses pointers
|
||||||
|
//return PageBase::setPacket(packetNumber, designationCode, packetContents);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LevelOnePage::packetExists(int packetNumber) const
|
bool LevelOnePage::packetExists(int packetNumber) const
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ public:
|
|||||||
enum CycleTypeEnum { CTcycles, CTseconds };
|
enum CycleTypeEnum { CTcycles, CTseconds };
|
||||||
|
|
||||||
LevelOnePage();
|
LevelOnePage();
|
||||||
|
// BUG this copy constructor isn't used? Parameter should be LevelOnePage
|
||||||
LevelOnePage(const PageBase &other);
|
LevelOnePage(const PageBase &other);
|
||||||
|
|
||||||
bool isEmpty() const override;
|
bool isEmpty() const override;
|
||||||
@@ -52,7 +53,7 @@ public:
|
|||||||
|
|
||||||
void clearPage();
|
void clearPage();
|
||||||
|
|
||||||
int maxEnhancements() const { return 208; };
|
int maxEnhancements() const override { return 208; };
|
||||||
|
|
||||||
/* void setSubPageNumber(int); */
|
/* void setSubPageNumber(int); */
|
||||||
int cycleValue() const { return m_cycleValue; };
|
int cycleValue() const { return m_cycleValue; };
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ int main(int argc, char *argv[])
|
|||||||
QApplication::setApplicationDisplayName(QApplication::applicationName());
|
QApplication::setApplicationDisplayName(QApplication::applicationName());
|
||||||
QApplication::setOrganizationName("gkmac.co.uk");
|
QApplication::setOrganizationName("gkmac.co.uk");
|
||||||
QApplication::setOrganizationDomain("gkmac.co.uk");
|
QApplication::setOrganizationDomain("gkmac.co.uk");
|
||||||
QApplication::setApplicationVersion("0.7-beta");
|
QApplication::setApplicationVersion("0.7.1-beta");
|
||||||
QCommandLineParser parser;
|
QCommandLineParser parser;
|
||||||
parser.setApplicationDescription(QApplication::applicationName());
|
parser.setApplicationDescription(QApplication::applicationName());
|
||||||
parser.addHelpOption();
|
parser.addHelpOption();
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ public:
|
|||||||
|
|
||||||
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 *event);
|
void inputMethodEvent(QInputMethodEvent *event) override;
|
||||||
|
|
||||||
TeletextDocument* document() const { return m_teletextDocument; }
|
TeletextDocument* document() const { return m_teletextDocument; }
|
||||||
TeletextPageDecode *pageDecode() { return &m_pageDecode; }
|
TeletextPageDecode *pageDecode() { return &m_pageDecode; }
|
||||||
|
|||||||
@@ -264,7 +264,7 @@ void MainWindow::exportImage()
|
|||||||
QImage scaledImage[6];
|
QImage scaledImage[6];
|
||||||
|
|
||||||
for (int p=0; p<6; p++)
|
for (int p=0; p<6; p++)
|
||||||
if (!interImage[p].isNull())
|
if (!interImage[p].isNull()) {
|
||||||
if (m_viewAspectRatio == 3)
|
if (m_viewAspectRatio == 3)
|
||||||
// Aspect ratio is Pixel 1:2 so we only need to double the vertical height
|
// Aspect ratio is Pixel 1:2 so we only need to double the vertical height
|
||||||
scaledImage[p] = interImage[p].scaled(interImage[p].width(), interImage[p].height()*2, Qt::IgnoreAspectRatio, Qt::FastTransformation);
|
scaledImage[p] = interImage[p].scaled(interImage[p].width(), interImage[p].height()*2, Qt::IgnoreAspectRatio, Qt::FastTransformation);
|
||||||
@@ -276,6 +276,7 @@ void MainWindow::exportImage()
|
|||||||
// Don't smooth GIF as it's bound to break the 256 colour limit
|
// Don't smooth GIF as it's bound to break the 256 colour limit
|
||||||
scaledImage[p] = doubleHeightImage.scaled((int)((float)doubleHeightImage.width() * aspectRatioHorizontalScaling[m_viewAspectRatio] * 2), doubleHeightImage.height(), Qt::IgnoreAspectRatio, (suffix == "gif") ? Qt::FastTransformation : Qt::SmoothTransformation);
|
scaledImage[p] = doubleHeightImage.scaled((int)((float)doubleHeightImage.width() * aspectRatioHorizontalScaling[m_viewAspectRatio] * 2), doubleHeightImage.height(), Qt::IgnoreAspectRatio, (suffix == "gif") ? Qt::FastTransformation : Qt::SmoothTransformation);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (suffix == "png") {
|
if (suffix == "png") {
|
||||||
if (scaledImage[0].save(exportFileName, "PNG"))
|
if (scaledImage[0].save(exportFileName, "PNG"))
|
||||||
|
|||||||
@@ -35,11 +35,11 @@ public:
|
|||||||
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;
|
||||||
bool setData(const QModelIndex &index, const QVariant &value, int role);
|
bool setData(const QModelIndex &index, const QVariant &value, int role) override;
|
||||||
QVariant headerData(int section, Qt::Orientation orientation, int role) const;
|
QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
|
||||||
bool insertRows(int position, int rows, const QModelIndex &parent);
|
bool insertRows(int position, int rows, const QModelIndex &parent) override;
|
||||||
bool insertRows(int position, int rows, const QModelIndex &parent, X26Triplet triplet);
|
bool insertRows(int position, int rows, const QModelIndex &parent, X26Triplet triplet);
|
||||||
bool removeRows(int position, int rows, const QModelIndex &index);
|
bool removeRows(int position, int rows, const QModelIndex &index) override;
|
||||||
// Qt::ItemFlags flags(const QModelIndex &index) const;
|
// Qt::ItemFlags flags(const QModelIndex &index) const;
|
||||||
|
|
||||||
// The x26commands classes manipulate the model but beginInsertRows and endInsertRows
|
// The x26commands classes manipulate the model but beginInsertRows and endInsertRows
|
||||||
|
|||||||
Reference in New Issue
Block a user