diff options
author | Mavridis Philippe <mavridisf@gmail.com> | 2021-03-30 14:11:34 +0300 |
---|---|---|
committer | Mavridis Philippe <mavridisf@gmail.com> | 2021-03-30 14:11:34 +0300 |
commit | d991b7f387775dc1071fb0c0af78de1c613ca991 (patch) | |
tree | eb7c978130acb1b2c93eeea98be2f647372c6fac /src/komposesystray.cpp | |
parent | 1bd3c5b42f1570b2100a4986f638f2723ee37ec4 (diff) | |
download | kompose-d991b7f387775dc1071fb0c0af78de1c613ca991.tar.gz kompose-d991b7f387775dc1071fb0c0af78de1c613ca991.zip |
Qt3->TQt conversion.
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
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); } |