From f78eb03afb8c9a380985d26286afc40b4c89b292 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 1 Feb 2013 15:15:35 -0600 Subject: Rename a number of classes to enhance compatibility with KDE4 --- src/profileengine/editor/profileeditor.cpp | 44 +++++++++++++-------------- src/profileengine/editor/profileeditor.h | 8 ++--- src/profileengine/editor/profileeditorbase.ui | 14 ++++----- src/profileengine/lib/profileengine.h | 10 +++--- 4 files changed, 38 insertions(+), 38 deletions(-) (limited to 'src/profileengine') diff --git a/src/profileengine/editor/profileeditor.cpp b/src/profileengine/editor/profileeditor.cpp index 7732ea90..c10aca8c 100644 --- a/src/profileengine/editor/profileeditor.cpp +++ b/src/profileengine/editor/profileeditor.cpp @@ -38,17 +38,17 @@ #include "addprofilewidget.h" -class ProfileItem: public KListViewItem { +class ProfileItem: public TDEListViewItem { public: - ProfileItem(KListView *parent, Profile *profile) - :KListViewItem(parent), m_profile(profile) + ProfileItem(TDEListView *parent, Profile *profile) + :TDEListViewItem(parent), m_profile(profile) { setText(0, profile->genericName()); setText(1, profile->description()); } - ProfileItem(KListViewItem *parent, Profile *profile) - : KListViewItem(parent), m_profile(profile) + ProfileItem(TDEListViewItem *parent, Profile *profile) + : TDEListViewItem(parent), m_profile(profile) { setText(0, profile->genericName()); setText(1, profile->description()); @@ -60,10 +60,10 @@ private: Profile *m_profile; }; -class EDListItem: public KListViewItem{ +class EDListItem: public TDEListViewItem{ public: - EDListItem(KListView *parent, const TQString &text, bool derived) - : KListViewItem(parent, text), m_derived(derived) + EDListItem(TDEListView *parent, const TQString &text, bool derived) + : TDEListViewItem(parent, text), m_derived(derived) { } @@ -74,7 +74,7 @@ public: TQColorGroup cgNew = cg; if (m_derived) cgNew.setColor(TQColorGroup::Text, TDEGlobalSettings::inactiveTextColor()); - KListViewItem::paintCell(p, cgNew, column, width, alignment); + TDEListViewItem::paintCell(p, cgNew, column, width, alignment); } private: @@ -134,22 +134,22 @@ void ProfileEditor::refreshAvailableList() { //filling a list of available plugins allList->clear(); - allCore = new KListViewItem(allList, i18n("Core")); + allCore = new TDEListViewItem(allList, i18n("Core")); allCore->setOpen(true); - allGlobal = new KListViewItem(allList, i18n("Global")); + allGlobal = new TDEListViewItem(allList, i18n("Global")); allGlobal->setOpen(true); - allProject = new KListViewItem(allList, i18n("Project")); + allProject = new TDEListViewItem(allList, i18n("Project")); allProject->setOpen(true); TDETrader::OfferList olist = engine.allOffers(ProfileEngine::Core); for (TDETrader::OfferList::iterator it = olist.begin(); it != olist.end(); ++it) - new KListViewItem(allCore, (*it)->desktopEntryName(), (*it)->genericName()); + new TDEListViewItem(allCore, (*it)->desktopEntryName(), (*it)->genericName()); olist = engine.allOffers(ProfileEngine::Global); for (TDETrader::OfferList::iterator it = olist.begin(); it != olist.end(); ++it) - new KListViewItem(allGlobal, (*it)->desktopEntryName(), (*it)->genericName()); + new TDEListViewItem(allGlobal, (*it)->desktopEntryName(), (*it)->genericName()); olist = engine.allOffers(ProfileEngine::Project); for (TDETrader::OfferList::iterator it = olist.begin(); it != olist.end(); ++it) - new KListViewItem(allProject, (*it)->desktopEntryName(), (*it)->genericName()); + new TDEListViewItem(allProject, (*it)->desktopEntryName(), (*it)->genericName()); } void ProfileEditor::profileExecuted(TQListViewItem *item) @@ -198,29 +198,29 @@ void ProfileEditor::fillPluginsList(Profile *profile) { pluginsView->clear(); - KListViewItem *core = new KListViewItem(pluginsView, i18n("Core Plugins")); + TDEListViewItem *core = new TDEListViewItem(pluginsView, i18n("Core Plugins")); core->setOpen(true); - KListViewItem *global = new KListViewItem(pluginsView, i18n("Global Plugins")); + TDEListViewItem *global = new TDEListViewItem(pluginsView, i18n("Global Plugins")); global->setOpen(true); - KListViewItem *project = new KListViewItem(pluginsView, i18n("Project Plugins")); + TDEListViewItem *project = new TDEListViewItem(pluginsView, i18n("Project Plugins")); project->setOpen(true); TDETrader::OfferList coreOffers = engine.offers(profile->name(), ProfileEngine::Core); for (TDETrader::OfferList::const_iterator it = coreOffers.constBegin(); it != coreOffers.constEnd(); ++it) - new KListViewItem(core, (*it)->desktopEntryName(), (*it)->genericName(), + new TDEListViewItem(core, (*it)->desktopEntryName(), (*it)->genericName(), (*it)->property("X-TDevelop-Properties").toStringList().join(", ")); TDETrader::OfferList globalOffers = engine.offers(profile->name(), ProfileEngine::Global); for (TDETrader::OfferList::const_iterator it = globalOffers.constBegin(); it != globalOffers.constEnd(); ++it) - new KListViewItem(global, (*it)->desktopEntryName(), (*it)->genericName(), + new TDEListViewItem(global, (*it)->desktopEntryName(), (*it)->genericName(), (*it)->property("X-TDevelop-Properties").toStringList().join(", ")); TDETrader::OfferList projectOffers = engine.offers(profile->name(), ProfileEngine::Project); for (TDETrader::OfferList::const_iterator it = projectOffers.constBegin(); it != projectOffers.constEnd(); ++it) - new KListViewItem(project, (*it)->desktopEntryName(), (*it)->genericName(), + new TDEListViewItem(project, (*it)->desktopEntryName(), (*it)->genericName(), (*it)->property("X-TDevelop-Properties").toStringList().join(", ")); } @@ -245,7 +245,7 @@ void ProfileEditor::addProfile() prof->genericNameEdit->text(), prof->descriptionEdit->text()); profilesList->currentItem()->setOpen(true); - new ProfileItem(static_cast(profilesList->currentItem()), profile); + new ProfileItem(static_cast(profilesList->currentItem()), profile); } } diff --git a/src/profileengine/editor/profileeditor.h b/src/profileengine/editor/profileeditor.h index ad5610f0..7c54ea71 100644 --- a/src/profileengine/editor/profileeditor.h +++ b/src/profileengine/editor/profileeditor.h @@ -25,7 +25,7 @@ class TQListBoxItem; class TQListViewItem; -class KListViewItem; +class TDEListViewItem; class ProfileEditor : public ProfileEditorBase { Q_OBJECT @@ -62,9 +62,9 @@ protected: private: ProfileEngine engine; - KListViewItem *allCore; - KListViewItem *allGlobal; - KListViewItem *allProject; + TDEListViewItem *allCore; + TDEListViewItem *allGlobal; + TDEListViewItem *allProject; }; #endif diff --git a/src/profileengine/editor/profileeditorbase.ui b/src/profileengine/editor/profileeditorbase.ui index 4c6af611..fc6b99f2 100644 --- a/src/profileengine/editor/profileeditorbase.ui +++ b/src/profileengine/editor/profileeditorbase.ui @@ -80,7 +80,7 @@ - + Name @@ -212,7 +212,7 @@ Derived properties: - + derivedPropertiesBox @@ -241,7 +241,7 @@ Own properties: - + ownPropertiesBox @@ -283,7 +283,7 @@ Enabled: - + Plugin Name @@ -323,7 +323,7 @@ Disabled: - + Plugin Name @@ -430,7 +430,7 @@ Available plugins: - + Name @@ -510,7 +510,7 @@ unnamed - + Name diff --git a/src/profileengine/lib/profileengine.h b/src/profileengine/lib/profileengine.h index 4ea93bdf..0cf66d7d 100644 --- a/src/profileengine/lib/profileengine.h +++ b/src/profileengine/lib/profileengine.h @@ -206,17 +206,17 @@ public: } }; - class ProfileItem: public KListViewItem { + class ProfileItem: public TDEListViewItem { public: - ProfileItem(KListView *parent, Profile *profile) - :KListViewItem(parent), m_profile(profile) + ProfileItem(TDEListView *parent, Profile *profile) + :TDEListViewItem(parent), m_profile(profile) { setText(0, profile->genericName()); setText(1, profile->description()); } - ProfileItem(KListViewItem *parent, Profile *profile) - : KListViewItem(parent), m_profile(profile) + ProfileItem(TDEListViewItem *parent, Profile *profile) + : TDEListViewItem(parent), m_profile(profile) { setText(0, profile->genericName()); setText(1, profile->description()); -- cgit v1.2.3