diff options
Diffstat (limited to 'src/kbfxspinx.cpp')
-rw-r--r-- | src/kbfxspinx.cpp | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/src/kbfxspinx.cpp b/src/kbfxspinx.cpp index 4208b21..af0e65f 100644 --- a/src/kbfxspinx.cpp +++ b/src/kbfxspinx.cpp @@ -25,10 +25,10 @@ bool KbfxSpinx::m_horizontal_position = TRUE; -KbfxSpinx::KbfxSpinx ( const QString& configFile, Type type, int actions, QWidget *parent, const char *name ) - : KPanelApplet ( configFile, type, actions, parent, name ),DCOPObject ( "KBFXInterface" ) +KbfxSpinx::KbfxSpinx ( const TQString& configFile, Type type, int actions, TQWidget *tqparent, const char *name ) + : KPanelApplet ( configFile, type, actions, tqparent, name ),DCOPObject ( "KBFXInterface" ) { - m_parent = parent; + m_parent = tqparent; createKbfx(); } @@ -36,9 +36,9 @@ KbfxSpinx::~KbfxSpinx() { } -void KbfxSpinx::dirtyReaload(const QString & dir) +void KbfxSpinx::dirtyReaload(const TQString & dir) { - QString _dir=dir; + TQString _dir=dir; notifyConfigChange(); } @@ -55,19 +55,19 @@ void KbfxSpinx::createKbfx() if ( ConfigInit ().m_KbfxMenuType == "kmenu" ) { kbfxBtn->show(); - kbfxBtn->repaint(); + kbfxBtn->tqrepaint(); } else { createRMenu(); - connect ( m_menu,SIGNAL ( aboutToHide () ),kbfxBtn,SLOT ( toggle() ) ); + connect ( m_menu,TQT_SIGNAL ( aboutToHide () ),kbfxBtn,TQT_SLOT ( toggle() ) ); } - kmenu_timer = new QTimer ( this,"Fade Timer" ); - connect ( kmenu_timer, SIGNAL ( timeout() ), kbfxBtn, SLOT ( toggleKMenu () ) ); + kmenu_timer = new TQTimer ( this,"Fade Timer" ); + connect ( kmenu_timer, TQT_SIGNAL ( timeout() ), kbfxBtn, TQT_SLOT ( toggleKMenu () ) ); - connect ( kbfxBtn , SIGNAL ( pressed() ),this,SLOT ( showKbfxMenu() ) ); - connect ( kbfxBtn , SIGNAL ( showToolTip() ),this,SLOT ( ToolTip() ) ); + connect ( kbfxBtn , TQT_SIGNAL ( pressed() ),this,TQT_SLOT ( showKbfxMenu() ) ); + connect ( kbfxBtn , TQT_SIGNAL ( showToolTip() ),this,TQT_SLOT ( ToolTip() ) ); if ( m_kicker_auto_adjust ) m_parent->resize ( m_parent->width(),kbfxBtn->height() ); @@ -75,15 +75,15 @@ void KbfxSpinx::createKbfx() if (m_KbfxWatcher) { - l_watch = new KDirWatch(this,"SyscocaWatch"); + l_watch = new KDirWatch(TQT_TQOBJECT(this),"SyscocaWatch"); KUser * l_user = new KUser(); - QString l_path("/var/tmp/kdecache-"); + TQString l_path("/var/tmp/kdecache-"); l_path.append(l_user->loginName()); l_path.append("/"); l_watch->addDir(l_path); l_watch->startScan( TRUE, FALSE); - connect ( l_watch, SIGNAL ( dirty(const QString&) ), - this, SLOT ( dirtyReaload(const QString&) ) ); + connect ( l_watch, TQT_SIGNAL ( dirty(const TQString&) ), + this, TQT_SLOT ( dirtyReaload(const TQString&) ) ); delete l_user; } } @@ -95,7 +95,7 @@ void KbfxSpinx::notifyConfigChange() /* FIXME The delete here does not reload everything. - Only the button and the parent menu. + Only the button and the tqparent menu. Carefull memory de-allocation is needed before deleteing further :-( Else be ready for a nice backtrace. Memleak is obvious. @@ -128,7 +128,7 @@ void KbfxSpinx::createRMenu() m_menuWidget = new KbfxSpinxMenuWidget ( m_menu,"KbfxSpinxMenu" ); m_menu->addItem ( m_menuWidget,0 ); kbfxBtn->show(); - kbfxBtn->repaint(); + kbfxBtn->tqrepaint(); menuPosition(); } @@ -151,7 +151,7 @@ void KbfxSpinx::ToolTip () KbfxToolTip *tooltip = new KbfxToolTip (); - QPoint xpoint = ( this->mapToGlobal ( QPoint ( 0, 0 ) ) ); + TQPoint xpoint = ( this->mapToGlobal ( TQPoint ( 0, 0 ) ) ); int popx = xpoint.x (); int popy = xpoint.y (); @@ -172,8 +172,8 @@ void KbfxSpinx::ToolTip () popx -= tooltip->width(); } - connect ( kbfxBtn, SIGNAL ( leave () ), tooltip, SLOT ( hideToolTip () ) ); - connect ( kbfxBtn, SIGNAL ( clicked () ), tooltip, SLOT ( hideToolTip () ) ); + connect ( kbfxBtn, TQT_SIGNAL ( leave () ), tooltip, TQT_SLOT ( hideToolTip () ) ); + connect ( kbfxBtn, TQT_SIGNAL ( clicked () ), tooltip, TQT_SLOT ( hideToolTip () ) ); tooltip->setStartPos ( popx, popy ); tooltip->show (); } @@ -186,40 +186,40 @@ void KbfxSpinx::showKmenu() height of the K-menu **/ - this->setCursor ( Qt::BlankCursor ); + this->setCursor ( TQt::BlankCursor ); - QByteArray data, rdata; - QDataStream arg ( data, IO_WriteOnly ); - QCString replytype; - QPoint _tmp ( QCursor::pos () ); + TQByteArray data, rdata; + TQDataStream arg ( data, IO_WriteOnly ); + TQCString replytype; + TQPoint _tmp ( TQCursor::pos () ); if ( position () == pTop || position () == pBottom ) { if ( _tmp.y () > 128 ) { - QCursor::setPos ( this->mapToGlobal ( QPoint ( 0, 0 ) ) ); + TQCursor::setPos ( this->mapToGlobal ( TQPoint ( 0, 0 ) ) ); } else { - QCursor::setPos ( this->mapToGlobal ( this->geometry ().bottomLeft () ) ); + TQCursor::setPos ( this->mapToGlobal ( this->tqgeometry ().bottomLeft () ) ); } } else { if ( _tmp.x () > 128 ) { - QCursor::setPos ( this->mapToGlobal ( QPoint ( 0, 0 ) ) ); + TQCursor::setPos ( this->mapToGlobal ( TQPoint ( 0, 0 ) ) ); } else { - QCursor::setPos ( this->mapToGlobal ( this->geometry ().topRight () ) ); + TQCursor::setPos ( this->mapToGlobal ( this->tqgeometry ().topRight () ) ); } } - arg << QPoint ( QCursor::pos () ); + arg << TQPoint ( TQCursor::pos () ); if ( !m_dcopClient-> - call ( "kicker", "kicker", "popupKMenu(QPoint)", data, replytype, rdata, + call ( "kicker", "kicker", "popupKMenu(TQPoint)", data, replytype, rdata, FALSE, -1 ) ) { kdWarning () @@ -227,8 +227,8 @@ void KbfxSpinx::showKmenu() << endl; } - this->setCursor ( Qt::ArrowCursor ); - QCursor::setPos ( _tmp ); + this->setCursor ( TQt::ArrowCursor ); + TQCursor::setPos ( _tmp ); if ( !kmenu_timer->isActive ()) kmenu_timer->start(5000,true); kdDebug () << "Kmenu Called" << endl; @@ -287,27 +287,27 @@ int KbfxSpinx::heightForWidth ( int width ) const return kbfxBtn->height(); } -QPoint KbfxSpinx::menuPosition() +TQPoint KbfxSpinx::menuPosition() { - QPoint xpoint = ( this->mapToGlobal ( QPoint ( 0, 0 ) ) ); + TQPoint xpoint = ( this->mapToGlobal ( TQPoint ( 0, 0 ) ) ); int popx = xpoint.x (); int popy = xpoint.y (); if ( position () == pTop ) { - return QPoint ( popx, ( popy + this->height() ) ); + return TQPoint ( popx, ( popy + this->height() ) ); } if ( position () == pBottom ) { - return QPoint ( popx, ( popy - m_menuWidget->height() ) ); + return TQPoint ( popx, ( popy - m_menuWidget->height() ) ); } if ( position () == pLeft ) { - return QPoint ( ( popx + this->width() ), popy ); + return TQPoint ( ( popx + this->width() ), popy ); } if ( position () == pRight ) { - return QPoint ( ( popx - m_menuWidget->width() ), popy ); + return TQPoint ( ( popx - m_menuWidget->width() ), popy ); } return xpoint; // Should never be reached? @@ -315,12 +315,12 @@ QPoint KbfxSpinx::menuPosition() extern "C" { - KPanelApplet* init ( QWidget *parent, const QString& configFile ) + KPanelApplet* init ( TQWidget *tqparent, const TQString& configFile ) { KGlobal::locale()->insertCatalogue ( "KbfxSpinx" ); return new KbfxSpinx ( configFile, KPanelApplet::Normal, KPanelApplet::About | KPanelApplet::Help | KPanelApplet::Preferences, - parent, "KbfxSpinx" ); + tqparent, "KbfxSpinx" ); } } |