diff options
Diffstat (limited to 'src/servicemenu.cpp')
-rw-r--r-- | src/servicemenu.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/src/servicemenu.cpp b/src/servicemenu.cpp index a1df8f8..272e453 100644 --- a/src/servicemenu.cpp +++ b/src/servicemenu.cpp @@ -21,23 +21,23 @@ #include <kglobal.h> #include <klocale.h> -#include <qimage.h> +#include <ntqimage.h> #include <kiconloader.h> #include <kservicegroup.h> #include <ksycoca.h> #include <kdebug.h> -ServiceMenu::ServiceMenu(QObject *receiver, const char *slotActivatedItem, - const char *slotActivatedGroup, QWidget *parent, const char *name) - : KPopupMenu(parent, name), m_relPath(QString::null), +ServiceMenu::ServiceMenu(TQObject *receiver, const char *slotActivatedItem, + const char *slotActivatedGroup, TQWidget *parent, const char *name) + : KPopupMenu(parent, name), m_relPath(TQString::null), m_receiver(receiver), m_slotActivatedItem(slotActivatedItem), m_slotActivatedGroup(slotActivatedGroup) { initialize(); } -ServiceMenu::ServiceMenu(const QString & relPath, QObject *receiver, const char *slotActivatedItem, - const char *slotActivatedGroup, QWidget *parent, const char *name) +ServiceMenu::ServiceMenu(const TQString & relPath, TQObject *receiver, const char *slotActivatedItem, + const char *slotActivatedGroup, TQWidget *parent, const char *name) : KPopupMenu(parent, name), m_relPath(relPath), m_receiver(receiver), m_slotActivatedItem(slotActivatedItem), m_slotActivatedGroup(slotActivatedGroup) @@ -89,7 +89,7 @@ void ServiceMenu::createMenu() m_entryMap.insert(mid, static_cast<KSycocaEntry*>(root)); insertSeparator(); - QStringList suppressGenericNames = root->suppressGenericNames(); + TQStringList suppressGenericNames = root->suppressGenericNames(); KServiceGroup::List::ConstIterator it = list.begin(); for (; it != list.end(); ++it) { @@ -106,7 +106,7 @@ void ServiceMenu::createMenu() if ((g->name().at(0) == '.')) continue; - QString groupCaption = g->caption(); + TQString groupCaption = g->caption(); // Item names may contain ampersands. To avoid them being converted // to accelerators, replace them with two ampersands. @@ -118,7 +118,7 @@ void ServiceMenu::createMenu() int newId = insertItem(getIconSet(g->icon()), groupCaption, m); m_entryMap.insert(newId, static_cast<KSycocaEntry*>(g)); - // We have to delete the sub menu our selves! (See Qt docs.) + // We have to delete the sub menu our selves! (See TQt docs.) m_subMenus.append(m); } else if (e->isType(KST_KService)) { KService::Ptr s(static_cast<KService *>(e)); @@ -129,12 +129,12 @@ void ServiceMenu::createMenu() } } -QIconSet ServiceMenu::getIconSet(const QString& icon) const +TQIconSet ServiceMenu::getIconSet(const TQString& icon) const { - QIconSet iconset; - QPixmap normal = KGlobal::instance()->iconLoader()->loadIcon( + TQIconSet iconset; + TQPixmap normal = KGlobal::instance()->iconLoader()->loadIcon( icon, KIcon::Small, 0, KIcon::DefaultState, 0L, true); - QPixmap active = KGlobal::instance()->iconLoader()->loadIcon( + TQPixmap active = KGlobal::instance()->iconLoader()->loadIcon( icon, KIcon::Small, 0, KIcon::ActiveState, 0L, true); // make sure they are not larger than 20x20 @@ -143,33 +143,33 @@ QIconSet ServiceMenu::getIconSet(const QString& icon) const if (active.width() > 20 || active.height() > 20) active.convertFromImage(active.convertToImage().smoothScale(20,20)); - iconset.setPixmap(normal, QIconSet::Small, QIconSet::Normal); - iconset.setPixmap(active, QIconSet::Small, QIconSet::Active); + iconset.setPixmap(normal, TQIconSet::Small, TQIconSet::Normal); + iconset.setPixmap(active, TQIconSet::Small, TQIconSet::Active); return iconset; } void ServiceMenu::insertMenuItem(KService::Ptr & s, - const QStringList *suppressGenericNames) + const TQStringList *suppressGenericNames) { // check for NoDisplay if (s->noDisplay()) return; - QString serviceName = s->name(); + TQString serviceName = s->name(); // ignore dotfiles. if ((serviceName.at(0) == '.')) return; // add comment /*if (KickerSettings::detailedMenuEntries()) { - QString comment = s->genericName(); + TQString comment = s->genericName(); if ( !comment.isEmpty() ) { if (KickerSettings::detailedEntriesNamesFirst()) { if (!suppressGenericNames || !suppressGenericNames->contains(s->untranslatedGenericName())) { - serviceName = QString( "%1 (%2)" ).arg( serviceName ).arg( comment ); + serviceName = TQString( "%1 (%2)" ).arg( serviceName ).arg( comment ); } } else - serviceName = QString( "%1 (%2)" ).arg( comment ).arg( serviceName ); + serviceName = TQString( "%1 (%2)" ).arg( comment ).arg( serviceName ); } } */ @@ -183,10 +183,10 @@ void ServiceMenu::insertMenuItem(KService::Ptr & s, // to accelerators, replace them with two ampersands. serviceName.replace("&", "&&"); - QIconSet iconset; - QPixmap normal = KGlobal::instance()->iconLoader()->loadIcon( + TQIconSet iconset; + TQPixmap normal = KGlobal::instance()->iconLoader()->loadIcon( s->icon(), KIcon::Small, 0, KIcon::DefaultState, 0L, true); - QPixmap active = KGlobal::instance()->iconLoader()->loadIcon( + TQPixmap active = KGlobal::instance()->iconLoader()->loadIcon( s->icon(), KIcon::Small, 0, KIcon::ActiveState, 0L, true); // make sure they are not larger than 20x20 @@ -195,8 +195,8 @@ void ServiceMenu::insertMenuItem(KService::Ptr & s, if (active.width() > 20 || active.height() > 20) active.convertFromImage(active.convertToImage().smoothScale(20,20)); - iconset.setPixmap(normal, QIconSet::Small, QIconSet::Normal); - iconset.setPixmap(active, QIconSet::Small, QIconSet::Active); + iconset.setPixmap(normal, TQIconSet::Small, TQIconSet::Normal); + iconset.setPixmap(active, TQIconSet::Small, TQIconSet::Active); int newId = insertItem(iconset, serviceName); m_entryMap.insert(newId, static_cast<KSycocaEntry*>(s)); |