diff options
Diffstat (limited to 'src/kooldock.cpp')
| -rw-r--r-- | src/kooldock.cpp | 470 |
1 files changed, 235 insertions, 235 deletions
diff --git a/src/kooldock.cpp b/src/kooldock.cpp index fb9cc9c..1a362ef 100644 --- a/src/kooldock.cpp +++ b/src/kooldock.cpp @@ -19,21 +19,21 @@ #include <math.h> #include <algorithm> -#include <qpixmap.h> -#include <qimage.h> -#include <qpainter.h> -#include <qcursor.h> -#include <qdir.h> -#include <qstringlist.h> -#include <qvaluelist.h> -#include <qtooltip.h> -#include <qrect.h> -#include <qfile.h> -#include <qtextstream.h> -#include <qbrush.h> -#include <qpoint.h> -#include <qfont.h> -#include <qdatetime.h> +#include <ntqpixmap.h> +#include <ntqimage.h> +#include <ntqpainter.h> +#include <ntqcursor.h> +#include <ntqdir.h> +#include <ntqstringlist.h> +#include <ntqvaluelist.h> +#include <ntqtooltip.h> +#include <ntqrect.h> +#include <ntqfile.h> +#include <ntqtextstream.h> +#include <ntqbrush.h> +#include <ntqpoint.h> +#include <ntqfont.h> +#include <ntqdatetime.h> #include <kwin.h> #include <kprocess.h> @@ -46,7 +46,7 @@ #include <kpixmapio.h> #include <kstandarddirs.h> #include <kaboutapplication.h> -#include <qlistbox.h> +#include <ntqlistbox.h> #include <keditlistbox.h> // for "renicing" the bar @@ -71,13 +71,13 @@ #endif #include <dcopclient.h> #include <iostream> -#include <qdatastream.h> +#include <ntqdatastream.h> -KoolDock::KoolDock(QWidget *parent, const char *name) : QWidget(parent, name, WStyle_Customize | WStyle_NoBorder | WNoAutoErase | WDestructiveClose | WStyle_StaysOnTop )//| WX11BypassWM) +KoolDock::KoolDock(TQWidget *parent, const char *name) : TQWidget(parent, name, WStyle_Customize | WStyle_NoBorder | WNoAutoErase | WDestructiveClose | WStyle_StaysOnTop )//| WX11BypassWM) { // Default configuration paths progPath = locateLocal("data", "kooldock"); - menuPath = progPath + QString("/menu/"); + menuPath = progPath + TQString("/menu/"); confFile = locateLocal("config", "kooldockrc"); noSet=false; @@ -85,7 +85,7 @@ KoolDock::KoolDock(QWidget *parent, const char *name) : QWidget(parent, name, WS setupdlg = new SetupDialogPrg(); // create the setup dialog object. connect (setupdlg, SIGNAL(apply()), SLOT(chkRestart())); - perf = new QTime(); + perf = new TQTime(); reloadIcons=TRUE; @@ -110,11 +110,11 @@ KoolDock::KoolDock(QWidget *parent, const char *name) : QWidget(parent, name, WS init1(); - QString welcomeMsg; + TQString welcomeMsg; if (fFirstRun) { // Show welcome dialog. - welcomeMsg = QString("<center><B>Welcome</B></center>It appears to be the first time you run KoolDock.<br>" + welcomeMsg = TQString("<center><B>Welcome</B></center>It appears to be the first time you run KoolDock.<br>" "By default the dock is hidden at the botton of the screen, move your mouse" " to the bottom edge of the screen and the dock will appear.<br>" "Right click on the dock for a menu that allows you to configure it<br>" @@ -146,8 +146,8 @@ KoolDock::~KoolDock() void KoolDock::mTimerEnd() { if (menuCount>0) return; - QPoint pointer; - pointer = QCursor::pos(); + TQPoint pointer; + pointer = TQCursor::pos(); lastXPos=pointer.x()-rx; lastYPos=pointer.y()-ry; int px,py,pw,ph,pt; @@ -175,7 +175,7 @@ void KoolDock::mTimerEnd() } else { - debug(QString("mTimer1Leave: %1 %2 %3 %4 %5 %6").arg(pointer.x()).arg(pointer.y()).arg(dh-h).arg(ry).arg(rx).arg(x+w)); + debug(TQString("mTimer1Leave: %1 %2 %3 %4 %5 %6").arg(pointer.x()).arg(pointer.y()).arg(dh-h).arg(ry).arg(rx).arg(x+w)); onleaveEvent(NULL); } } @@ -189,7 +189,7 @@ void KoolDock::mTimerEnd() } else { - debug(QString("mTimer2EnterEv: %1 %2").arg(pointer.x()-rx).arg(pointer.y()-ry)); + debug(TQString("mTimer2EnterEv: %1 %2").arg(pointer.x()-rx).arg(pointer.y()-ry)); if (mpx>=firstX && mpx<=firstX+tmpw) { enterEvent(NULL); @@ -200,7 +200,7 @@ void KoolDock::mTimerEnd() { if (fExpanded) { - debug(QString("mTimer2Leave")); + debug(TQString("mTimer2Leave")); onleaveEvent(NULL); } } @@ -212,8 +212,8 @@ void KoolDock::mTimerEnd() void KoolDock::trackTimerEnd() { - QPoint pointer; - pointer = QCursor::pos(); + TQPoint pointer; + pointer = TQCursor::pos(); int px, py; if ((fOrientation & 1) == 1) { @@ -228,15 +228,15 @@ void KoolDock::trackTimerEnd() if ((fOrientation & 2) == 2) py = dh-py; if (py+2 >= dh && px > x0 && px < x0+w0) { - if(track2active==FALSE) QTimer::singleShot( hideTimer, this, SLOT(trackTimer2End()) ); + if(track2active==FALSE) TQTimer::singleShot( hideTimer, this, SLOT(trackTimer2End()) ); track2active=true; } } void KoolDock::trackTimer2End() { - QPoint pointer; - pointer = QCursor::pos(); + TQPoint pointer; + pointer = TQCursor::pos(); int px, py; if ((fOrientation & 1) == 1) { @@ -257,7 +257,7 @@ void KoolDock::trackTimer2End() trackTimer->stop(); getBottomBG(); if(h1 > h0) getTopBG(); - debug(QString("tracktimer: grabWindow(%1, %2, %3, %4)").arg(x1).arg(dh - h1).arg(w1).arg(h1)); + debug(TQString("tracktimer: grabWindow(%1, %2, %3, %4)").arg(x1).arg(dh - h1).arg(w1).arg(h1)); move2( x, dh - h); resize2(w, h); Ybase = iwBig2; @@ -266,24 +266,24 @@ void KoolDock::trackTimer2End() track2active=FALSE; } -void KoolDock::paintEvent(QPaintEvent *) +void KoolDock::paintEvent(TQPaintEvent *) { // Draw backgound, icons, and all that stuff over the widget. - QPainter p; + TQPainter p; if (initialization && ptPart==5) return; p.begin (&offscr,this); int i; int ii; - debug(QString("painting")); + debug(TQString("painting")); // draw background (new engine) int bgY; - QImage TempBG; - QPixmap TempScaledLeft; - //QPixmap TempScaledCenter; - QPixmap TempScaledRight; + TQImage TempBG; + TQPixmap TempScaledLeft; + //TQPixmap TempScaledCenter; + TQPixmap TempScaledRight; int p1,p2,p3,p4=0,p5=0,p6,p7,p8,p9,p10,pt; if (w<dw) Offset=0; if (fExpanded==FALSE) @@ -322,9 +322,9 @@ void KoolDock::paintEvent(QPaintEvent *) p2=h0; if ((fOrientation & 1)==1) {pt=p1; p1=p2; p2=pt;} if (scaleMax) - {TempScaledLeft = QPixmap(TempBG.scale(p1, p2, QImage::ScaleMin));} + {TempScaledLeft = TQPixmap(TempBG.scale(p1, p2, TQImage::ScaleMin));} else - {TempScaledLeft = QPixmap(TempBG.scale(p1, p2));} + {TempScaledLeft = TQPixmap(TempBG.scale(p1, p2));} p2=0; if ((fOrientation & 1)==1) {p1=TempScaledLeft.height();} else {p1=TempScaledLeft.width();} } @@ -335,9 +335,9 @@ void KoolDock::paintEvent(QPaintEvent *) p3=h0; if ((fOrientation & 1)==1) {pt=p2; p2=p3; p3=pt;} if (scaleMax) - {TempScaledRight = QPixmap(TempBG.scale(p2, p3, QImage::ScaleMin));} + {TempScaledRight = TQPixmap(TempBG.scale(p2, p3, TQImage::ScaleMin));} else - {TempScaledRight = QPixmap(TempBG.scale(p2, p3));} + {TempScaledRight = TQPixmap(TempBG.scale(p2, p3));} if ((fOrientation & 1)==1) {p2=TempScaledRight.height();} else {p2=TempScaledRight.width();} } if (oldtmpw<tmpw) @@ -451,7 +451,7 @@ void KoolDock::paintEvent(QPaintEvent *) p2=p6-p5; p3=h0; if ((fOrientation & 1)==1) {pt=p2; p2=p3; p3=pt;} - TempScaledCenter = QPixmap(TempBG.scale( p2, p3)); + TempScaledCenter = TQPixmap(TempBG.scale( p2, p3)); } p1=p5; if ((fOrientation & 2)==2) @@ -492,9 +492,9 @@ void KoolDock::paintEvent(QPaintEvent *) pt=p7; p7=p8; p8=pt; pt=p9; p9=p10; p10=pt; } - p.fillRect (QRect(p1, p2, p3, p4), QBrush(borderColor)); - p.fillRect (QRect(p9, p10, p5, p6), QBrush(borderColor)); - p.fillRect (QRect(p7, p8, p3, p4), QBrush(borderColor)); + p.fillRect (TQRect(p1, p2, p3, p4), TQBrush(borderColor)); + p.fillRect (TQRect(p9, p10, p5, p6), TQBrush(borderColor)); + p.fillRect (TQRect(p7, p8, p3, p4), TQBrush(borderColor)); } // end drawing borders @@ -548,20 +548,20 @@ void KoolDock::paintEvent(QPaintEvent *) if (iOnClick == i) { // highlight the clicked icon - KPixmapEffect::fade(*currentIcon, ((float)50)*0.01, QColor("#FFFFFF")); - QTimer::singleShot( 10*60, this, SLOT( unhighlight() ) ); // unhighlight the icon in 1 second + KPixmapEffect::fade(*currentIcon, ((float)50)*0.01, TQColor("#FFFFFF")); + TQTimer::singleShot( 10*60, this, SLOT( unhighlight() ) ); // unhighlight the icon in 1 second } // notify animation if (fShowNotification && item->isAnimed()) { - KPixmapEffect::fade(*currentIcon, ((float) animValue )*0.01, QColor("#FFFFFF")); + KPixmapEffect::fade(*currentIcon, ((float) animValue )*0.01, TQColor("#FFFFFF")); } //Lets apply an effect to the active window in TaskBar if(item->getId()==wm->activeWindow() && item->getId()!=0) { - KPixmapEffect::fade(*currentIcon, ((float)60)*0.01, QColor("#FFFFFF")); + KPixmapEffect::fade(*currentIcon, ((float)60)*0.01, TQColor("#FFFFFF")); } // End drawing icon effects @@ -595,9 +595,9 @@ void KoolDock::paintEvent(QPaintEvent *) if ((fOrientation & 2)==2) p2=-Ybase; } if ((fOrientation & 1)==1) - {p.fillRect (QRect(p2, p1, p4, p3), QBrush(sepColor));} + {p.fillRect (TQRect(p2, p1, p4, p3), TQBrush(sepColor));} else - {p.fillRect (QRect(p1, p2, p3, p4), QBrush(sepColor));} + {p.fillRect (TQRect(p1, p2, p3, p4), TQBrush(sepColor));} } } if((fSystray==1) && (numSystray>0)) @@ -620,28 +620,28 @@ void KoolDock::paintEvent(QPaintEvent *) if ((fOrientation & 2)==2) p2=-Ybase; } if ((fOrientation &1)==1) - {p.fillRect (QRect(p2, p1, p4, p3), QBrush(sepColor));} + {p.fillRect (TQRect(p2, p1, p4, p3), TQBrush(sepColor));} else - {p.fillRect (QRect(p1, p2, p3, p4), QBrush(sepColor));} + {p.fillRect (TQRect(p1, p2, p3, p4), TQBrush(sepColor));} } } p.end(); // Finally update the widget if ((fOrientation & 1)==1) - {bitBlt(this, 0, 0, &offscr, 0, 0, h1, dh, Qt::CopyROP);} + {bitBlt(this, 0, 0, &offscr, 0, 0, h1, dh, TQt::CopyROP);} else - {bitBlt(this, 0, 0, &offscr, 0, 0, dw, h1, Qt::CopyROP);} + {bitBlt(this, 0, 0, &offscr, 0, 0, dw, h1, TQt::CopyROP);} //return; //Preparing mask - QBitmap bm(size(),true); - QPainter mp; + TQBitmap bm(size(),true); + TQPainter mp; mp.begin(&bm, this); - mp.setPen( Qt::black ); - mp.fillRect(rect(), Qt::black); - mp.fillRect(QRect(0, 0, 1, 1), Qt::white); + mp.setPen( TQt::black ); + mp.fillRect(rect(), TQt::black); + mp.fillRect(TQRect(0, 0, 1, 1), TQt::white); p1=0; p2=0; if (!fLeftImg.isEmpty()) @@ -655,22 +655,22 @@ void KoolDock::paintEvent(QPaintEvent *) if (p3<0) p3=0; if (p5+p3>dw) p5=dw-p3; if ((fOrientation & 1)==1) - {p6++;mp.fillRect(QRect(p4, p3, p6, p5), Qt::white);} + {p6++;mp.fillRect(TQRect(p4, p3, p6, p5), TQt::white);} else - {mp.fillRect(QRect(p3, p4, p5, p6), Qt::white);} + {mp.fillRect(TQRect(p3, p4, p5, p6), TQt::white);} if ((fOrientation & 2)==2) - {mp.fillRect(QRect(rw-1, rh-1, 1, 1), Qt::black);} + {mp.fillRect(TQRect(rw-1, rh-1, 1, 1), TQt::black);} else { if ((fOrientation & 1)==1) - {mp.fillRect(QRect(0, rh-1, 1, 1), Qt::black);} + {mp.fillRect(TQRect(0, rh-1, 1, 1), TQt::black);} else - {mp.fillRect(QRect(rw-1, 0, 1, 1), Qt::black);} + {mp.fillRect(TQRect(rw-1, 0, 1, 1), TQt::black);} } if (initialization) { - mp.fillRect(rect(), Qt::black); - mp.fillRect(QRect(0, 0, 1, 1), Qt::white); + mp.fillRect(rect(), TQt::black); + mp.fillRect(TQRect(0, 0, 1, 1), TQt::white); } mp.end(); setMask(bm); @@ -684,7 +684,7 @@ void KoolDock::unhighlight() paintEvent(NULL);; } -void KoolDock::mousePressEvent( QMouseEvent *e) +void KoolDock::mousePressEvent( TQMouseEvent *e) { mPress (e->x(), e->y(), e->button()); } @@ -708,7 +708,7 @@ void KoolDock::mPress(int mx, int my, ButtonState srcButton) mx = mx+Offset; iClicked=itemFromPoint(mx); - if (srcButton == Qt::LeftButton) + if (srcButton == TQt::LeftButton) { i=iClicked; @@ -726,7 +726,7 @@ void KoolDock::mPress(int mx, int my, ButtonState srcButton) paintEvent(NULL); // run the app - debug(QString("clicked: %1").arg(items.at(i)->getName())); + debug(TQString("clicked: %1").arg(items.at(i)->getName())); if (items.at(i)->getName() == "KMenu") { // show K Menu @@ -752,8 +752,8 @@ void KoolDock::mPress(int mx, int my, ButtonState srcButton) KWin::WindowInfo info; KWin::WindowInfo winfo; info = KWin::windowInfo(id,0,NET::WM2WindowClass); - QString name = info.visibleName(); - QCString cls = info.windowClassClass(); + TQString name = info.visibleName(); + TQCString cls = info.windowClassClass(); if(i>=((int)items.count()-numSystray)) { @@ -761,9 +761,9 @@ void KoolDock::mPress(int mx, int my, ButtonState srcButton) KWin::deIconifyWindow(id); kdDebug(0) << "Systray: " << id << " Name: " << name << " Estado: " << info.state() << endl; - //QMouseEvent me(e->type(), mapTo( topLevelWidget(), e->pos() ), e->globalPos(), e->button(), e->state() ); + //TQMouseEvent me(e->type(), mapTo( topLevelWidget(), e->pos() ), e->globalPos(), e->button(), e->state() ); - //QApplication::sendEvent(, &me); + //TQApplication::sendEvent(, &me); } else { @@ -836,7 +836,7 @@ void KoolDock::mPress(int mx, int my, ButtonState srcButton) if(fHidden == 1 && fHideOnClick == 1) onleaveEvent(NULL); // it's configurable } } - else if(srcButton == Qt::RightButton) + else if(srcButton == TQt::RightButton) { // Right button. i = iClicked; @@ -863,15 +863,15 @@ void KoolDock::mPress(int mx, int my, ButtonState srcButton) godesk->clear(); for(int index=0; index<KWin::numberOfDesktops(); index++) { - QString tmp=i18n("Desktop &%1").arg(index+1); + TQString tmp=i18n("Desktop &%1").arg(index+1); int menustate=godesk->insertItem(SmallIcon("forward"), tmp, index+1); if(KWin::currentDesktop()==(index+1)) godesk->setItemEnabled(menustate, false); } //End godesk Menu //Append Navigation Menu (godesk+Time) - QDateTime timeEntry=QDateTime::currentDateTime(); - QString tmp=i18n("Navigation: Desktop %1").arg(KWin::currentDesktop()); + TQDateTime timeEntry=TQDateTime::currentDateTime(); + TQString tmp=i18n("Navigation: Desktop %1").arg(KWin::currentDesktop()); popup->insertTitle(tmp); popup->insertItem(SmallIcon("forward"), i18n("&Go to Desktop"), godesk); popup->insertItem(SmallIcon("forward"), i18n("&Task List"), tasklist); @@ -894,7 +894,7 @@ void KoolDock::mPress(int mx, int my, ButtonState srcButton) if (i==0 && fShowKMenu) { // if user right clicked on the K menu, show the configuration menu. - popup->exec(QCursor::pos()); + popup->exec(TQCursor::pos()); } else { @@ -906,7 +906,7 @@ void KoolDock::mPress(int mx, int my, ButtonState srcButton) appMenu->insertItem(SmallIcon("fileclose"), i18n("&Delete item"), this, SLOT(removeItem())); appMenu->insertSeparator(); appMenu->insertItem(SmallIcon("forward"), "&KoolDock", popup); - appMenu->exec(QCursor::pos()); + appMenu->exec(TQCursor::pos()); } } } @@ -922,7 +922,7 @@ void KoolDock::mPress(int mx, int my, ButtonState srcButton) //Begin Move to Desktop Menu deskpopup->clear(); - QString tmp=i18n("All desktops"); + TQString tmp=i18n("All desktops"); menustate=deskpopup->insertItem(SmallIcon("forward"), tmp, 0); tmp=i18n("Current Desktop &%1").arg(KWin::currentDesktop()); menustate=deskpopup->insertItem(SmallIcon("forward"), tmp, KWin::currentDesktop()); @@ -938,7 +938,7 @@ void KoolDock::mPress(int mx, int my, ButtonState srcButton) { if((i+1)!=KWin::currentDesktop()) { - QString tmpd=i18n("Desktop &%1").arg(i+1); + TQString tmpd=i18n("Desktop &%1").arg(i+1); menustate=deskpopup->insertItem(SmallIcon("forward"), tmpd, i+1); } } @@ -958,7 +958,7 @@ void KoolDock::mPress(int mx, int my, ButtonState srcButton) if (fGrouping && items.at(iClicked)->getCount()>0) { iGroup=true; - QCString cls = winfo.windowClassClass(); + TQCString cls = winfo.windowClassClass(); popups.clear(); for (j=0, item = witems.at(0); item; j++, item = witems.next()) { @@ -989,7 +989,7 @@ void KoolDock::mPress(int mx, int my, ButtonState srcButton) } appMenu->insertSeparator(); appMenu->insertItem(SmallIcon("forward"), "KoolDock", popup); - appMenu->exec(QCursor::pos()); + appMenu->exec(TQCursor::pos()); iGroup=false; } } @@ -997,7 +997,7 @@ void KoolDock::mPress(int mx, int my, ButtonState srcButton) else { // Show the configuration popup menu if the user clicked on another place. - popup->exec(QCursor::pos()); + popup->exec(TQCursor::pos()); } deskpopup->clear(); godesk->clear(); @@ -1138,8 +1138,8 @@ void KoolDock::mMoveEvent( int ex, int ey) // get the name of the item at the mouse position if (!mksmallTimer->isActive() && !mkbigTimer->isActive()) { - QPoint pointer; - pointer = QCursor::pos(); + TQPoint pointer; + pointer = TQCursor::pos(); if (i < MAX_ICONS+1) { if (((int)i >= 0) && (i < items.count())) @@ -1199,7 +1199,7 @@ void KoolDock::mMoveEvent( int ex, int ey) //Mouse Wheel now switches desktops (away from user desktop+1, towards user desktop-1) //-Francisco -void KoolDock::wheelEvent(QWheelEvent *e) +void KoolDock::wheelEvent(TQWheelEvent *e) { if(e->delta()==120 && (KWin::currentDesktop()<KWin::numberOfDesktops())) { @@ -1227,7 +1227,7 @@ void KoolDock::mkbigTimerDo() iwBig = iwBig2; mkbigTimer->stop(); last_mx=-1; - debug(QString("Stopped mkbigTimer")); + debug(TQString("Stopped mkbigTimer")); if (zoomTicksB>=neededTicksB && fSpeed) { //performace check @@ -1254,7 +1254,7 @@ void KoolDock::mkbigTimerDo() iy = (iDist - iwSmall) / 2; funcH = iwBig - iwSmall; if (fHidden == 1) Ybase = iwBig2*(fzoomSpeed-zoomVal)/fzoomSpeed; - mMoveEvent(QWidget::mapFromGlobal ( QCursor::pos() ).x(), QWidget::mapFromGlobal ( QCursor::pos() ).y()); + mMoveEvent(TQWidget::mapFromGlobal ( TQCursor::pos() ).x(), TQWidget::mapFromGlobal ( TQCursor::pos() ).y()); paintEvent(NULL); } @@ -1287,7 +1287,7 @@ void KoolDock::mksmallTimerstop() mksmallTimer->stop(); xosdw->move2(0,rdh); fExpanded=FALSE; - debug(QString("Stopped mksmallTimer")); + debug(TQString("Stopped mksmallTimer")); if (!initialization) {if (fHidden==0) {mTimer->changeInterval(250);} else {mTimer->stop();}} @@ -1335,7 +1335,7 @@ void KoolDock::mksmallTimerstop() if (initialization) pTest(); } -void KoolDock::enterEvent(QEvent *) +void KoolDock::enterEvent(TQEvent *) { if (fExpanded==TRUE && !mksmallTimer->isActive() || mkbigTimer->isActive()) return; if (fStayBelow==1 && fHidden==0) setDockAbove(); @@ -1372,7 +1372,7 @@ void KoolDock::enterEvent(QEvent *) mkbigTimer->start(zoomStep, FALSE); } -void KoolDock::onleaveEvent(QEvent *) +void KoolDock::onleaveEvent(TQEvent *) { if (menuCount>0) return; if (mksmallTimer->isActive()==TRUE) return; @@ -1380,8 +1380,8 @@ void KoolDock::onleaveEvent(QEvent *) zoomTicksS=0; perf->start(); debug("onleaveEvent"); - lastXPos = QWidget::mapFromGlobal ( QCursor::pos() ).x(); - lastYPos = QWidget::mapFromGlobal ( QCursor::pos() ).y(); + lastXPos = TQWidget::mapFromGlobal ( TQCursor::pos() ).x(); + lastYPos = TQWidget::mapFromGlobal ( TQCursor::pos() ).y(); if (mkbigTimer->isActive()) { mkbigTimer->stop(); @@ -1407,19 +1407,19 @@ void KoolDock::edit() } -void KoolDock::run(const QString& command) +void KoolDock::run(const TQString& command) { - QString exec; + TQString exec; kapp->propagateSessionManager(); _filterData->setData( command.stripWhiteSpace() ); - QStringList filters; + TQStringList filters; filters << "kurisearchfilter" << "kshorturifilter"; KURIFilter::self()->filterURI( *(_filterData), filters ); - QString cmd = (_filterData->uri().isLocalFile() ? _filterData->uri().path():_filterData->uri().url()); + TQString cmd = (_filterData->uri().isLocalFile() ? _filterData->uri().path():_filterData->uri().url()); // Nothing interesting. Quit! if(cmd.isEmpty()) { @@ -1437,7 +1437,7 @@ void KoolDock::run(const QString& command) { if (useList) { - KApplication::startServiceByDesktopPath (command, lstDrop, &QString(0) ,&QCString(0) ,0 , "" ,true); + KApplication::startServiceByDesktopPath (command, lstDrop, &TQString(0) ,&TQCString(0) ,0 , "" ,true); } else { @@ -1498,7 +1498,7 @@ void KoolDock::addWindows() if(fShowTaskbar) { KWin::WindowInfo info; - QValueList<WId>::ConstIterator it; + TQValueList<WId>::ConstIterator it; int i; Item *item; @@ -1552,8 +1552,8 @@ void KoolDock::workAreaChanged() int mdw,mdh,mdt; if (xinerama==0) { - mdw=QApplication::desktop()->width(); - mdh = QApplication::desktop()->height(); + mdw=TQApplication::desktop()->width(); + mdh = TQApplication::desktop()->height(); } else { @@ -1593,7 +1593,7 @@ void KoolDock::windowAdded(WId id) if (!fShowTaskbar) return; KWin::WindowInfo info; info = KWin::windowInfo(id); - QString name = info.name(); + TQString name = info.name(); if (name == "kooldock xosd window") { debug("Not adding OSD window to taskbar."); @@ -1605,7 +1605,7 @@ void KoolDock::windowAdded(WId id) return; } - debug(QString("windowAdded(%1)").arg(name)); + debug(TQString("windowAdded(%1)").arg(name)); if (addwTask(id)) addToTaskList(id); addTask(id); @@ -1623,11 +1623,11 @@ void KoolDock::windowRemoved(WId id) if (!fShowTaskbar) return; unsigned int i; Item *item; - debug(QString("windowRemoved(%1)").arg(id)); + debug(TQString("windowRemoved(%1)").arg(id)); KWin::WindowInfo info; info = KWin::windowInfo(id); - QString name = info.name(); + TQString name = info.name(); if (name == "kooldock xosd window") { @@ -1692,13 +1692,13 @@ void KoolDock::windowChanged(WId id, unsigned int properties) #endif if ((fShowNotification) && (id != wm->activeWindow())) { - debug(QString("windowChanged (inactive window changed)")); + debug(TQString("windowChanged (inactive window changed)")); // An inactive window's title changed // notify user item->anim(TRUE); if(onChangeTimer == NULL) { - onChangeTimer = new QTimer(this); + onChangeTimer = new TQTimer(this); connect( onChangeTimer, SIGNAL(timeout()), this, SLOT(onChangeTimerTicked())); onChangeTimer->start( ON_CHANGE_ANIM_INTERVAL, FALSE ); } @@ -1735,14 +1735,14 @@ void KoolDock::systemTrayWindowAdded(WId id) { KWin::WindowInfo info; info = KWin::windowInfo(id); - QString name = info.visibleName(); + TQString name = info.visibleName(); if (ignored(info.name()) == false) { - QPixmap pix = KWin::icon(id, iwBig2, iwBig2, TRUE); + TQPixmap pix = KWin::icon(id, iwBig2, iwBig2, TRUE); numSystray++; items.append(new Item(pix, id, name, iwSmall, iwBig2)); - debug(QString("addSystem Tray(%1)").arg(info.visibleName())); + debug(TQString("addSystem Tray(%1)").arg(info.visibleName())); doUpdateGeometry(); } } @@ -1824,7 +1824,7 @@ void KoolDock::doUpdateGeometry() move2( x, dh - h ); } - //if ((fOrientation & 1)==1) {offscr = QPixmap(h1, w1);} else {offscr = QPixmap(w1, h1);} + //if ((fOrientation & 1)==1) {offscr = TQPixmap(h1, w1);} else {offscr = TQPixmap(w1, h1);} ii_first = 0; ii_last = items.count() - 1; @@ -1852,8 +1852,8 @@ void KoolDock::doUpdateGeometry() { move(0,rdh); } - debug(QString("w1: %1").arg(w1)); - debug(QString("x1: %1").arg(x1)); + debug(TQString("w1: %1").arg(w1)); + debug(TQString("x1: %1").arg(x1)); if (fExpanded) {last_mx=-10; mMoveEvent(lastXPos,lastYPos);} oldfirstX=x; oldtmpw=w; @@ -1870,7 +1870,7 @@ bool KoolDock::rmTask(WId id, int iFound) bool hasfound; hasfound=false; miFound=iFound; - QCString cls; + TQCString cls; if (miFound==-1) { @@ -1900,7 +1900,7 @@ bool KoolDock::rmTask(WId id, int iFound) if (cls==item->getClass()) { int cnt=item->getCount(); - //KMessageBox::information(0,QString("%1").arg(cnt)); + //KMessageBox::information(0,TQString("%1").arg(cnt)); fitem->setCount(0); if (cnt==0) { @@ -1970,8 +1970,8 @@ bool KoolDock::addTask(WId id, int iFound) KWin::WindowInfo info; info = KWin::windowInfo(id,0,NET::WM2WindowClass); const int SUPPORTED_WINDOW_TYPES = NET::NormalMask | NET::DesktopMask | NET::DockMask | NET::ToolbarMask | NET::MenuMask | NET::DialogMask | NET::OverrideMask | NET::TopMenuMask | NET::UtilityMask | NET::SplashMask; - QString name = info.visibleName(); - QCString cls = info.windowClassClass(); + TQString name = info.visibleName(); + TQCString cls = info.windowClassClass(); if (info.windowType(SUPPORTED_WINDOW_TYPES) == NET::Normal || info.windowType(SUPPORTED_WINDOW_TYPES) == NET::Override || info.windowType(SUPPORTED_WINDOW_TYPES) == NET::Dialog || info.windowType(SUPPORTED_WINDOW_TYPES) == NET::Unknown) { if (info.isMinimized() || fMinimizedOnly==0) @@ -2011,10 +2011,10 @@ bool KoolDock::addTask(WId id, int iFound) } } } - QPixmap pix; + TQPixmap pix; items.insert(items.count()-numSystray, new Item(pix, id, name, iwSmall, iwBig2, TRUE)); items.at(items.count()-1)->setClass(cls); - debug(QString("addTask(%1)").arg(info.visibleName())); + debug(TQString("addTask(%1)").arg(info.visibleName())); return true; } } @@ -2029,8 +2029,8 @@ bool KoolDock::addwTask(WId id) KWin::WindowInfo info; info = KWin::windowInfo(id,0,NET::WM2WindowClass); const int SUPPORTED_WINDOW_TYPES = NET::NormalMask | NET::DesktopMask | NET::DockMask | NET::ToolbarMask | NET::MenuMask | NET::DialogMask | NET::OverrideMask | NET::TopMenuMask | NET::UtilityMask | NET::SplashMask; - QString name = info.visibleName(); - QCString cls = info.windowClassClass(); + TQString name = info.visibleName(); + TQCString cls = info.windowClassClass(); if (info.windowType(SUPPORTED_WINDOW_TYPES) == NET::Normal || info.windowType(SUPPORTED_WINDOW_TYPES) == NET::Override || info.windowType(SUPPORTED_WINDOW_TYPES) == NET::Dialog || info.windowType(SUPPORTED_WINDOW_TYPES) == NET::Unknown) { @@ -2038,7 +2038,7 @@ bool KoolDock::addwTask(WId id) { if (ignored(info.name()) == false) { - QPixmap pix = KWin::icon(id, iwBig2, iwBig2, TRUE); + TQPixmap pix = KWin::icon(id, iwBig2, iwBig2, TRUE); witems.append(new Item(pix, id, name, iwSmall, iwBig2)); witems.at(witems.count()-1)->setClass(cls); witems.at(witems.count()-1)->setIndex(witems.count()-1); @@ -2065,7 +2065,7 @@ void KoolDock::loadConf() xosdSize = config->readNumEntry("xosdSize", 17); xosdShadowOffset = config->readNumEntry("xosdShadowOffset", 2); fShowBorders = config->readNumEntry("ShowBorders", 0); - borderColor = QColor(config->readEntry("BorderColor", "#b1c4de")); + borderColor = TQColor(config->readEntry("BorderColor", "#b1c4de")); iwSmall = config->readNumEntry("SmallIconSize", 32); iwBig = config->readNumEntry("BigIconSize", 90); fAmount = config->readNumEntry("BigIconAmount", 5); @@ -2083,8 +2083,8 @@ void KoolDock::loadConf() { dockOpacity = 100; } - bgColor = QColor(config->readEntry("BackgroundColor", "#ccccff")); - sepColor = QColor(config->readEntry("SeparatorColor", "#000000")); + bgColor = TQColor(config->readEntry("BackgroundColor", "#ccccff")); + sepColor = TQColor(config->readEntry("SeparatorColor", "#000000")); fPriority = config->readNumEntry("Priority", 3); fMouseTimer = config->readNumEntry("MouseTimer", 25); fClipping = config->readNumEntry("Clipping", 0); @@ -2136,8 +2136,8 @@ void KoolDock::loadConf() scaleMax = config->readBoolEntry("scaleMax", FALSE); fFirstRun = config->readBoolEntry("FirstRun", TRUE); xinerama = config->readNumEntry("Xinerama", 0); - leftRes=config->readNumEntry("leftRes", QApplication::desktop()->width()); - XinDesiredHeight=config->readNumEntry("XinDesiredHeight", QApplication::desktop()->height()); + leftRes=config->readNumEntry("leftRes", TQApplication::desktop()->width()); + XinDesiredHeight=config->readNumEntry("XinDesiredHeight", TQApplication::desktop()->height()); XinPreviousWidth=config->readNumEntry("XinPreviousWidth", 0); hideTimer = config->readNumEntry("hideTimer", 125); Solid = config->readNumEntry("Solid", 1); @@ -2182,10 +2182,10 @@ void KoolDock::loadConf() void KoolDock::loadIgnore() { - QString line; + TQString line; // read the ignorelist into 'ignoreList' - QFile in(QString(progPath + "/ignorelist.conf")); + TQFile in(TQString(progPath + "/ignorelist.conf")); //clear de ignoreList and the KEditListBox (ignoreBox) ignoreList.clear(); @@ -2368,8 +2368,8 @@ void KoolDock::editPref() setupdlg->SHeight->setEnabled(false); setupdlg->PWidth->setEnabled(false); setupdlg->xrma->setChecked(false); - setupdlg->SleftRes->setValue(QApplication::desktop()->width()); - setupdlg->SHeight->setValue(QApplication::desktop()->height()); + setupdlg->SleftRes->setValue(TQApplication::desktop()->width()); + setupdlg->SHeight->setValue(TQApplication::desktop()->height()); } setupdlg->nav->setChecked(fShowNav==1); setupdlg->chkSshot->setChecked(fShowShot); @@ -2401,15 +2401,15 @@ void KoolDock::editPref() void KoolDock::loadMenu() { - QDir homeDir = QDir::home(); + TQDir homeDir = TQDir::home(); if (homeDir.exists(menuPath)) { - QDir dir(menuPath); + TQDir dir(menuPath); //First we make sure every index is correct! //Lets update the launchers index - QString preffix; - QStringList fileListRemove=dir.entryList("*.desktop"); - QStringList fileListRemove2=fileListRemove; + TQString preffix; + TQStringList fileListRemove=dir.entryList("*.desktop"); + TQStringList fileListRemove2=fileListRemove; //Not really sure why I couldn't do this within the other for, something like fileListRemove[i].remove(0,2).prepend(preffix), but hell it works for(unsigned int i=0; i<fileListRemove2.count(); i++) @@ -2420,17 +2420,17 @@ void KoolDock::loadMenu() //Rename the files so they reflect their new position for(unsigned int i=0; i<fileListRemove.count(); i++) { - if(i<10) preffix=QString("0%1").arg(i); - if(i>=10) preffix=QString("%1").arg(i); + if(i<10) preffix=TQString("0%1").arg(i); + if(i>=10) preffix=TQString("%1").arg(i); - dir.rename(fileListRemove[i], QString("%1%2").arg(preffix).arg(fileListRemove2[i])); + dir.rename(fileListRemove[i], TQString("%1%2").arg(preffix).arg(fileListRemove2[i])); } //End updating launchers index - QStringList fileList = dir.entryList( "*.desktop"); + TQStringList fileList = dir.entryList( "*.desktop"); if(!fileList.isEmpty()) { - for ( QStringList::Iterator it = fileList.begin(); it != fileList.end(); ++it ) + for ( TQStringList::Iterator it = fileList.begin(); it != fileList.end(); ++it ) { if ( ((*it) != ".") && ((*it) != "..") ) { @@ -2442,19 +2442,19 @@ void KoolDock::loadMenu() else { debug("Config directory doesn't exits"); - QDir progPathDir(progPath); + TQDir progPathDir(progPath); progPathDir.mkdir(progPath); - QDir menuPathDir(menuPath); + TQDir menuPathDir(menuPath); menuPathDir.mkdir(menuPath); debug("Created item directory"); // create initial entries. - addFile(QString("00_konqueror.desktop"), QString("konqueror"), QString("kfmclient openProfile webbrowsing"), QString("Konqueror Web Browser"), true, false, false, false, QString("na")); - addFile(QString("01_home.desktop"), QString("kfm_home"), QString("kfmclient openProfile filemanagement"), QString("Home directory"), true, false, false, false, QString("na")); - addFile(QString("02_kmail.desktop"), QString("kmail"), QString("kmail"), QString("KMail"), true, false, false, false, QString("na")); - addFile(QString("03_kate.desktop"), QString("kate"), QString("kate"), QString("Kate"), true, false, false, false, QString("na")); - addFile(QString("04_konsole.desktop"), QString("konsole"), QString("konsole"), QString("Konsole"), true, false, false, false, QString("na")); - addFile(QString("05_kcontrol.desktop"), QString("kcontrol"), QString("kcontrol"), QString("Control Center"), true, false, false, false, QString("na")); + addFile(TQString("00_konqueror.desktop"), TQString("konqueror"), TQString("kfmclient openProfile webbrowsing"), TQString("Konqueror Web Browser"), true, false, false, false, TQString("na")); + addFile(TQString("01_home.desktop"), TQString("kfm_home"), TQString("kfmclient openProfile filemanagement"), TQString("Home directory"), true, false, false, false, TQString("na")); + addFile(TQString("02_kmail.desktop"), TQString("kmail"), TQString("kmail"), TQString("KMail"), true, false, false, false, TQString("na")); + addFile(TQString("03_kate.desktop"), TQString("kate"), TQString("kate"), TQString("Kate"), true, false, false, false, TQString("na")); + addFile(TQString("04_konsole.desktop"), TQString("konsole"), TQString("konsole"), TQString("Konsole"), true, false, false, false, TQString("na")); + addFile(TQString("05_kcontrol.desktop"), TQString("kcontrol"), TQString("kcontrol"), TQString("Control Center"), true, false, false, false, TQString("na")); loadMenu(); } @@ -2486,20 +2486,20 @@ void KoolDock::onChangeTimerTicked() } -void KoolDock::updateBackground(const QPixmap& pix) +void KoolDock::updateBackground(const TQPixmap& pix) { if (pix.width()==1 && pix.height()==1) { if (fHidden == 0) { - if ((fOrientation & 1)==1) {bottomBg = QPixmap(h1, dw);} else {bottomBg = QPixmap(dw, h1);} + if ((fOrientation & 1)==1) {bottomBg = TQPixmap(h1, dw);} else {bottomBg = TQPixmap(dw, h1);} bottomBg.fill (pix.convertToImage().pixel(0,0)); } if (dockOpacity > 0) {bitBlt(&bottomBgf,0,0,&bottomBg);KPixmapEffect::fade(bottomBgf, ((float)dockOpacity)*0.01, bgColor);} } else { - if (fHidden == 0) bottomBg = QPixmap(pix); + if (fHidden == 0) bottomBg = TQPixmap(pix); if (dockOpacity > 0) {bitBlt(&bottomBgf,0,0,&bottomBg);KPixmapEffect::fade(bottomBgf, ((float)dockOpacity)*0.01, bgColor);} } uw=w; @@ -2556,9 +2556,9 @@ void KoolDock::moveApp() KWin::WindowInfo info=KWin::windowInfo(cId); activateApp(); - QCursor::setPos(info.geometry().center()); + TQCursor::setPos(info.geometry().center()); - NETRootInfo ri(qt_xdisplay(), NET::WMMoveResize); + NETRootInfo ri(tqt_xdisplay(), NET::WMMoveResize); ri.moveResizeRequest(cId, info.geometry().center().x(), info.geometry().center().y(), NET::Move); } @@ -2567,9 +2567,9 @@ void KoolDock::resizeApp() KWin::WindowInfo info=KWin::windowInfo(cId); activateApp(); - QCursor::setPos(info.geometry().bottomRight()); + TQCursor::setPos(info.geometry().bottomRight()); - NETRootInfo ri(qt_xdisplay(), NET::WMMoveResize); + NETRootInfo ri(tqt_xdisplay(), NET::WMMoveResize); ri.moveResizeRequest(cId, info.geometry().bottomRight().x(), info.geometry().bottomRight().y(), NET::BottomRight); } @@ -2578,8 +2578,8 @@ void KoolDock::minApp() { Item *item; int i; - QPixmap shot; - QImage tmpImg; + TQPixmap shot; + TQImage tmpImg; KWin::WindowInfo info=KWin::windowInfo(cId); if (info.isMinimized()) @@ -2604,7 +2604,7 @@ void KoolDock::minApp() if(item->getId() == cId) { // take the screenshot - shot = QPixmap::grabWindow(cId); + shot = TQPixmap::grabWindow(cId); // scale the screenshot tmpImg = shot.convertToImage(); tmpImg.scale(iwBig2, iwBig2); @@ -2618,7 +2618,7 @@ void KoolDock::minApp() KWin::iconifyWindow(cId, true); } hide(); - QTimer::singleShot( 100, this, SLOT(refreshBackground()) ); + TQTimer::singleShot( 100, this, SLOT(refreshBackground()) ); } @@ -2656,7 +2656,7 @@ void KoolDock::maxApp() } KWin::activateWindow(cId); hide(); - QTimer::singleShot( 100, this, SLOT(refreshBackground()) ); + TQTimer::singleShot( 100, this, SLOT(refreshBackground()) ); } void KoolDock::restApp() @@ -2681,7 +2681,7 @@ void KoolDock::restApp() KWin::deIconifyWindow(cId, true); KWin::activateWindow(cId); hide(); - QTimer::singleShot( 100, this, SLOT(refreshBackground()) ); + TQTimer::singleShot( 100, this, SLOT(refreshBackground()) ); } void KoolDock::minAllApps() @@ -2689,7 +2689,7 @@ void KoolDock::minAllApps() int i; Item *item; KWin::WindowInfo info=KWin::windowInfo(cId,0,NET::WM2WindowClass); - QCString cls=info.windowClassClass(); + TQCString cls=info.windowClassClass(); for (i=0, item = witems.at(0); item; i++, item = witems.next()) { if (!item->info.isMinimized()) @@ -2711,7 +2711,7 @@ void KoolDock::maxAllApps() int i; Item *item; KWin::WindowInfo info=KWin::windowInfo(cId,0,NET::WM2WindowClass); - QCString cls=info.windowClassClass(); + TQCString cls=info.windowClassClass(); for (i=0, item = witems.at(0); item; i++, item = witems.next()) { if (!(item->info.state() & NET::Max) || item->info.isMinimized()) @@ -2733,7 +2733,7 @@ void KoolDock::restAllApps() int i; Item *item; KWin::WindowInfo info=KWin::windowInfo(cId,0,NET::WM2WindowClass); - QCString cls=info.windowClassClass(); + TQCString cls=info.windowClassClass(); for (i=0, item = witems.at(0); item; i++, item = witems.next()) { if (item->info.state() & NET::Max || item->info.isMinimized()) @@ -2761,14 +2761,14 @@ void KoolDock::closeAllApps() int i; Item *item; KWin::WindowInfo info=KWin::windowInfo(cId,0,NET::WM2WindowClass); - QCString cls=info.windowClassClass(); + TQCString cls=info.windowClassClass(); for (i=0, item = witems.at(0); item; i++, item = witems.next()) { if ((fMinimizedOnly==0 || item->info.isMinimized()) || (fCurrent==0 || item->info.isOnDesktop(info.desktop()))) { if (cls==item->getClass()) { - NETRootInfo app(qt_xdisplay(), NET::CloseWindow); + NETRootInfo app(tqt_xdisplay(), NET::CloseWindow); app.closeWindowRequest(item->getId()); } } @@ -2789,7 +2789,7 @@ void KoolDock::shadeApp() } hide(); - QTimer::singleShot( 100, this, SLOT(refreshBackground()) ); + TQTimer::singleShot( 100, this, SLOT(refreshBackground()) ); } void KoolDock::activateApp() @@ -2817,20 +2817,20 @@ void KoolDock::activateApp() if (info.isMinimized()) KWin::deIconifyWindow(cId, true); KWin::activateWindow(cId); hide(); - QTimer::singleShot( 100, this, SLOT(refreshBackground()) ); + TQTimer::singleShot( 100, this, SLOT(refreshBackground()) ); } void KoolDock::closeApp() { - NETRootInfo app(qt_xdisplay(), NET::CloseWindow); + NETRootInfo app(tqt_xdisplay(), NET::CloseWindow); app.closeWindowRequest(cId); - debug(QString("Closed: %1").arg(cId)); + debug(TQString("Closed: %1").arg(cId)); } void KoolDock::editItem() { - run(QString("kfmclient openProperties ") + iFilename); + run(TQString("kfmclient openProperties ") + iFilename); } @@ -2842,7 +2842,7 @@ void KoolDock::sendToDesktop(int desktop) int i; Item *item; KWin::WindowInfo info=KWin::windowInfo(cId,0,NET::WM2WindowClass); - QCString cls=info.windowClassClass(); + TQCString cls=info.windowClassClass(); for (i=0, item = witems.at(0); item; i++, item = witems.next()) { if ((fMinimizedOnly==0 || item->info.isMinimized()) || (fCurrent==0 || item->info.isOnDesktop(info.desktop()))) @@ -2874,29 +2874,29 @@ void KoolDock::goToWindow(int win) void KoolDock::removeItem() { - QFile::remove(iFilename); + TQFile::remove(iFilename); restart(); } -void KoolDock::addFile(const QString& filename, - const QString& iconname, - const QString& execname, - const QString& name, +void KoolDock::addFile(const TQString& filename, + const TQString& iconname, + const TQString& execname, + const TQString& name, bool notify, bool terminal, bool tclose, bool cuser, - QString puser) + TQString puser) { - QString progPath = locateLocal("data", "kooldock"); - QString menuPath = progPath + QString("/menu/"); - QString confFile = locateLocal("config", "kooldockrc"); + TQString progPath = locateLocal("data", "kooldock"); + TQString menuPath = progPath + TQString("/menu/"); + TQString confFile = locateLocal("config", "kooldockrc"); - QFile out(QString(menuPath + filename)); + TQFile out(TQString(menuPath + filename)); if (out.open(IO_WriteOnly)) { - QTextStream out_s(&out); + TQTextStream out_s(&out); out_s << "[Desktop Entry]" << endl; out_s << "Comment=" << endl; out_s << "Encoding=UTF-8" << endl; @@ -2951,7 +2951,7 @@ void KoolDock::addFile(const QString& filename, } -bool KoolDock::ignored(const QString& appname) +bool KoolDock::ignored(const TQString& appname) { if(ignoreList.count()>0) { @@ -2967,14 +2967,14 @@ bool KoolDock::ignored(const QString& appname) #ifdef _ENABLE_DEBUG -void KoolDock::debug(QString message) +void KoolDock::debug(TQString message) { // debugging function (show messages to stdout) kdDebug(0) << "DEBUG: " << message << endl; } #endif #ifndef _ENABLE_DEBUG -void KoolDock::debug(QString) +void KoolDock::debug(TQString) { } #endif @@ -2998,7 +2998,7 @@ void KoolDock::endProg() void KoolDock::restart() { - QString cmd; + TQString cmd; cmd = mainPath + " &"; kdDebug(0) << "mainPath: " << mainPath << endl; debug("Restarting..."); @@ -3063,12 +3063,12 @@ void KoolDock::chkRestart() } -void KoolDock::setMainPath(const QString& path) +void KoolDock::setMainPath(const TQString& path) { mainPath = path; } -void KoolDock::setArgs(const QString& params) +void KoolDock::setArgs(const TQString& params) { args = params; if (args=="-options" || args=="-o") editPref(); @@ -3141,8 +3141,8 @@ void KoolDock::getBottomBG() pt=p3; p3=p4; p4=pt; } if (xinerama==1) p1+=XinPreviousWidth; - bottomBg = QPixmap::grabWindow(qt_xrootwin(), p1, p2, p3, p4); - //bottomBg = QPixmap::grabWindow(qt_xrootwin(), x1, dh - h1, w1, h1); + bottomBg = TQPixmap::grabWindow(tqt_xrootwin(), p1, p2, p3, p4); + //bottomBg = TQPixmap::grabWindow(tqt_xrootwin(), x1, dh - h1, w1, h1); } void KoolDock::getTopBG() @@ -3158,8 +3158,8 @@ void KoolDock::getTopBG() pt=p3; p3=p4; p4=pt; } if (xinerama==1) p1+=XinPreviousWidth; - topBg = QPixmap::grabWindow(qt_xrootwin(), p1, p2, p3, p4); - //topBg = QPixmap::grabWindow(qt_xrootwin(), x1, dh - h1, w1, h1 - h0); + topBg = TQPixmap::grabWindow(tqt_xrootwin(), p1, p2, p3, p4); + //topBg = TQPixmap::grabWindow(tqt_xrootwin(), x1, dh - h1, w1, h1 - h0); } void KoolDock::setDesktopIconsArea(int left, int top, int width, int height) @@ -3172,10 +3172,10 @@ void KoolDock::setDesktopIconsArea(int left, int top, int width, int height) } for (int i = 0; i < KWin::numberOfDesktops(); i++) { - QByteArray data; - QDataStream args(data, IO_WriteOnly); + TQByteArray data; + TQDataStream args(data, IO_WriteOnly); args << left << top << width << height << i; - client->send("kdesktop", "KDesktopIface", "desktopIconsAreaChanged(QRect, int)", data); + client->send("kdesktop", "KDesktopIface", "desktopIconsAreaChanged(TQRect, int)", data); } } @@ -3248,7 +3248,7 @@ void KoolDock::init1() if (fPriority > 19) fPriority = DEF_PRIORITY; if (fPriority < 0) fPriority = DEF_PRIORITY; setpriority(0, 0, fPriority); - debug(QString("Priority: %1").arg(fPriority)); + debug(TQString("Priority: %1").arg(fPriority)); iwBig2 = iwBig; @@ -3289,12 +3289,12 @@ void KoolDock::init1() } // Create the "xosd" widget xosdw = new xosd(); - rdh=QApplication::desktop()->height(); + rdh=TQApplication::desktop()->height(); xosdw->move(0,rdh); wm = new KWinModule(); - info = new NETWinInfo( qt_xdisplay(), winId(), qt_xrootwin(), NET::WMState); + info = new NETWinInfo( tqt_xdisplay(), winId(), tqt_xrootwin(), NET::WMState); info->setDesktop( NETWinInfo::OnAllDesktops ); info->setState(NETWinInfo::SkipTaskbar | NETWinInfo::SkipPager, NETWinInfo::SkipTaskbar | NETWinInfo::SkipPager); setBackgroundMode(NoBackground); @@ -3328,11 +3328,11 @@ void KoolDock::init1() connect(wm, SIGNAL(systemTrayWindowAdded(WId)), SLOT(systemTrayWindowAdded(WId))); connect(wm, SIGNAL(systemTrayWindowRemoved(WId)), SLOT(systemTrayWindowRemoved(WId))); - QCString screenstr; - screenstr.setNum(qt_xscreen()); - QCString trayatom = "_NET_SYSTEM_TRAY_S" + screenstr; + TQCString screenstr; + screenstr.setNum(tqt_xscreen()); + TQCString trayatom = "_NET_SYSTEM_TRAY_S" + screenstr; - Display *display = qt_xdisplay(); + Display *display = tqt_xdisplay(); net_system_tray_selection = XInternAtom(display, trayatom, false); net_system_tray_opcode = XInternAtom(display, "_NET_SYSTEM_TRAY_OPCODE", false); @@ -3340,7 +3340,7 @@ void KoolDock::init1() // Acquire system tray XSetSelectionOwner(display, net_system_tray_selection, winId(), CurrentTime); - //WId root = qt_xrootwin(); + //WId root = tqt_xrootwin(); if (XGetSelectionOwner (display, net_system_tray_selection) == winId()) { @@ -3366,16 +3366,16 @@ void KoolDock::init1() // Pseudo-Transparency code rootpix = new KRootPixmap(this); rootpix->setCustomPainting(TRUE); - connect(rootpix, SIGNAL(backgroundUpdated (const QPixmap &)), SLOT(updateBackground(const QPixmap &))); + connect(rootpix, SIGNAL(backgroundUpdated (const TQPixmap &)), SLOT(updateBackground(const TQPixmap &))); rootpix->start(); - debug(QString("Items loaded: %1").arg(items.count())); + debug(TQString("Items loaded: %1").arg(items.count())); //Simple work around to support xinerama (user defined) if(xinerama==0) { - dw=QApplication::desktop()->width(); - dh = QApplication::desktop()->height(); + dw=TQApplication::desktop()->width(); + dh = TQApplication::desktop()->height(); } else { @@ -3406,7 +3406,7 @@ void KoolDock::init1() } if (fOrientation==2 || fOrientation==1) { - QString tmpstr; + TQString tmpstr; tmpstr=fLeftImg; fLeftImg=fRightImg; fRightImg=tmpstr; @@ -3422,7 +3422,7 @@ void KoolDock::init1() // When the mouse pointer reaches the bottom of the screen, the bar should popup in a userdefined time (int hideTimer) track2active=FALSE; - trackTimer = new QTimer(this); + trackTimer = new TQTimer(this); connect(trackTimer, SIGNAL(timeout()), this, SLOT(trackTimerEnd())); ii_first = 0; @@ -3439,18 +3439,18 @@ void KoolDock::init1() nom = ""; aux = ""; - mTimer = new QTimer(this); + mTimer = new TQTimer(this); connect(mTimer, SIGNAL(timeout()), this, SLOT(mTimerEnd())); _filterData = new KURIFilterData(); - mkbigTimer = new QTimer(this); + mkbigTimer = new TQTimer(this); connect(mkbigTimer, SIGNAL(timeout()), this, SLOT(mkbigTimerDo())); - mksmallTimer = new QTimer(this); + mksmallTimer = new TQTimer(this); connect(mksmallTimer, SIGNAL(timeout()), this, SLOT(mksmallTimerDo())); - QWMatrix m; + TQWMatrix m; m.rotate( -90*fOrientation ); if (!fLeftImg.isEmpty()) { @@ -3475,7 +3475,7 @@ void KoolDock::init1() debug("Kooldock has started"); doUpdateGeometry(); - if ((fOrientation & 1)==1) {offscr = QPixmap(h1, dw); bottomBgf = QPixmap(h1, dw);} else {offscr = QPixmap(dw, h1); bottomBgf = QPixmap(dw, h1);} + if ((fOrientation & 1)==1) {offscr = TQPixmap(h1, dw); bottomBgf = TQPixmap(h1, dw);} else {offscr = TQPixmap(dw, h1); bottomBgf = TQPixmap(dw, h1);} soffset = iwSmall/2 + func2(abs(1-funcW)) + func2(abs(iDist+1-funcW)) + func2(abs(2*iDist+1-funcW)) + func2(abs(3*iDist +1-funcW))/2 - ((int)((iwBig - iwSmall)*0.6*fAmount) + iSpace*2)/2 - 4*iwSmall - (int)((3*iDist+1-funcW)*(func(0) + func(iDist) - 2*iwSmall)/(2*iDist))+1; eoffset=(int)((iwBig2-iwSmall)*fAmount/100); @@ -3573,9 +3573,9 @@ void KoolDock::refreshBackground() paintEvent(NULL); } -void KoolDock::dragMoveEvent(QDragMoveEvent* event) +void KoolDock::dragMoveEvent(TQDragMoveEvent* event) { - if (mouseOnLauncher && QTextDrag::canDecode(event)) + if (mouseOnLauncher && TQTextDrag::canDecode(event)) { event->accept(); } @@ -3585,21 +3585,21 @@ void KoolDock::dragMoveEvent(QDragMoveEvent* event) } } -void KoolDock::dropEvent(QDropEvent* event) +void KoolDock::dropEvent(TQDropEvent* event) { - QString strDrop; - QPoint pointer; - pointer = QCursor::pos(); + TQString strDrop; + TQPoint pointer; + pointer = TQCursor::pos(); int px, py; px = pointer.x()-pos().x(); py = pointer.y()-pos().y(); - QTextDrag::decode(event, strDrop); - lstDrop=QStringList::split(QString("\n"),strDrop,false); + TQTextDrag::decode(event, strDrop); + lstDrop=TQStringList::split(TQString("\n"),strDrop,false); useList=true; - mPress (px, py, Qt::LeftButton); + mPress (px, py, TQt::LeftButton); useList=false; } @@ -3608,7 +3608,7 @@ void KoolDock::movetoback(WId id) int i; Item *item; int ic=-1,jc; - QCString cls; + TQCString cls; //find clicked item in witems list for (i=0, item = witems.at(0); item; i++, item = witems.next()) @@ -3669,7 +3669,7 @@ void KoolDock::aboutToHide() void KoolDock::createMenu(KPopupMenu* tmpMenu, KWin::WindowInfo * info) { - QString appTitle; + TQString appTitle; int menustate; appTitle = info->visibleName(); appTitle.truncate(30); @@ -3726,13 +3726,13 @@ void KoolDock::updTaskList() } KWin::WindowInfo info; - QValueList<WId>::ConstIterator it; + TQValueList<WId>::ConstIterator it; for (it=wm->windows().begin(); it != wm->windows().end(); ++it) { tmpinfo=KWin::windowInfo(*it); const int SUPPORTED_WINDOW_TYPES = NET::NormalMask | NET::DesktopMask | NET::DockMask | NET::ToolbarMask | NET::MenuMask | NET::DialogMask | NET::OverrideMask | NET::TopMenuMask | NET::UtilityMask | NET::SplashMask; - QString name = tmpinfo.visibleName(); + TQString name = tmpinfo.visibleName(); if (tmpinfo.windowType(SUPPORTED_WINDOW_TYPES) == NET::Normal || tmpinfo.windowType(SUPPORTED_WINDOW_TYPES) == NET::Override || tmpinfo.windowType(SUPPORTED_WINDOW_TYPES) == NET::Dialog || tmpinfo.windowType(SUPPORTED_WINDOW_TYPES) == NET::Unknown) { @@ -3777,7 +3777,7 @@ void KoolDock::addToTaskList(WId id) rIndex = tmpinfo.desktop(); const int SUPPORTED_WINDOW_TYPES = NET::NormalMask | NET::DesktopMask | NET::DockMask | NET::ToolbarMask | NET::MenuMask | NET::DialogMask | NET::OverrideMask | NET::TopMenuMask | NET::UtilityMask | NET::SplashMask; - QString name = tmpinfo.visibleName(); + TQString name = tmpinfo.visibleName(); if (tmpinfo.windowType(SUPPORTED_WINDOW_TYPES) == NET::Normal || tmpinfo.windowType(SUPPORTED_WINDOW_TYPES) == NET::Override || tmpinfo.windowType(SUPPORTED_WINDOW_TYPES) == NET::Dialog || tmpinfo.windowType(SUPPORTED_WINDOW_TYPES) == NET::Unknown) { |
