summaryrefslogtreecommitdiffstats
path: root/asciiquarium
diff options
context:
space:
mode:
Diffstat (limited to 'asciiquarium')
-rw-r--r--asciiquarium/src/aasaver.cpp86
-rw-r--r--asciiquarium/src/aasaver.h8
-rw-r--r--asciiquarium/src/frame.cpp48
-rw-r--r--asciiquarium/src/frame.h16
-rw-r--r--asciiquarium/src/screen.cpp64
-rw-r--r--asciiquarium/src/screen.h26
-rw-r--r--asciiquarium/src/settingswidget.ui6
-rw-r--r--asciiquarium/src/sprite.cpp4
-rw-r--r--asciiquarium/src/sprite.h6
9 files changed, 132 insertions, 132 deletions
diff --git a/asciiquarium/src/aasaver.cpp b/asciiquarium/src/aasaver.cpp
index a85c7d19..984ca0ea 100644
--- a/asciiquarium/src/aasaver.cpp
+++ b/asciiquarium/src/aasaver.cpp
@@ -39,9 +39,9 @@
#include <klocale.h>
#include <kconfigdialog.h>
-#include <qdesktopwidget.h>
-#include <qpainter.h>
-#include <qbrush.h>
+#include <ntqdesktopwidget.h>
+#include <ntqpainter.h>
+#include <ntqbrush.h>
#include "screen.h"
#include "frame.h"
@@ -68,7 +68,7 @@ AASaver::AASaver( WId id ): KScreenSaver(id)
}
-QString AASaver::randColor(QString color_mask)
+TQString AASaver::randColor(TQString color_mask)
{
char colors[] = {'c','C','r','R','y','Y','b','B','g','G','m','M'};
for (int i = 1; i <= 9; ++i)
@@ -81,7 +81,7 @@ QString AASaver::randColor(QString color_mask)
void AASaver::addCastle()
{
- QString castle_image =
+ TQString castle_image =
" T~~\n"
" |\n"
" /^\\\n"
@@ -97,7 +97,7 @@ void AASaver::addCastle()
" |_______|__|_|_|_|__|_______|\n";
- QString castle_mask =
+ TQString castle_mask =
" RR\n"
"\n"
" yyy\n"
@@ -122,7 +122,7 @@ void AASaver::addCastle()
void AASaver::addEnvironment()
{
- QString water_line_segment[] = {
+ TQString water_line_segment[] = {
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~",
"^^^^ ^^^ ^^^ ^^^ ^^^^ ",
"^^^^ ^^^^ ^^^ ^^ ",
@@ -135,13 +135,13 @@ void AASaver::addEnvironment()
for (unsigned i = 0; i < ARRAY_SIZE(water_line_segment); ++i) {
//do the tiling
- QString out;
+ TQString out;
for (int r = 0; r < segment_repeat; ++r)
out += water_line_segment[i];
//create a sprite.
Sprite* s = new Sprite(screen, 0, i + 5, 22);
- s->addFrame(Frame(out, QString::null, 0x149494));
+ s->addFrame(Frame(out, TQString::null, 0x149494));
screen->addSprite(s);
}
}
@@ -197,7 +197,7 @@ public:
void AASaver::addSeaweed(Screen* screen)
{
- QString seaweed_image[] = {"", ""};
+ TQString seaweed_image[] = {"", ""};
int height = intRand(5) + 3;
for (int i = 1; i <= height; ++i)
{
@@ -212,8 +212,8 @@ void AASaver::addSeaweed(Screen* screen)
Seaweed* s = new Seaweed(screen, x, y,
intRand(4*60000) + (8*60000)); // seaweed lives for 8 to 12 minutes
- s->addFrame(Frame(seaweed_image[0], QString::null, 0x18AF18));
- s->addFrame(Frame(seaweed_image[1], QString::null, 0x18AF18));
+ s->addFrame(Frame(seaweed_image[0], TQString::null, 0x18AF18));
+ s->addFrame(Frame(seaweed_image[1], TQString::null, 0x18AF18));
s->setFrameDelay(intRand(50) + 250);
screen->addSprite(s);
}
@@ -239,9 +239,9 @@ public:
AirBubble(Screen *screen, int x, int y, int z) :
Sprite(screen, x, y, z), m_startY(y)
{
- addFrame(Frame(".", QString(), 0x18B2B2));
- addFrame(Frame("o", QString(), 0x18B2B2));
- addFrame(Frame("O", QString(), 0x18B2B2));
+ addFrame(Frame(".", TQString(), 0x18B2B2));
+ addFrame(Frame("o", TQString(), 0x18B2B2));
+ addFrame(Frame("O", TQString(), 0x18B2B2));
setFrameDelay(100);
}
@@ -423,12 +423,12 @@ public:
if(isKilled())
return true;
- if(QABS(realX() - m_lastBubbleRelease) >= m_spacesPerBubble)
+ if(TQABS(realX() - m_lastBubbleRelease) >= m_spacesPerBubble)
{
m_lastBubbleRelease = realX();
int bubbleX = m_x;
- QRect geometry = geom();
+ TQRect geometry = geom();
if(m_direct > 0) // Moving right
bubbleX += geometry.width();
@@ -446,7 +446,7 @@ void AASaver::addAllFish()
// many we'd be dealing with in full screen, and then scale the user's
// number down to adjust so that we look about the same in a window as we
// do fullscreen. TODO: Xinerama issues?
- QRect fullScreenGeometry = kapp->desktop()->screenGeometry();
+ TQRect fullScreenGeometry = kapp->desktop()->screenGeometry();
int full_width = fullScreenGeometry.width() / screen->cellWidth();
int full_height = fullScreenGeometry.height() / screen->cellHeight() - 9;
@@ -463,7 +463,7 @@ void AASaver::addAllFish()
Sprite *AASaver::newFish(Screen *screen)
{
- QString fish_image[] = {
+ TQString fish_image[] = {
" \\\n"
" ...\\..,\n"
"\\" "??" "/' \\\n" // trigraphs suck
@@ -656,7 +656,7 @@ Sprite *AASaver::newFish(Screen *screen)
double speed = doubleRand(2) + 0.25;
int depth = 3 + intRand(18);
- QString color_mask = fish_image[fish_index+1];
+ TQString color_mask = fish_image[fish_index+1];
color_mask.replace('4', 'W');
color_mask = randColor(color_mask);
@@ -702,10 +702,10 @@ public:
* @param center The point to center the splat around.
* @param depth The depth to create the splat at.
*/
- Splat(Screen *screen, QPoint center, int depth) :
+ Splat(Screen *screen, TQPoint center, int depth) :
Sprite(screen, 0, 0, depth, 450 /* frame Delay */)
{
- QString splats[] = {
+ TQString splats[] = {
"\n"
" .\n"
" ***\n"
@@ -733,9 +733,9 @@ public:
};
for(unsigned i = 0; i < ARRAY_SIZE(splats); ++i)
- addFrame(Frame(splats[i], QString(), 0xB21818, ' '));
+ addFrame(Frame(splats[i], TQString(), 0xB21818, ' '));
- QRect r(center, QSize(9, 5));
+ TQRect r(center, TQSize(9, 5));
r.moveCenter(center);
m_x = r.x();
m_y = r.y();
@@ -766,7 +766,7 @@ public:
if(m_direct > 0) // Moving to right.
m_realX = -10;
- addFrame(Frame("????????", QString(), 0));
+ addFrame(Frame("????????", TQString(), 0));
}
/// Returns true since we can collide.
@@ -794,7 +794,7 @@ public:
void AASaver::addShark(Screen* screen)
{
- QString shark_image[] = {
+ TQString shark_image[] = {
" __\n"
" ( `\\\n"
" ,??????????????????????????" ") `\\\n" // trigraphs suck
@@ -842,7 +842,7 @@ void AASaver::addShark(Screen* screen)
int shark_num = intRand(ARRAY_SIZE(shark_image)/2);
int shark_index = shark_num * 2;
- QString color_mask = randColor(shark_image[shark_index+1]);
+ TQString color_mask = randColor(shark_image[shark_index+1]);
Frame sharkFrame(shark_image[shark_index], color_mask, 0x18B2B2);
int x = -53;
@@ -867,7 +867,7 @@ void AASaver::addBubble(Screen *screen, int x, int y, int z)
void AASaver::addShip(Screen* screen)
{
- QString ship_image[] = {
+ TQString ship_image[] = {
" | | |\n"
" )_) )_) )_)\n"
" )___))___))___)\\\n"
@@ -912,7 +912,7 @@ void AASaver::addShip(Screen* screen)
void AASaver::addWhale(Screen* screen)
{
- QString whale_image[] = {
+ TQString whale_image[] = {
" .-----:\n"
" .' `.\n"
",????/ (o) \\\n"
@@ -940,7 +940,7 @@ void AASaver::addWhale(Screen* screen)
"BBBB BBBBB"
};
- QString spouty[] = {
+ TQString spouty[] = {
"\n"
"\n"
" :",
@@ -980,30 +980,30 @@ void AASaver::addWhale(Screen* screen)
dir = -1;
}
- QString mask = whale_image[2 * whale_num + 1];
+ TQString mask = whale_image[2 * whale_num + 1];
RandomMovingSprite *whale = new RandomMovingSprite(screen, dir, 1.0, x, 0, 2);
whale->setFrameDelay(80);
whale->setFrameTime(40);
// We have to add some frames now. The first five will have no water spout.
- QString blankWhaleFrame = QString("\n\n\n") + whale_image[2 * whale_num];
+ TQString blankWhaleFrame = TQString("\n\n\n") + whale_image[2 * whale_num];
for(unsigned i = 0; i < 5; ++i)
whale->addFrame(Frame(blankWhaleFrame, mask, 0xFFFFFF));
// Now add frames for the animated water spout.
- QString whaleFrame = whale_image[2 * whale_num];
+ TQString whaleFrame = whale_image[2 * whale_num];
for (unsigned i = 0; i < ARRAY_SIZE(spouty); ++i)
{
- QStringList spoutLines = QStringList::split("\n", spouty[i], true);
- QString spout;
- QString padding;
+ TQStringList spoutLines = TQStringList::split("\n", spouty[i], true);
+ TQString spout;
+ TQString padding;
padding.fill(' ', spout_align);
// Move spout over an appropriate distance to line up right.
- for(QStringList::ConstIterator it = spoutLines.begin(); it != spoutLines.end(); ++it)
+ for(TQStringList::ConstIterator it = spoutLines.begin(); it != spoutLines.end(); ++it)
{
spout += padding;
spout += *it;
@@ -1019,7 +1019,7 @@ void AASaver::addWhale(Screen* screen)
void AASaver::addBigFish(Screen* screen)
{
- QString big_fish_image[] = {
+ TQString big_fish_image[] = {
" ______\n"
"`\"\"-. `````-----.....__\n"
" `. . . `-.\n"
@@ -1093,7 +1093,7 @@ void AASaver::addBigFish(Screen* screen)
dir = -1;
}
- QString colors = randColor(big_fish_image[2 * big_fish_num + 1]);
+ TQString colors = randColor(big_fish_image[2 * big_fish_num + 1]);
RandomMovingSprite *bigFish = new RandomMovingSprite(screen, dir, 3.0, x, y, 2);
bigFish->addFrame(Frame(big_fish_image[2 * big_fish_num], colors, 0xFFFF54));
@@ -1102,7 +1102,7 @@ void AASaver::addBigFish(Screen* screen)
void AASaver::addNessie(Screen* screen)
{
- QString nessie_image[] = {
+ TQString nessie_image[] = {
" ____\n"
" __??????????????????????????????????????????/ o \\\n"
" / \\????????_?????????????????????_???????/ ____ >\n"
@@ -1152,7 +1152,7 @@ void AASaver::addNessie(Screen* screen)
" | |????/ \\?????| |????| || |???| |?????/ /"
};
- QString nessie_mask[] = {
+ TQString nessie_mask[] = {
"\n"
" W\n"
"\n"
@@ -1220,7 +1220,7 @@ void AASaver::addRandom(Screen* screen)
}
}
-void AASaver::paintEvent(QPaintEvent* pe)
+void AASaver::paintEvent(TQPaintEvent* pe)
{
screen->paint(pe->region());
}
@@ -1237,7 +1237,7 @@ extern "C"
return new AASaver( id );
}
- KDE_EXPORT QDialog *kss_setup()
+ KDE_EXPORT TQDialog *kss_setup()
{
KConfigDialog *dialog = KConfigDialog::exists("settings");
if(dialog)
diff --git a/asciiquarium/src/aasaver.h b/asciiquarium/src/aasaver.h
index 131b67b9..725378c4 100644
--- a/asciiquarium/src/aasaver.h
+++ b/asciiquarium/src/aasaver.h
@@ -58,7 +58,7 @@ class Sprite;
* examples for creating a Frame.
*
* The Frame supports transparency and colors, and will convert the textual data
- * into a QPixmap representation on demand in order to reduce CPU load (at the
+ * into a TQPixmap representation on demand in order to reduce CPU load (at the
* expense of a slight memory usage increase for each sprite).
*
* Screen handles the timing for the project, and at each timeout will call
@@ -93,10 +93,10 @@ public:
}
/**
- * Returns a QString holding a color mask, created by choosing random colors
+ * Returns a TQString holding a color mask, created by choosing random colors
* to replace numbers in \p color_mask.
*/
- static QString randColor(QString color_mask);
+ static TQString randColor(TQString color_mask);
/// Adds the castle sprite to the screen.
void addCastle();
@@ -191,7 +191,7 @@ public:
/**
* Reimplemented to update the widget when it gets dirty.
*/
- virtual void paintEvent(QPaintEvent* pe);
+ virtual void paintEvent(TQPaintEvent* pe);
};
#endif /* AA_AASAVER_H */
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;
}
}
diff --git a/asciiquarium/src/frame.h b/asciiquarium/src/frame.h
index a6ad82bd..915b58ca 100644
--- a/asciiquarium/src/frame.h
+++ b/asciiquarium/src/frame.h
@@ -28,9 +28,9 @@
#ifndef AA_FRAME_H
#define AA_FRAME_H
-#include <qstring.h>
-#include <qvaluevector.h>
-#include <qpixmap.h>
+#include <ntqstring.h>
+#include <ntqvaluevector.h>
+#include <ntqpixmap.h>
#include "screen.h"
/**
@@ -47,13 +47,13 @@ class Frame
*
* @see Pixel
*/
- QValueVector<QValueVector<Screen::Pixel> > m_data;
+ TQValueVector<TQValueVector<Screen::Pixel> > m_data;
/// Masked pixmap of the animation frame. Created by convertDataToPixmap().
- QPixmap m_pixmap;
+ TQPixmap m_pixmap;
/// Masked pixmap used to clear frame. Created by convertDataToPixmap().
- QPixmap m_erasePixmap;
+ TQPixmap m_erasePixmap;
/// Height of this frame of animation in logical coordinates.
int m_height;
@@ -63,7 +63,7 @@ class Frame
/// Character to be used as a special 'transparent' character. Normally is
/// the '?' character.
- QChar m_transparentChar;
+ TQChar m_transparentChar;
public:
@@ -100,7 +100,7 @@ public:
* auto-transparency feature can't detect transparent
* areas.
*/
- Frame(QString text, QString mask, QRgb defaultColor, QChar transparent = '?');
+ Frame(TQString text, TQString mask, TQRgb defaultColor, TQChar transparent = '?');
/**
* Paints this Frame into the given screen.
diff --git a/asciiquarium/src/screen.cpp b/asciiquarium/src/screen.cpp
index 240502ff..20f57d13 100644
--- a/asciiquarium/src/screen.cpp
+++ b/asciiquarium/src/screen.cpp
@@ -25,12 +25,12 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include <qcolor.h>
-#include <qfontmetrics.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qtimer.h>
-#include <qwidget.h>
+#include <ntqcolor.h>
+#include <ntqfontmetrics.h>
+#include <ntqpainter.h>
+#include <ntqpixmap.h>
+#include <ntqtimer.h>
+#include <ntqwidget.h>
#include <kglobalsettings.h>
@@ -40,7 +40,7 @@
Screen::Screen(AASaver* widget): m_widget(widget)
{
- QFontMetrics fm(KGlobalSettings::fixedFont());
+ TQFontMetrics fm(KGlobalSettings::fixedFont());
// Compute cell geometries.
m_cellW = fm.maxWidth();
@@ -55,13 +55,13 @@ Screen::Screen(AASaver* widget): m_widget(widget)
m_offY = (widget->height() - m_height * m_cellH) / 2;
// Create double buffer.
- m_backBuffer = QPixmap(m_widget->size());
+ m_backBuffer = TQPixmap(m_widget->size());
m_backBuffer.fill(black);
// FIXME: handle resizing!
// Setup animation timer.
- QTimer* timer = new QTimer(this);
+ TQTimer* timer = new TQTimer(this);
connect(timer, SIGNAL(timeout()), SLOT(doAnimate()));
timer->start(msPerTick());
@@ -76,36 +76,36 @@ Screen::~Screen()
{
}
-void Screen::updateSpan(int x, int y, const QPixmap &updatePixmap)
+void Screen::updateSpan(int x, int y, const TQPixmap &updatePixmap)
{
if (y < 0 || y >= m_height) return;
- QPoint upperLeft(m_offX + x * m_cellW, m_offY + y * m_cellH);
- bitBlt(&m_backBuffer, upperLeft, &updatePixmap, updatePixmap.rect(), Qt::CopyROP);
- m_widget->update(QRect(upperLeft, updatePixmap.size()));
+ TQPoint upperLeft(m_offX + x * m_cellW, m_offY + y * m_cellH);
+ bitBlt(&m_backBuffer, upperLeft, &updatePixmap, updatePixmap.rect(), TQt::CopyROP);
+ m_widget->update(TQRect(upperLeft, updatePixmap.size()));
}
-void Screen::clearSpan(int x, int y, const QPixmap &clearPixmap)
+void Screen::clearSpan(int x, int y, const TQPixmap &clearPixmap)
{
if (y < 0 || y >= m_height) return;
- QPoint upperLeft(m_offX + x * m_cellW, m_offY + y * m_cellH);
- bitBlt(&m_backBuffer, upperLeft, &clearPixmap, clearPixmap.rect(), Qt::CopyROP);
- m_widget->update(QRect(upperLeft, clearPixmap.size()));
+ TQPoint upperLeft(m_offX + x * m_cellW, m_offY + y * m_cellH);
+ bitBlt(&m_backBuffer, upperLeft, &clearPixmap, clearPixmap.rect(), TQt::CopyROP);
+ m_widget->update(TQRect(upperLeft, clearPixmap.size()));
}
//Actually paints the region on the widget.
-void Screen::paint(QRegion r)
+void Screen::paint(TQRegion r)
{
- QPainter p(m_widget);
- QMemArray<QRect> rects = r.rects();
+ TQPainter p(m_widget);
+ TQMemArray<TQRect> rects = r.rects();
for (int r = 0; r < rects.size(); ++r)
{
//Determine the grid locations described by the rect
- QRect bound = rects[r];
+ TQRect bound = rects[r];
- bitBlt(m_widget, bound.topLeft(), &m_backBuffer, bound, Qt::CopyROP);
+ bitBlt(m_widget, bound.topLeft(), &m_backBuffer, bound, TQt::CopyROP);
} //for rect in region
};
@@ -141,10 +141,10 @@ struct ZKey
void Screen::doAnimate()
{
//First, rebuild a new list of sprites, and build a dirty region
- QRegion dirtyRegion;
+ TQRegion dirtyRegion;
- QValueVector<Sprite*> sprites;
- QValueVector<Sprite*> colliders;
+ TQValueVector<Sprite*> sprites;
+ TQValueVector<Sprite*> colliders;
// Look for sprites that can suffer a collision.
for (unsigned pos = 0; pos < m_sprites.size(); ++pos)
@@ -169,7 +169,7 @@ void Screen::doAnimate()
for (int pos = 0; pos < m_sprites.size(); ++pos)
{
Sprite* sprite = m_sprites[pos];
- QRect oldRect = sprite->geom();
+ TQRect oldRect = sprite->geom();
if (!sprite->isKilled()) {
bool dirty = sprite->tickUpdate();
@@ -199,8 +199,8 @@ void Screen::doAnimate()
//Compute the list of sprites affected. Note that this is
//done iteratively until fixed point.
- QValueVector<Sprite*> paintSprites;
- QValueVector<Sprite*> remSprites;
+ TQValueVector<Sprite*> paintSprites;
+ TQValueVector<Sprite*> remSprites;
bool changed;
do
@@ -229,20 +229,20 @@ void Screen::doAnimate()
while (changed);
//Z-sort the items.
- QMap<ZKey, Sprite* > sorted;
+ TQMap<ZKey, Sprite* > sorted;
for (int pos = 0; pos < paintSprites.size(); ++pos)
sorted[ZKey(paintSprites[pos])] = paintSprites[pos];
//Paint, in Z-order
- for (QMapIterator<ZKey, Sprite*> i = sorted.begin();
+ for (TQMapIterator<ZKey, Sprite*> i = sorted.begin();
i != sorted.end(); ++i)
i.data()->paint();
// Make sure black strip at edge is still present.
if(!paintSprites.isEmpty())
{
- QPainter p(&m_backBuffer);
- p.fillRect(m_backBuffer.width() - m_offX, 0, m_offX, m_backBuffer.height(), Qt::black);
+ TQPainter p(&m_backBuffer);
+ p.fillRect(m_backBuffer.width() - m_offX, 0, m_offX, m_backBuffer.height(), TQt::black);
}
}
diff --git a/asciiquarium/src/screen.h b/asciiquarium/src/screen.h
index 0cd141c2..26fa3efd 100644
--- a/asciiquarium/src/screen.h
+++ b/asciiquarium/src/screen.h
@@ -28,11 +28,11 @@
#ifndef AA_SCREEN_H
#define AA_SCREEN_H
-#include <qcolor.h>
-#include <qfont.h>
-#include <qobject.h>
-#include <qvaluevector.h>
-#include <qpixmap.h>
+#include <ntqcolor.h>
+#include <ntqfont.h>
+#include <ntqobject.h>
+#include <ntqvaluevector.h>
+#include <ntqpixmap.h>
class Sprite;
class AASaver;
@@ -47,7 +47,7 @@ class AASaver;
* Use addSprite() to add new Sprites to the Screen after you have created them
* and added their Frames.
*/
-class Screen: public QObject
+class Screen: public TQObject
{
Q_OBJECT
@@ -57,7 +57,7 @@ public:
*/
struct Pixel {
char letter; ///< Character to display in the cell.
- QRgb color; ///< Color to use for the cell.
+ TQRgb color; ///< Color to use for the cell.
/// Default constructor.
Pixel(): letter(' '), color(0)
@@ -76,13 +76,13 @@ private:
* to the pixmap, which is then bitBlt()'ed to m_widget when the time comes
* to paint.
*/
- QPixmap m_backBuffer;
+ TQPixmap m_backBuffer;
int m_cellW; ///< The GUI width of a character cell.
int m_cellH; ///< The GUI height of a character cell.
- QValueVector<Sprite*> m_sprites; ///< List of Sprites on screen.
- QValueVector<Sprite*> m_addedSprites; ///< List of Sprites to be added next frame.
+ TQValueVector<Sprite*> m_sprites; ///< List of Sprites on screen.
+ TQValueVector<Sprite*> m_addedSprites; ///< List of Sprites to be added next frame.
private slots:
/**
@@ -145,7 +145,7 @@ public:
* @param updatePixmap The pixmap to draw into the buffer, which should be
* masked to only draw non-transparent regions.
*/
- void updateSpan(int x, int y, const QPixmap &updatePixmap);
+ void updateSpan(int x, int y, const TQPixmap &updatePixmap);
/**
* Clear the given portion of the backbuffer, asks for a repaint.
@@ -156,14 +156,14 @@ public:
* the background color of the Screen, and masked to
* only draw the area that needs cleared.
*/
- void clearSpan(int x, int y, const QPixmap &clearPixmap);
+ void clearSpan(int x, int y, const TQPixmap &clearPixmap);
/**
* Actually paints the region on the widget.
*
* @param r The region of the widget to update.
*/
- void paint(QRegion r);
+ void paint(TQRegion r);
};
#endif
diff --git a/asciiquarium/src/settingswidget.ui b/asciiquarium/src/settingswidget.ui
index 6ab05a16..16ead9a2 100644
--- a/asciiquarium/src/settingswidget.ui
+++ b/asciiquarium/src/settingswidget.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>SettingsWidget</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>SettingsWidget</cstring>
</property>
@@ -19,7 +19,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -27,7 +27,7 @@
<string>Number of Fish:</string>
</property>
</widget>
- <widget class="QSpinBox">
+ <widget class="TQSpinBox">
<property name="name">
<cstring>kcfg_fishCount</cstring>
</property>
diff --git a/asciiquarium/src/sprite.cpp b/asciiquarium/src/sprite.cpp
index 85e946ed..5606e489 100644
--- a/asciiquarium/src/sprite.cpp
+++ b/asciiquarium/src/sprite.cpp
@@ -85,9 +85,9 @@ bool Sprite::tickUpdate()
return true;
}
-QRect Sprite::geom() const
+TQRect Sprite::geom() const
{
- return QRect(m_x, m_y, m_frames[0].width(), m_frames[0].height());
+ return TQRect(m_x, m_y, m_frames[0].width(), m_frames[0].height());
}
diff --git a/asciiquarium/src/sprite.h b/asciiquarium/src/sprite.h
index 14fb1c19..927c149c 100644
--- a/asciiquarium/src/sprite.h
+++ b/asciiquarium/src/sprite.h
@@ -28,7 +28,7 @@
#ifndef AA_SPRITE_H
#define AA_SPRITE_H
-#include <qvaluevector.h>
+#include <ntqvaluevector.h>
#include "frame.h"
/**
@@ -53,7 +53,7 @@ protected:
int m_y; ///< Our current logical y position.
int m_z; ///< Our current depth.
- QValueVector<Frame> m_frames; ///< Array of animation frames.
+ TQValueVector<Frame> m_frames; ///< Array of animation frames.
bool m_isKilled; ///< True if we've been killed.
bool m_killAfterLastFrame; ///< True if we should auto-kill after the last frame.
int m_ticksSinceFrameChange; ///< Number of timer ticks since we last changed frame.
@@ -165,7 +165,7 @@ public:
* @return The rectangular geometry of this object in the Pixel coordinate
* system.
*/
- QRect geom() const;
+ TQRect geom() const;
/**
* Erases this Sprite from its Screen, using the current animation frame to