diff options
Diffstat (limited to 'src/komposesystray.cpp')
-rw-r--r-- | src/komposesystray.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/komposesystray.cpp b/src/komposesystray.cpp index 41df920..7b06a42 100644 --- a/src/komposesystray.cpp +++ b/src/komposesystray.cpp @@ -17,9 +17,9 @@ #include "komposeglobal.h" #include "komposetaskmanager.h" -#include <qpixmap.h> -#include <qbitmap.h> -#include <qpainter.h> +#include <tqpixmap.h> +#include <tqbitmap.h> +#include <tqpainter.h> #include <kapplication.h> #include <kaction.h> @@ -27,7 +27,7 @@ #include <kiconeffect.h> #include <kglobalsettings.h> -KomposeSysTray::KomposeSysTray(QWidget *parent, const char *name) +KomposeSysTray::KomposeSysTray(TQWidget *parent, const char *name) : KSystemTray(parent, name) { // Create Menu @@ -53,16 +53,16 @@ KomposeSysTray::~KomposeSysTray() void KomposeSysTray::slotConfigChanged( ) { // set the icon here - QPixmap iconPixmap = loadIcon("kompose"); + TQPixmap iconPixmap = loadIcon("kompose"); setPixmap(iconPixmap); icon = iconPixmap.convertToImage(); currentDesktopChanged(KomposeTaskManager::instance()->getCurrentDesktopNum()); } -void KomposeSysTray::mouseReleaseEvent (QMouseEvent * ) +void KomposeSysTray::mouseReleaseEvent (TQMouseEvent * ) {} -void KomposeSysTray::mousePressEvent ( QMouseEvent * e ) +void KomposeSysTray::mousePressEvent ( TQMouseEvent * e ) { if ( !rect().contains( e->pos() ) ) return; @@ -89,37 +89,37 @@ void KomposeSysTray::currentDesktopChanged(int desktop) if (!KomposeSettings::instance()->getShowDesktopNum()) return; // update the icon to display the current desktop number - // qDebug("Displaying current desktop number on the tray icon....\n"); + // tqDebug("Displaying current desktop number on the tray icon....\n"); // copying from aKregator/src/trayicon.cpp // from KMSystemTray int oldW = pixmap()->size().width(); int oldH = pixmap()->size().height(); - QString uStr=QString::number( desktop ); - QFont f=KGlobalSettings::generalFont(); + TQString uStr=TQString::number( desktop ); + TQFont f=KGlobalSettings::generalFont(); f.setBold(true); f.setItalic(true); float pointSize=f.pointSizeFloat(); - QFontMetrics fm(f); + TQFontMetrics fm(f); int w=fm.width(uStr); if( w > (oldW) ) { pointSize *= float(oldW) / float(w); f.setPointSizeFloat(pointSize); } - QPixmap pix(oldW, oldH); - pix.fill(Qt::white); - QPainter p(&pix); + TQPixmap pix(oldW, oldH); + pix.fill(TQt::white); + TQPainter p(&pix); p.setFont(f); - p.setPen(Qt::black); - p.drawText(pix.rect(), Qt::AlignCenter, uStr); + p.setPen(TQt::black); + p.drawText(pix.rect(), TQt::AlignCenter, uStr); pix.setMask(pix.createHeuristicMask()); - QImage img=pix.convertToImage(); + TQImage img=pix.convertToImage(); // overlay - QImage overlayImg=icon.copy(); + TQImage overlayImg=icon.copy(); KIconEffect::overlay(overlayImg, img); - QPixmap newIcon; + TQPixmap newIcon; newIcon.convertFromImage(overlayImg); setPixmap(newIcon); } |