diff options
Diffstat (limited to 'kkbswitch/kbswitchtrayicon.cpp')
-rw-r--r-- | kkbswitch/kbswitchtrayicon.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/kkbswitch/kbswitchtrayicon.cpp b/kkbswitch/kbswitchtrayicon.cpp index 908875c..335f906 100644 --- a/kkbswitch/kbswitchtrayicon.cpp +++ b/kkbswitch/kbswitchtrayicon.cpp @@ -15,7 +15,7 @@ * * ***************************************************************************/ -#include <kdeversion.h> +#include <tdeversion.h> #undef USE_BOLD_MENUITEM @@ -24,37 +24,37 @@ #ifdef USE_BOLD_MENUITEM #include "boldmenuitem.h" #endif -#include <kpopupmenu.h> -#if KDE_VERSION_MAJOR >= 3 +#include <tdepopupmenu.h> +#if TDE_VERSION_MAJOR >= 3 #include <kstandarddirs.h> #else #include <kstddirs.h> #endif -#include <klocale.h> +#include <tdelocale.h> #include <kstdaction.h> -#include <kaction.h> -#include <kaboutapplication.h> -#if KDE_VERSION_MAJOR >= 3 - #include <kapplication.h> +#include <tdeaction.h> +#include <tdeaboutapplication.h> +#if TDE_VERSION_MAJOR >= 3 + #include <tdeapplication.h> #else #include <kapp.h> #endif #include <kiconloader.h> #include <kdebug.h> -#include <kdeversion.h> +#include <tdeversion.h> #include <ntqtooltip.h> #include <ntqstyle.h> #include <ntqpainter.h> #ifdef USE_BOLD_MENUITEM -static TQColor getActiveTextColor(KPopupMenu *menu) +static TQColor getActiveTextColor(TDEPopupMenu *menu) { int id = menu->insertItem("test text"); TQMenuItem *item = menu->findItem(id); TQStyleOption styleopt = TQStyleOption(item); TQPainter painter(menu); TQColorGroup &cg = menu->colorGroup(); - KApplication::style().drawControl(TQStyle::CE_PopupMenuItem, &painter, menu, + TDEApplication::style().drawControl(TQStyle::CE_PopupMenuItem, &painter, menu, menu->contentsRect(), cg, TQStyle::Style_Enabled | TQStyle::Style_Active, styleopt); menu->removeItem(id); @@ -64,8 +64,8 @@ static TQColor getActiveTextColor(KPopupMenu *menu) KBSwitchTrayIcon::KBSwitchTrayIcon(KBConfig *conf){ TQPixmap pix; -#if KDE_VERSION_MAJOR >= 3 - KActionCollection *actions = new KActionCollection(this); +#if TDE_VERSION_MAJOR >= 3 + TDEActionCollection *actions = new TDEActionCollection(this); #define ACTION_PARENT actions #else #define ACTION_PARENT this @@ -73,21 +73,21 @@ KBSwitchTrayIcon::KBSwitchTrayIcon(KBConfig *conf){ m_kbconf = conf; //TQObject::connect(conf, SIGNAL(changed()), this, SLOT(updateMenuIcons())); - KPopupMenu * menu = contextMenu(); + TDEPopupMenu * menu = contextMenu(); addLayoutItems(menu, false); TQObject::connect(menu, SIGNAL(activated(int)), this, SLOT(slotMenuActivated(int))); menu->insertSeparator(); - KAction *pref = KStdAction::preferences(this, SIGNAL(preferencesSelected()), ACTION_PARENT); + TDEAction *pref = KStdAction::preferences(this, SIGNAL(preferencesSelected()), ACTION_PARENT); pref->plug(menu); - KAction *help = KStdAction::help(this, SLOT(slotHelp()), ACTION_PARENT); + TDEAction *help = KStdAction::help(this, SLOT(slotHelp()), ACTION_PARENT); help->plug(menu); - KAction *about = KStdAction::aboutApp(this, SLOT(slotAbout()), ACTION_PARENT); + TDEAction *about = KStdAction::aboutApp(this, SLOT(slotAbout()), ACTION_PARENT); about->plug(menu); /*TQString path = locate("icon", "hicolor/16x16/apps/locale.png"); if (!path.isEmpty()) pix.load(path);*/ - pix = kapp->iconLoader()->loadIcon("locale", KIcon::Small); + pix = kapp->iconLoader()->loadIcon("locale", TDEIcon::Small); menu->changeTitle(menu->idAt(0), pix, i18n("Keyboard Switch")); setAlignment(TQt::AlignHCenter | TQt::AlignCenter); } @@ -103,7 +103,7 @@ void KBSwitchTrayIcon::slotMenuActivated(int id){ /** No descriptions */ void KBSwitchTrayIcon::setActiveGroup(int groupno){ int i; - KPopupMenu *menu = contextMenu(); + TDEPopupMenu *menu = contextMenu(); for (i = 0; i < m_kbconf->groupCount(); i++) menu->setItemChecked(i, false); menu->setItemChecked(groupno, true); @@ -113,7 +113,7 @@ void KBSwitchTrayIcon::setActiveGroup(int groupno){ void KBSwitchTrayIcon::setToggleGroups(int group1, int group2){ int i; bool toggling; - KPopupMenu *menu = contextMenu(); + TDEPopupMenu *menu = contextMenu(); for (i = 0; i < m_kbconf->groupCount(); i++) { toggling = (i == group1 || i == group2); @@ -138,20 +138,20 @@ void KBSwitchTrayIcon::mouseReleaseEvent(TQMouseEvent *event){ /** No descriptions */ void KBSwitchTrayIcon::slotAbout(){ - KAboutApplication about; + TDEAboutApplication about; about.exec(); } /** No descriptions */ void KBSwitchTrayIcon::updateMenuIcons(){ - KPopupMenu *menu = contextMenu(); + TDEPopupMenu *menu = contextMenu(); for (int i = 0; i < m_kbconf->groupCount(); i++) { menu->changeItem(i, m_kbconf->getGroup(i)->getPixmap(), menu->text(i)); } } /** No descriptions */ -void KBSwitchTrayIcon::addLayoutItems(KPopupMenu *menu, bool clearOld) { +void KBSwitchTrayIcon::addLayoutItems(TDEPopupMenu *menu, bool clearOld) { KBGroup *group; int index; #ifdef USE_BOLD_MENUITEM |