diff options
Diffstat (limited to 'knetwalk/src/cell.cpp')
-rw-r--r-- | knetwalk/src/cell.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/knetwalk/src/cell.cpp b/knetwalk/src/cell.cpp index 4d561cec..a08b0d78 100644 --- a/knetwalk/src/cell.cpp +++ b/knetwalk/src/cell.cpp @@ -12,8 +12,8 @@ * GNU General Public License for more details. * ***************************************************************************/ -#include <qpainter.h> -#include <qimage.h> +#include <tqpainter.h> +#include <tqimage.h> #include <kglobal.h> #include <kiconloader.h> @@ -26,7 +26,7 @@ Cell::PixmapMap Cell::disconnectedpixmap; void Cell::initPixmaps() { - typedef QMap<int, QString> NamesMap; + typedef TQMap<int, TQString> NamesMap; NamesMap names; names[L] = "0001"; names[D] = "0010"; @@ -46,10 +46,10 @@ void Cell::initPixmaps() NamesMap::ConstIterator it; for(it = names.constBegin(); it != names.constEnd(); ++it) { - connectedpixmap[it.key()]=new QPixmap(KGlobal::iconLoader()->loadIcon( + connectedpixmap[it.key()]=new TQPixmap(KGlobal::iconLoader()->loadIcon( locate("data","knetwalk/cable"+it.data()+".png"), KIcon::NoGroup, 32) ); - QImage image = connectedpixmap[it.key()]->convertToImage(); + TQImage image = connectedpixmap[it.key()]->convertToImage(); for(int y = 0; y < image.height(); y++) { QRgb* line = (QRgb*)image.scanLine(y); @@ -65,11 +65,11 @@ void Cell::initPixmaps() } } } - disconnectedpixmap[it.key()] = new QPixmap(image); + disconnectedpixmap[it.key()] = new TQPixmap(image); } } -Cell::Cell(QWidget* parent, int i) : QWidget(parent, 0, WNoAutoErase) +Cell::Cell(TQWidget* parent, int i) : TQWidget(parent, 0, WNoAutoErase) { angle = 0; light = 0; @@ -146,7 +146,7 @@ void Cell::setLight(int l) update(); } -void Cell::paintEvent(QPaintEvent*) +void Cell::paintEvent(TQPaintEvent*) { if(changed) { @@ -157,12 +157,12 @@ void Cell::paintEvent(QPaintEvent*) pixmap = KGlobal::iconLoader()->loadIcon(locate("data", "knetwalk/background.png"), KIcon::NoGroup, 32); } - QPainter paint; + TQPainter paint; paint.begin(&pixmap); if(light) { - paint.setPen(QPen(white, 5)); + paint.setPen(TQPen(white, 5)); paint.drawLine(0, width() - light, width(), 2 * width() - light); } @@ -181,7 +181,7 @@ void Cell::paintEvent(QPaintEvent*) else paint.drawPixmap(int(-offset), int(-offset), *disconnectedpixmap[ddirs]); paint.resetXForm(); - QPixmap pix; + TQPixmap pix; if(root) { @@ -201,7 +201,7 @@ void Cell::paintEvent(QPaintEvent*) bitBlt(this, 0, 0, &pixmap); } -void Cell::mousePressEvent(QMouseEvent* e) +void Cell::mousePressEvent(TQMouseEvent* e) { if(e->button() == LeftButton) emit lClicked(iindex); |