From c663b6440964f6ac48027143ac9e63298991f9d0 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:33:34 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kdesktop/kcustommenu.cc | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'kdesktop/kcustommenu.cc') diff --git a/kdesktop/kcustommenu.cc b/kdesktop/kcustommenu.cc index 675dab098..1d39a093d 100644 --- a/kdesktop/kcustommenu.cc +++ b/kdesktop/kcustommenu.cc @@ -17,8 +17,8 @@ Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include #include @@ -29,11 +29,11 @@ class KCustomMenu::KCustomMenuPrivate { public: - QMap entryMap; + TQMap entryMap; }; -KCustomMenu::KCustomMenu(const QString &configfile, QWidget *parent) - : QPopupMenu(parent, "kcustom_menu") +KCustomMenu::KCustomMenu(const TQString &configfile, TQWidget *parent) + : TQPopupMenu(parent, "kcustom_menu") { d = new KCustomMenuPrivate; @@ -41,7 +41,7 @@ KCustomMenu::KCustomMenu(const QString &configfile, QWidget *parent) int count = cfg.readNumEntry("NrOfItems"); for(int i = 0; i < count; i++) { - QString entry = cfg.readEntry(QString("Item%1").arg(i+1)); + TQString entry = cfg.readEntry(TQString("Item%1").arg(i+1)); if (entry.isEmpty()) continue; @@ -57,7 +57,7 @@ KCustomMenu::KCustomMenu(const QString &configfile, QWidget *parent) insertMenuItem( menuItem, -1 ); } - connect(this, SIGNAL(activated(int)), this, SLOT(slotActivated(int))); + connect(this, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotActivated(int))); } KCustomMenu::~KCustomMenu() @@ -78,31 +78,31 @@ KCustomMenu::slotActivated(int id) void KCustomMenu::insertMenuItem(KService::Ptr & s, int nId, int nIndex/*= -1*/) { - QString serviceName = s->name(); + TQString serviceName = s->name(); // item names may contain ampersands. To avoid them being converted // to accelators, replace them with two ampersands. serviceName.replace("&", "&&"); - QPixmap normal = KGlobal::instance()->iconLoader()->loadIcon(s->icon(), KIcon::Small, + TQPixmap normal = KGlobal::instance()->iconLoader()->loadIcon(s->icon(), KIcon::Small, 0, KIcon::DefaultState, 0L, true); - QPixmap active = KGlobal::instance()->iconLoader()->loadIcon(s->icon(), KIcon::Small, + TQPixmap active = KGlobal::instance()->iconLoader()->loadIcon(s->icon(), KIcon::Small, 0, KIcon::ActiveState, 0L, true); // make sure they are not larger than 16x16 if (normal.width() > 16 || normal.height() > 16) { - QImage tmp = normal.convertToImage(); + TQImage tmp = normal.convertToImage(); tmp = tmp.smoothScale(16, 16); normal.convertFromImage(tmp); } if (active.width() > 16 || active.height() > 16) { - QImage tmp = active.convertToImage(); + TQImage tmp = active.convertToImage(); tmp = tmp.smoothScale(16, 16); active.convertFromImage(tmp); } - QIconSet iconset; - iconset.setPixmap(normal, QIconSet::Small, QIconSet::Normal); - iconset.setPixmap(active, QIconSet::Small, QIconSet::Active); + TQIconSet iconset; + iconset.setPixmap(normal, TQIconSet::Small, TQIconSet::Normal); + iconset.setPixmap(active, TQIconSet::Small, TQIconSet::Active); int newId = insertItem(iconset, serviceName, nId, nIndex); d->entryMap.insert(newId, s); -- cgit v1.2.1