diff options
Diffstat (limited to 'kkbswitch/kbswitchtrayicon.cpp')
-rw-r--r-- | kkbswitch/kbswitchtrayicon.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/kkbswitch/kbswitchtrayicon.cpp b/kkbswitch/kbswitchtrayicon.cpp index 4a51bfe..908875c 100644 --- a/kkbswitch/kbswitchtrayicon.cpp +++ b/kkbswitch/kbswitchtrayicon.cpp @@ -42,20 +42,20 @@ #include <kiconloader.h> #include <kdebug.h> #include <kdeversion.h> -#include <qtooltip.h> -#include <qstyle.h> -#include <qpainter.h> +#include <ntqtooltip.h> +#include <ntqstyle.h> +#include <ntqpainter.h> #ifdef USE_BOLD_MENUITEM -static QColor getActiveTextColor(KPopupMenu *menu) +static TQColor getActiveTextColor(KPopupMenu *menu) { int id = menu->insertItem("test text"); - QMenuItem *item = menu->findItem(id); - QStyleOption styleopt = QStyleOption(item); - QPainter painter(menu); - QColorGroup &cg = menu->colorGroup(); - KApplication::style().drawControl(QStyle::CE_PopupMenuItem, &painter, menu, - menu->contentsRect(), cg, QStyle::Style_Enabled | QStyle::Style_Active, + TQMenuItem *item = menu->findItem(id); + TQStyleOption styleopt = TQStyleOption(item); + TQPainter painter(menu); + TQColorGroup &cg = menu->colorGroup(); + KApplication::style().drawControl(TQStyle::CE_PopupMenuItem, &painter, menu, + menu->contentsRect(), cg, TQStyle::Style_Enabled | TQStyle::Style_Active, styleopt); menu->removeItem(id); return painter.pen().color(); @@ -63,7 +63,7 @@ static QColor getActiveTextColor(KPopupMenu *menu) #endif KBSwitchTrayIcon::KBSwitchTrayIcon(KBConfig *conf){ - QPixmap pix; + TQPixmap pix; #if KDE_VERSION_MAJOR >= 3 KActionCollection *actions = new KActionCollection(this); #define ACTION_PARENT actions @@ -72,10 +72,10 @@ KBSwitchTrayIcon::KBSwitchTrayIcon(KBConfig *conf){ #endif m_kbconf = conf; - //QObject::connect(conf, SIGNAL(changed()), this, SLOT(updateMenuIcons())); + //TQObject::connect(conf, SIGNAL(changed()), this, SLOT(updateMenuIcons())); KPopupMenu * menu = contextMenu(); addLayoutItems(menu, false); - QObject::connect(menu, SIGNAL(activated(int)), this, SLOT(slotMenuActivated(int))); + TQObject::connect(menu, SIGNAL(activated(int)), this, SLOT(slotMenuActivated(int))); menu->insertSeparator(); KAction *pref = KStdAction::preferences(this, SIGNAL(preferencesSelected()), ACTION_PARENT); @@ -85,11 +85,11 @@ KBSwitchTrayIcon::KBSwitchTrayIcon(KBConfig *conf){ KAction *about = KStdAction::aboutApp(this, SLOT(slotAbout()), ACTION_PARENT); about->plug(menu); - /*QString path = locate("icon", "hicolor/16x16/apps/locale.png"); + /*TQString path = locate("icon", "hicolor/16x16/apps/locale.png"); if (!path.isEmpty()) pix.load(path);*/ pix = kapp->iconLoader()->loadIcon("locale", KIcon::Small); menu->changeTitle(menu->idAt(0), pix, i18n("Keyboard Switch")); - setAlignment(Qt::AlignHCenter | Qt::AlignCenter); + setAlignment(TQt::AlignHCenter | TQt::AlignCenter); } KBSwitchTrayIcon::~KBSwitchTrayIcon(){ @@ -118,7 +118,7 @@ void KBSwitchTrayIcon::setToggleGroups(int group1, int group2){ for (i = 0; i < m_kbconf->groupCount(); i++) { toggling = (i == group1 || i == group2); #ifdef USE_BOLD_MENUITEM - QMenuItem *item = menu->findItem(i); + TQMenuItem *item = menu->findItem(i); BoldMenuItem *bolditem = dynamic_cast<BoldMenuItem*>(item->custom()); bolditem->setBold(toggling); #else @@ -130,7 +130,7 @@ void KBSwitchTrayIcon::setToggleGroups(int group1, int group2){ } /** No descriptions */ -void KBSwitchTrayIcon::mouseReleaseEvent(QMouseEvent *event){ +void KBSwitchTrayIcon::mouseReleaseEvent(TQMouseEvent *event){ if (event->button() == LeftButton) { emit clicked(); } @@ -155,7 +155,7 @@ void KBSwitchTrayIcon::addLayoutItems(KPopupMenu *menu, bool clearOld) { KBGroup *group; int index; #ifdef USE_BOLD_MENUITEM - QColor active_text_color = getActiveTextColor(menu); + TQColor active_text_color = getActiveTextColor(menu); #endif if (clearOld) @@ -181,11 +181,11 @@ void KBSwitchTrayIcon::reconfigure(){ /** Update the tray icon display for the given group */ void KBSwitchTrayIcon::updateTrayIcon(int groupno){ - const QPixmap& pix = m_kbconf->getGroup(groupno)->getPixmap(); + const TQPixmap& pix = m_kbconf->getGroup(groupno)->getPixmap(); setPixmap(pix); setActiveGroup(groupno); - QToolTip::remove(this); - QToolTip::add(this, m_kbconf->getGroup(groupno)->getName()); + TQToolTip::remove(this); + TQToolTip::add(this, m_kbconf->getGroup(groupno)->getName()); } /** Update menu and tray icons after configuration has changed */ |