diff options
Diffstat (limited to 'src/tastymenu.cpp')
-rw-r--r-- | src/tastymenu.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/src/tastymenu.cpp b/src/tastymenu.cpp index 1ec371e..3dc3e7e 100644 --- a/src/tastymenu.cpp +++ b/src/tastymenu.cpp @@ -33,7 +33,7 @@ #include <kuser.h> #include <kstandarddirs.h> #include <kdebug.h> -#include <qstyle.h> +#include <tqstyle.h> #include "tastymenu.h" @@ -42,7 +42,7 @@ -TastyMenu::TastyMenu(const QString& configFile, Type type, int actions, QWidget *parent, const char *name) +TastyMenu::TastyMenu(const TQString& configFile, Type type, int actions, TQWidget *parent, const char *name) : KPanelApplet(configFile, type, actions, parent, name), numNewApplications(0) { @@ -59,8 +59,8 @@ TastyMenu::TastyMenu(const QString& configFile, Type type, int actions, QWidget menuHandler = new MenuHandler(this, prefSkel, "MenuHandler", prefSkel->isNormalWindow() ? - Qt::WType_Dialog : - Qt::WType_Popup|Qt::WNoAutoErase); + TQt::WType_Dialog : + TQt::WType_Popup|TQt::WNoAutoErase); connect (button, SIGNAL (pressed()), this, SLOT (clickSlot ())); connect (menuHandler, SIGNAL(hidden()), this, SLOT(setButtonUp())); @@ -72,7 +72,7 @@ TastyMenu::TastyMenu(const QString& configFile, Type type, int actions, QWidget button -> setUsesTextLabel(prefSkel->menuButtonLabelType() != Prefs::EnumMenuButtonLabelType::MenuButtonNone); - button -> setTextPosition(QToolButton::BesideIcon); + button -> setTextPosition(TQToolButton::BesideIcon); menuTip = new TastyToolTip(button); _toolTipTitle = prefSkel->toolTipTitle(); @@ -120,7 +120,7 @@ void TastyMenu::loadMenuButtonIcon() if( prefSkel->menuButtonIconType() == Prefs::EnumMenuButtonIconType::IconNone ) { - button->setIconSet(QIconSet()); + button->setIconSet(TQIconSet()); return; } @@ -129,7 +129,7 @@ void TastyMenu::loadMenuButtonIcon() else if(position() == pLeft || position() == pRight) _iconsize = width(); - QPixmap btnPixmap(iconLoader->loadIcon(_menuButtonIcon, KIcon::Panel, _iconsize)); + TQPixmap btnPixmap(iconLoader->loadIcon(_menuButtonIcon, KIcon::Panel, _iconsize)); if( !btnPixmap.isNull() ) button->setIconSet(btnPixmap); else @@ -139,31 +139,31 @@ void TastyMenu::loadMenuButtonIcon() } } -QPoint TastyMenu::menupos(QWidget *widget) +TQPoint TastyMenu::menupos(TQWidget *widget) { //now should look decent on all positions switch( position() ) { case pLeft: { - return QPoint( this->mapToGlobal( this->geometry().topRight() )); + return TQPoint( this->mapToGlobal( this->geometry().topRight() )); break; } case pRight: { - QPoint buttonCoord = this->mapToGlobal(this->geometry().topLeft()); - return QPoint( buttonCoord.x()-widget->width(), buttonCoord.y() ); + TQPoint buttonCoord = this->mapToGlobal(this->geometry().topLeft()); + return TQPoint( buttonCoord.x()-widget->width(), buttonCoord.y() ); break; } case pTop: { - return QPoint( this->mapToGlobal( this->geometry().bottomLeft() )); + return TQPoint( this->mapToGlobal( this->geometry().bottomLeft() )); break; } default: //pBottom or floating { - QPoint buttonCoord = this->mapToGlobal(this->geometry().topLeft()); - return QPoint( buttonCoord.x(), buttonCoord.y()-widget->height() ); + TQPoint buttonCoord = this->mapToGlobal(this->geometry().topLeft()); + return TQPoint( buttonCoord.x(), buttonCoord.y()-widget->height() ); break; } } @@ -175,7 +175,7 @@ void TastyMenu::clickSlot() menuHandler->popup(menupos(menuHandler)); - //QTimer::singleShot( 10000, this, SLOT(setButtonUp()) ); + //TQTimer::singleShot( 10000, this, SLOT(setButtonUp()) ); } void TastyMenu::about() @@ -287,10 +287,10 @@ void TastyMenu::setGlobalAccel( bool global ) kickerConf = KGlobal::config(); kickerConf->setGroup("Global Shortcuts"); - QString kmenuShortcut = kickerConf->readEntry("Popup Launch Menu", "default(Alt+F1)"); + TQString kmenuShortcut = kickerConf->readEntry("Popup Launch Menu", "default(Alt+F1)"); if( kmenuShortcut=="none" ) return; - QString tastyMenuShortcut = kickerConf->readEntry("Toggle Tasty Menu", ""); + TQString tastyMenuShortcut = kickerConf->readEntry("Toggle Tasty Menu", ""); KShortcut shortCutKey(tastyMenuShortcut); kickerConf->writeEntry("Popup Launch Menu", "none"); kickerConf->writeEntry("Toggle Tasty Menu", kmenuShortcut); @@ -347,7 +347,7 @@ void TastyMenu::setNewApplicationsMessage( int number ) /*else if( number == 1) menuTip ->setMessage(i18n("There is one new installed application")); else - menuTip ->setMessage(i18n("There are")+" " + QString().setNum(number) +" "+ i18n("new installed applications"));*/ + menuTip ->setMessage(i18n("There are")+" " + TQString().setNum(number) +" "+ i18n("new installed applications"));*/ if( _showBigToolTip && number > numNewApplications ) menuTip->notify( menupos( menuTip ) ); @@ -361,7 +361,7 @@ int TastyMenu::widthForHeight(int height) const int buttonWidth = width(); if( position() == pTop || position() == pBottom ) { - button -> setTextPosition(QToolButton::BesideIcon); + button -> setTextPosition(TQToolButton::BesideIcon); if( prefSkel->menuButtonLabelType() != Prefs::EnumMenuButtonLabelType::MenuButtonNone ) return ((button->fontMetrics()).width(button->textLabel())) + _iconsize + 10; @@ -380,7 +380,7 @@ int TastyMenu::heightForWidth(int width) const if( prefSkel->menuButtonLabelType() != Prefs::EnumMenuButtonLabelType::MenuButtonNone ) { - button -> setTextPosition(QToolButton::BelowIcon); + button -> setTextPosition(TQToolButton::BelowIcon); return ((button->fontMetrics()).height()) + _iconsize + 10; } else @@ -390,7 +390,7 @@ int TastyMenu::heightForWidth(int width) const return buttonHeight; } -void TastyMenu::resizeEvent(QResizeEvent *e) +void TastyMenu::resizeEvent(TQResizeEvent *e) { int newHeight = e->size().height(); button->setFixedHeight(newHeight); @@ -405,7 +405,7 @@ void TastyMenu::resizeEvent(QResizeEvent *e) loadMenuButtonIcon(); } -void TastyMenu::mousePressEvent(QMouseEvent *e) +void TastyMenu::mousePressEvent(TQMouseEvent *e) { menuTip->hideTip(); @@ -463,7 +463,7 @@ void TastyMenu::mousePressEvent(QMouseEvent *e) } } -void TastyMenu::enterEvent( QEvent * e ) +void TastyMenu::enterEvent( TQEvent * e ) { e=e; if( _showBigToolTip && !menuHandler->isVisible() ) @@ -472,7 +472,7 @@ void TastyMenu::enterEvent( QEvent * e ) KPanelApplet::enterEvent(e); } -void TastyMenu::leaveEvent( QEvent * e ) +void TastyMenu::leaveEvent( TQEvent * e ) { e=e; menuTip->hideTip(); @@ -482,7 +482,7 @@ void TastyMenu::leaveEvent( QEvent * e ) extern "C" { - KPanelApplet* init( QWidget *parent, const QString& configFile) + KPanelApplet* init( TQWidget *parent, const TQString& configFile) { KGlobal::locale()->insertCatalogue("tastymenu"); return new TastyMenu(configFile, KPanelApplet::Normal, |