summaryrefslogtreecommitdiffstats
path: root/knewstuff
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-02-01 15:13:01 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-02-01 15:13:01 -0600
commitdeac2ca49faed824fe83066080714eb6d653615b (patch)
tree8b5bf97c5acaaf5285985b87fa76dbea0f35e4fa /knewstuff
parent0c9d97065a3d6ceb12d687555a1a33d90db96238 (diff)
downloadtdelibs-deac2ca49faed824fe83066080714eb6d653615b.tar.gz
tdelibs-deac2ca49faed824fe83066080714eb6d653615b.zip
Rename a number of classes to enhance compatibility with KDE4
Diffstat (limited to 'knewstuff')
-rw-r--r--knewstuff/downloaddialog.cpp36
-rw-r--r--knewstuff/downloaddialog.h6
-rw-r--r--knewstuff/knewstuff.cpp6
-rw-r--r--knewstuff/knewstuff.h8
-rw-r--r--knewstuff/providerdialog.cpp8
-rw-r--r--knewstuff/providerdialog.h4
6 files changed, 34 insertions, 34 deletions
diff --git a/knewstuff/downloaddialog.cpp b/knewstuff/downloaddialog.cpp
index 3cc476254..4bfe13f30 100644
--- a/knewstuff/downloaddialog.cpp
+++ b/knewstuff/downloaddialog.cpp
@@ -50,18 +50,18 @@ struct DownloadDialog::Private
{
TQString m_providerlist;
TQWidget *m_page;
- KListView *m_lvtmp_r, *m_lvtmp_d, *m_lvtmp_l;
+ TDEListView *m_lvtmp_r, *m_lvtmp_d, *m_lvtmp_l;
TQPtrList<Entry> m_installlist;
TQMap<TDEIO::Job*, Provider*> m_variantjobs;
TQMap<TDEIO::Job*, TQStringList> m_variants;
TQMap<Provider*, Provider*> m_newproviders;
};
-class NumSortListViewItem : public KListViewItem
+class NumSortListViewItem : public TDEListViewItem
{
public:
NumSortListViewItem( TQListView * parent, TQString label1, TQString label2 = TQString::null, TQString label3 = TQString::null, TQString label4 = TQString::null, TQString label5 = TQString::null, TQString label6 = TQString::null, TQString label7 = TQString::null, TQString label8 = TQString::null ) :
- KListViewItem( parent, label1, label2, label3, label4, label5, label6, label7, label8 )
+ TDEListViewItem( parent, label1, label2, label3, label4, label5, label6, label7, label8 )
{
}
@@ -72,15 +72,15 @@ class NumSortListViewItem : public KListViewItem
s.sprintf("%08d", text(col).toInt());
return s;
}
- return KListViewItem::key( col, asc );
+ return TDEListViewItem::key( col, asc );
}
};
-class DateSortListViewItem : public KListViewItem
+class DateSortListViewItem : public TDEListViewItem
{
public:
DateSortListViewItem( TQListView * parent, TQString label1, TQString label2 = TQString::null, TQString label3 = TQString::null, TQString label4 = TQString::null, TQString label5 = TQString::null, TQString label6 = TQString::null, TQString label7 = TQString::null, TQString label8 = TQString::null ) :
- KListViewItem( parent, label1, label2, label3, label4, label5, label6, label7, label8 )
+ TDEListViewItem( parent, label1, label2, label3, label4, label5, label6, label7, label8 )
{
}
@@ -92,7 +92,7 @@ class DateSortListViewItem : public KListViewItem
s.sprintf("%08d", date.year() * 366 + date.dayOfYear());
return s;
}
- return KListViewItem::key( col, asc );
+ return TDEListViewItem::key( col, asc );
}
};
@@ -157,7 +157,7 @@ DownloadDialog::~DownloadDialog()
{
for (TQMap<TQWidget *, TQValueList<TQPushButton *>* >::const_iterator it = m_buttons.constBegin(); it != m_buttons.constEnd(); ++it)
delete it.data();
- for (TQMap<TQWidget *, TQValueList<KListView *>* >::const_iterator it = m_map.constBegin(); it != m_map.constEnd(); ++it)
+ for (TQMap<TQWidget *, TQValueList<TDEListView *>* >::const_iterator it = m_map.constBegin(); it != m_map.constEnd(); ++it)
delete it.data();
delete d;
}
@@ -174,11 +174,11 @@ void DownloadDialog::load(TQString providerList)
void DownloadDialog::clear()
{
- TQMap<TQWidget*, TQValueList<KListView*>* >::Iterator it;
- TQMap<TQWidget*, TQValueList<KListView*>* >::Iterator end(m_map.end());
+ TQMap<TQWidget*, TQValueList<TDEListView*>* >::Iterator it;
+ TQMap<TQWidget*, TQValueList<TDEListView*>* >::Iterator end(m_map.end());
for(it = m_map.begin(); it != end; ++it)
{
- TQValueList<KListView*> *v = it.data();
+ TQValueList<TDEListView*> *v = it.data();
kdDebug() << "clear listviews in " << v << endl;
if(v)
{
@@ -266,19 +266,19 @@ void DownloadDialog::addProvider(Provider *p)
TQHBoxLayout *box = new TQHBoxLayout(frame);
box->add(ctl);
- d->m_lvtmp_r = new KListView(w_r);
+ d->m_lvtmp_r = new TDEListView(w_r);
d->m_lvtmp_r->addColumn(i18n("Name"));
d->m_lvtmp_r->addColumn(i18n("Version"));
d->m_lvtmp_r->addColumn(i18n("Rating"));
d->m_lvtmp_r->setSorting(2, false);
- d->m_lvtmp_d = new KListView(w_d);
+ d->m_lvtmp_d = new TDEListView(w_d);
d->m_lvtmp_d->addColumn(i18n("Name"));
d->m_lvtmp_d->addColumn(i18n("Version"));
d->m_lvtmp_d->addColumn(i18n("Downloads"));
d->m_lvtmp_d->setSorting(2, false);
- d->m_lvtmp_l = new KListView(w_l);
+ d->m_lvtmp_l = new TDEListView(w_l);
d->m_lvtmp_l->addColumn(i18n("Name"));
d->m_lvtmp_l->addColumn(i18n("Version"));
d->m_lvtmp_l->addColumn(i18n("Release Date"));
@@ -315,7 +315,7 @@ void DownloadDialog::addProvider(Provider *p)
TQVBoxLayout *box4 = new TQVBoxLayout(w_l);
box4->add(d->m_lvtmp_l);
- TQValueList<KListView*> *v = new TQValueList<KListView*>;
+ TQValueList<TDEListView*> *v = new TQValueList<TDEListView*>;
*v << d->m_lvtmp_r << d->m_lvtmp_d << d->m_lvtmp_l;
m_map[frame] = v;
m_rts[frame] = rt;
@@ -423,19 +423,19 @@ void DownloadDialog::addEntry(Entry *entry, const TQStringList& variants)
if(variants.contains("score"))
{
- KListViewItem *tmp_r = new NumSortListViewItem(lv_r,
+ TDEListViewItem *tmp_r = new NumSortListViewItem(lv_r,
entry->name(lang), entry->version(), TQString("%1").arg(entry->rating()));
tmp_r->setPixmap(0, pix);
}
if(variants.contains("downloads"))
{
- KListViewItem *tmp_d = new NumSortListViewItem(lv_d,
+ TDEListViewItem *tmp_d = new NumSortListViewItem(lv_d,
entry->name(lang), entry->version(), TQString("%1").arg(entry->downloads()));
tmp_d->setPixmap(0, pix);
}
if(variants.contains("latest"))
{
- KListViewItem *tmp_l = new DateSortListViewItem(lv_l,
+ TDEListViewItem *tmp_l = new DateSortListViewItem(lv_l,
entry->name(lang), entry->version(), TDEGlobal::locale()->formatDate(entry->releaseDate()));
tmp_l->setPixmap(0, pix);
}
diff --git a/knewstuff/downloaddialog.h b/knewstuff/downloaddialog.h
index cfcd4858f..1d61d259d 100644
--- a/knewstuff/downloaddialog.h
+++ b/knewstuff/downloaddialog.h
@@ -28,7 +28,7 @@ namespace TDEIO
class Job;
}
-class KListView;
+class TDEListView;
class TQTextBrowser;
class TQFrame;
class KNewStuffGeneric;
@@ -232,7 +232,7 @@ class KDE_EXPORT DownloadDialog : public KDialogBase
ProviderLoader *m_loader;
TQString m_entryname;
- KListView *lv_r, *lv_d, *lv_l;
+ TDEListView *lv_r, *lv_d, *lv_l;
TQTextBrowser *m_rt;
TQFrame *m_frame;
TQListViewItem *m_entryitem;
@@ -240,7 +240,7 @@ class KDE_EXPORT DownloadDialog : public KDialogBase
Entry *m_entry;
KNewStuffGeneric *m_s;
int m_curtab;
- TQMap<TQWidget*, TQValueList<KListView*>* > m_map;
+ TQMap<TQWidget*, TQValueList<TDEListView*>* > m_map;
TQMap<TQWidget*, Provider*> m_providers;
TQMap<TQWidget*, TQTextBrowser*> m_rts;
TQMap<TQWidget*, TQValueList<TQPushButton*>* > m_buttons;
diff --git a/knewstuff/knewstuff.cpp b/knewstuff/knewstuff.cpp
index 6bfbb3333..d36a1ef19 100644
--- a/knewstuff/knewstuff.cpp
+++ b/knewstuff/knewstuff.cpp
@@ -30,12 +30,12 @@
using namespace KNS;
-KAction* KNS::standardAction(const TQString& what,
+TDEAction* KNS::standardAction(const TQString& what,
const TQObject *recvr,
- const char *slot, KActionCollection* parent,
+ const char *slot, TDEActionCollection* parent,
const char *name)
{
- return new KAction(i18n("Download New %1").arg(what), "knewstuff",
+ return new TDEAction(i18n("Download New %1").arg(what), "knewstuff",
0, recvr, slot, parent, name);
}
diff --git a/knewstuff/knewstuff.h b/knewstuff/knewstuff.h
index 5d2319aec..ca07c7f0d 100644
--- a/knewstuff/knewstuff.h
+++ b/knewstuff/knewstuff.h
@@ -26,17 +26,17 @@
class TQObject;
class TQWidget;
-class KAction;
-class KActionCollection;
+class TDEAction;
+class TDEActionCollection;
namespace KNS {
class Engine;
class Entry;
-KDE_EXPORT KAction* standardAction(const TQString& what,
+KDE_EXPORT TDEAction* standardAction(const TQString& what,
const TQObject *recvr,
const char *slot,
- KActionCollection* parent,
+ TDEActionCollection* parent,
const char *name = 0);
}
diff --git a/knewstuff/providerdialog.cpp b/knewstuff/providerdialog.cpp
index a66258701..23aa94388 100644
--- a/knewstuff/providerdialog.cpp
+++ b/knewstuff/providerdialog.cpp
@@ -34,11 +34,11 @@
using namespace KNS;
-class ProviderItem : public KListViewItem
+class ProviderItem : public TDEListViewItem
{
public:
- ProviderItem( KListView *parent, Provider *provider ) :
- KListViewItem( parent ), mProvider( provider )
+ ProviderItem( TDEListView *parent, Provider *provider ) :
+ TDEListViewItem( parent ), mProvider( provider )
{
setText( 0, provider->name() );
}
@@ -61,7 +61,7 @@ ProviderDialog::ProviderDialog( Engine *engine, TQWidget *parent ) :
TQLabel *description = new TQLabel( i18n("Please select one of the providers listed below:"), topPage );
topLayout->addWidget( description );
- mListView = new KListView( topPage );
+ mListView = new TDEListView( topPage );
mListView->addColumn( i18n("Name") );
topLayout->addWidget( mListView );
}
diff --git a/knewstuff/providerdialog.h b/knewstuff/providerdialog.h
index 3e02e30aa..549a65416 100644
--- a/knewstuff/providerdialog.h
+++ b/knewstuff/providerdialog.h
@@ -22,7 +22,7 @@
#include <kdialogbase.h>
-class KListView;
+class TDEListView;
namespace KNS {
@@ -68,7 +68,7 @@ class ProviderDialog : public KDialogBase
private:
Engine *mEngine;
- KListView *mListView;
+ TDEListView *mListView;
};
}