summaryrefslogtreecommitdiffstats
path: root/asciiquarium/src/frame.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'asciiquarium/src/frame.cpp')
-rw-r--r--asciiquarium/src/frame.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/asciiquarium/src/frame.cpp b/asciiquarium/src/frame.cpp
index da0d006f..9f73e1fe 100644
--- a/asciiquarium/src/frame.cpp
+++ b/asciiquarium/src/frame.cpp
@@ -28,12 +28,12 @@
#include <kglobalsettings.h>
#include <kdebug.h>
-#include <qvaluevector.h>
-#include <qstringlist.h>
-#include <qimage.h>
-#include <qfontmetrics.h>
-#include <qpainter.h>
-#include <qbitmap.h>
+#include <ntqvaluevector.h>
+#include <ntqstringlist.h>
+#include <ntqimage.h>
+#include <ntqfontmetrics.h>
+#include <ntqpainter.h>
+#include <ntqbitmap.h>
#include "frame.h"
@@ -45,22 +45,22 @@ void Frame::convertDataToPixmap(const Screen *screen)
}
int w = screen->cellWidth(), h = screen->cellHeight();
- QPixmap pix(width() * w, height() * h);
+ TQPixmap pix(width() * w, height() * h);
pix.fill();
- QBitmap mask(pix.size(), true);
+ TQBitmap mask(pix.size(), true);
- QPainter p, p2;
+ TQPainter p, p2;
p.begin(&pix, true);
p2.begin(&mask, true);
p.setFont(KGlobalSettings::fixedFont());
- QFontMetrics fm(p.font());
+ TQFontMetrics fm(p.font());
int leadHeight = fm.leading() + fm.descent();
for(unsigned j = 0; j < m_data.count(); ++j) {
- QValueVector<Screen::Pixel> row = m_data[j];
+ TQValueVector<Screen::Pixel> row = m_data[j];
if(row.isEmpty())
continue;
@@ -74,18 +74,18 @@ void Frame::convertDataToPixmap(const Screen *screen)
if(row[i].letter == m_transparentChar)
continue;
- p2.fillRect(i * w, j * h, w, h, Qt::color1);
+ p2.fillRect(i * w, j * h, w, h, TQt::color1);
p.setPen(row[i].color);
- p.fillRect(i * w, j * h, w, h, Qt::black);
- p.drawText(i * w, j * h + (h - 1 - leadHeight), QChar(row[i].letter));
+ p.fillRect(i * w, j * h, w, h, TQt::black);
+ p.drawText(i * w, j * h + (h - 1 - leadHeight), TQChar(row[i].letter));
}
}
pix.setMask(mask);
- QPixmap erase(pix);
- erase.fill(Qt::black);
+ TQPixmap erase(pix);
+ erase.fill(TQt::black);
erase.setMask(mask);
m_pixmap = pix;
@@ -95,18 +95,18 @@ void Frame::convertDataToPixmap(const Screen *screen)
m_data.clear();
}
-Frame::Frame (QString text, QString mask, QRgb defaultColor, QChar transparent)
+Frame::Frame (TQString text, TQString mask, TQRgb defaultColor, TQChar transparent)
{
//First, process the pixels.
- QStringList rows = QStringList::split('\n', text, true);
+ TQStringList rows = TQStringList::split('\n', text, true);
m_height = rows.size();
m_width = 0;
m_transparentChar = transparent;
- for (QStringList::iterator i = rows.begin(); i != rows.end(); ++i)
+ for (TQStringList::iterator i = rows.begin(); i != rows.end(); ++i)
{
- QValueVector<Screen::Pixel> row;
+ TQValueVector<Screen::Pixel> row;
for (int pos = 0; pos < (*i).length(); ++pos)
{
Screen::Pixel p;
@@ -115,14 +115,14 @@ Frame::Frame (QString text, QString mask, QRgb defaultColor, QChar transparent)
row.append(p);
}
- m_width = QMAX(m_width, row.size());
+ m_width = TQMAX(m_width, row.size());
m_data.append(row);
}
//Now, the colors.
- QStringList cols = QStringList::split('\n', mask, true);
+ TQStringList cols = TQStringList::split('\n', mask, true);
int y = 0;
- for (QStringList::iterator i = cols.begin(); i != cols.end(); ++i)
+ for (TQStringList::iterator i = cols.begin(); i != cols.end(); ++i)
{
if (y >= m_data.size())
break;
@@ -177,7 +177,7 @@ Frame::Frame (QString text, QString mask, QRgb defaultColor, QChar transparent)
case ' ':
break;
default:
- qDebug("dunno about color code:'%c'", (*i).at(pos).unicode());
+ tqDebug("dunno about color code:'%c'", (*i).at(pos).unicode());
m_data[y][pos].color = 0xFFFFFF;
}
}