Port from QVector to QList
This commit is contained in:
@@ -52,7 +52,7 @@ void ClutModel::setSubPage(LevelOnePage *subPage)
|
|||||||
{
|
{
|
||||||
if (subPage != m_subPage) {
|
if (subPage != m_subPage) {
|
||||||
m_subPage = subPage;
|
m_subPage = subPage;
|
||||||
emit dataChanged(createIndex(0, 0), createIndex(31, 0), QVector<int>(Qt::DecorationRole));
|
emit dataChanged(createIndex(0, 0), createIndex(31, 0), QList<int>(Qt::DecorationRole));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ inline void TeletextPageRender::drawCharacter(QPainter &painter, int r, int c, u
|
|||||||
else if ((m_decoder->cellBold(r, c) || m_decoder->cellItalic(r, c)) && characterSet < 24)
|
else if ((m_decoder->cellBold(r, c) || m_decoder->cellItalic(r, c)) && characterSet < 24)
|
||||||
drawBoldOrItalicCharacter(painter, r, c, characterCode, characterSet, characterFragment);
|
drawBoldOrItalicCharacter(painter, r, c, characterCode, characterSet, characterFragment);
|
||||||
else {
|
else {
|
||||||
m_fontBitmap.image()->setColorTable(QVector<QRgb>{m_backgroundQColor.rgba(), m_foregroundQColor.rgba()});
|
m_fontBitmap.image()->setColorTable(QList<QRgb>{m_backgroundQColor.rgba(), m_foregroundQColor.rgba()});
|
||||||
drawFromFontBitmap(painter, r, c, characterCode, characterSet, characterFragment);
|
drawFromFontBitmap(painter, r, c, characterCode, characterSet, characterFragment);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -185,7 +185,7 @@ inline void TeletextPageRender::drawCharacter(QPainter &painter, int r, int c, u
|
|||||||
|
|
||||||
if (characterDiacritical != 0) {
|
if (characterDiacritical != 0) {
|
||||||
painter.setCompositionMode(QPainter::CompositionMode_SourceOver);
|
painter.setCompositionMode(QPainter::CompositionMode_SourceOver);
|
||||||
m_fontBitmap.image()->setColorTable(QVector<QRgb>{0x00000000, m_foregroundQColor.rgba()});
|
m_fontBitmap.image()->setColorTable(QList<QRgb>{0x00000000, m_foregroundQColor.rgba()});
|
||||||
drawFromFontBitmap(painter, r, c, characterDiacritical+64, 7, characterFragment);
|
drawFromFontBitmap(painter, r, c, characterDiacritical+64, 7, characterFragment);
|
||||||
painter.setCompositionMode(QPainter::CompositionMode_Source);
|
painter.setCompositionMode(QPainter::CompositionMode_Source);
|
||||||
}
|
}
|
||||||
@@ -196,8 +196,8 @@ inline void TeletextPageRender::drawBoldOrItalicCharacter(QPainter &painter, int
|
|||||||
QImage styledImage = QImage(12, 10, QImage::Format_Mono);
|
QImage styledImage = QImage(12, 10, QImage::Format_Mono);
|
||||||
QPainter styledPainter;
|
QPainter styledPainter;
|
||||||
|
|
||||||
m_fontBitmap.image()->setColorTable(QVector<QRgb>{m_backgroundQColor.rgba(), m_foregroundQColor.rgba()});
|
m_fontBitmap.image()->setColorTable(QList<QRgb>{m_backgroundQColor.rgba(), m_foregroundQColor.rgba()});
|
||||||
styledImage.setColorTable(QVector<QRgb>{m_backgroundQColor.rgba(), m_foregroundQColor.rgba()});
|
styledImage.setColorTable(QList<QRgb>{m_backgroundQColor.rgba(), m_foregroundQColor.rgba()});
|
||||||
|
|
||||||
if (m_decoder->cellItalic(r, c)) {
|
if (m_decoder->cellItalic(r, c)) {
|
||||||
styledImage.fill(0);
|
styledImage.fill(0);
|
||||||
@@ -217,7 +217,7 @@ inline void TeletextPageRender::drawBoldOrItalicCharacter(QPainter &painter, int
|
|||||||
boldeningImage = styledImage.copy();
|
boldeningImage = styledImage.copy();
|
||||||
styledPainter.begin(&styledImage);
|
styledPainter.begin(&styledImage);
|
||||||
styledPainter.setCompositionMode(QPainter::CompositionMode_SourceOver);
|
styledPainter.setCompositionMode(QPainter::CompositionMode_SourceOver);
|
||||||
boldeningImage.setColorTable(QVector<QRgb>{0x00000000, m_foregroundQColor.rgba()});
|
boldeningImage.setColorTable(QList<QRgb>{0x00000000, m_foregroundQColor.rgba()});
|
||||||
styledPainter.drawImage(1, 0, boldeningImage);
|
styledPainter.drawImage(1, 0, boldeningImage);
|
||||||
styledPainter.end();
|
styledPainter.end();
|
||||||
}
|
}
|
||||||
@@ -324,7 +324,7 @@ void TeletextPageRender::renderRow(int r, int ph, bool force)
|
|||||||
|
|
||||||
if (m_showControlCodes && c < 40 && m_decoder->teletextPage()->character(r, c) < 0x20) {
|
if (m_showControlCodes && c < 40 && m_decoder->teletextPage()->character(r, c) < 0x20) {
|
||||||
painter.setCompositionMode(QPainter::CompositionMode_SourceOver);
|
painter.setCompositionMode(QPainter::CompositionMode_SourceOver);
|
||||||
m_fontBitmap.image()->setColorTable(QVector<QRgb>{0x7f000000, 0xe0ffffff});
|
m_fontBitmap.image()->setColorTable(QList<QRgb>{0x7f000000, 0xe0ffffff});
|
||||||
painter.drawImage(c*12, r*10, *m_fontBitmap.image(), (m_decoder->teletextPage()->character(r, c)+32)*12, 250, 12, 10);
|
painter.drawImage(c*12, r*10, *m_fontBitmap.image(), (m_decoder->teletextPage()->character(r, c)+32)*12, 250, 12, 10);
|
||||||
painter.setCompositionMode(QPainter::CompositionMode_Source);
|
painter.setCompositionMode(QPainter::CompositionMode_Source);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -810,7 +810,7 @@ PasteCommand::PasteCommand(TeletextDocument *teletextDocument, int pageCharSet,
|
|||||||
imageData.convertTo(QImage::Format_MonoLSB);
|
imageData.convertTo(QImage::Format_MonoLSB);
|
||||||
else
|
else
|
||||||
// Only pure black and white images convert reliably this way...
|
// Only pure black and white images convert reliably this way...
|
||||||
imageData = imageData.convertToFormat(QImage::Format_MonoLSB, QVector<QRgb>{0x000000ff, 0xffffffff});
|
imageData = imageData.convertToFormat(QImage::Format_MonoLSB, QList<QRgb>{0x000000ff, 0xffffffff});
|
||||||
|
|
||||||
for (int r=0; r<m_clipboardDataHeight; r++)
|
for (int r=0; r<m_clipboardDataHeight; r++)
|
||||||
m_pastingCharacters.append(QByteArray(m_clipboardDataWidth, 0x00));
|
m_pastingCharacters.append(QByteArray(m_clipboardDataWidth, 0x00));
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ void CharacterListModel::setCharacterSet(int characterSet)
|
|||||||
if (characterSet != m_characterSet || m_mosaic) {
|
if (characterSet != m_characterSet || m_mosaic) {
|
||||||
m_characterSet = characterSet;
|
m_characterSet = characterSet;
|
||||||
m_mosaic = false;
|
m_mosaic = false;
|
||||||
emit dataChanged(createIndex(0, 0), createIndex(95, 0), QVector<int>(Qt::DecorationRole));
|
emit dataChanged(createIndex(0, 0), createIndex(95, 0), QList<int>(Qt::DecorationRole));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,7 +83,7 @@ void CharacterListModel::setG1AndBlastCharacterSet(int characterSet)
|
|||||||
if (characterSet != m_characterSet || !m_mosaic) {
|
if (characterSet != m_characterSet || !m_mosaic) {
|
||||||
m_characterSet = characterSet;
|
m_characterSet = characterSet;
|
||||||
m_mosaic = true;
|
m_mosaic = true;
|
||||||
emit dataChanged(createIndex(0, 0), createIndex(95, 0), QVector<int>(Qt::DecorationRole));
|
emit dataChanged(createIndex(0, 0), createIndex(95, 0), QList<int>(Qt::DecorationRole));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user