summaryrefslogtreecommitdiffstats
path: root/kopete/plugins/history/historydialog.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2013-02-01 15:14:03 -0600
committerTimothy Pearson <[email protected]>2013-02-01 15:14:03 -0600
commit9c9412b30c54468adc9e506cc76c5d113fbf5056 (patch)
tree68a0c0d5bc770fc58596b8c5624cdf33d8625027 /kopete/plugins/history/historydialog.cpp
parent2e53bd0b77676f879fad7baeecea5879bf496a7d (diff)
downloadtdenetwork-9c9412b30c54468adc9e506cc76c5d113fbf5056.tar.gz
tdenetwork-9c9412b30c54468adc9e506cc76c5d113fbf5056.zip
Rename a number of classes to enhance compatibility with KDE4
Diffstat (limited to 'kopete/plugins/history/historydialog.cpp')
-rw-r--r--kopete/plugins/history/historydialog.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/kopete/plugins/history/historydialog.cpp b/kopete/plugins/history/historydialog.cpp
index 1dd63cc3..992d586f 100644
--- a/kopete/plugins/history/historydialog.cpp
+++ b/kopete/plugins/history/historydialog.cpp
@@ -57,10 +57,10 @@
#include <kstdaction.h>
#include <kaction.h>
-class KListViewDateItem : public KListViewItem
+class TDEListViewDateItem : public TDEListViewItem
{
public:
- KListViewDateItem(KListView* parent, TQDate date, Kopete::MetaContact *mc);
+ TDEListViewDateItem(TDEListView* parent, TQDate date, Kopete::MetaContact *mc);
TQDate date() { return mDate; }
Kopete::MetaContact *metaContact() { return mMetaContact; }
@@ -73,20 +73,20 @@ private:
-KListViewDateItem::KListViewDateItem(KListView* parent, TQDate date, Kopete::MetaContact *mc)
- : KListViewItem(parent, date.toString(Qt::ISODate), mc->displayName())
+TDEListViewDateItem::TDEListViewDateItem(TDEListView* parent, TQDate date, Kopete::MetaContact *mc)
+ : TDEListViewItem(parent, date.toString(Qt::ISODate), mc->displayName())
{
mDate = date;
mMetaContact = mc;
}
-int KListViewDateItem::compare(TQListViewItem *i, int col, bool ascending) const
+int TDEListViewDateItem::compare(TQListViewItem *i, int col, bool ascending) const
{
if (col)
return TQListViewItem::compare(i, col, ascending);
//compare dates - do NOT use ascending var here
- KListViewDateItem* item = static_cast<KListViewDateItem*>(i);
+ TDEListViewDateItem* item = static_cast<TDEListViewDateItem*>(i);
if ( mDate < item->date() )
return -1;
return ( mDate > item->date() );
@@ -173,9 +173,9 @@ HistoryDialog::HistoryDialog(Kopete::MetaContact *mc, TQWidget* parent,
connect(mHtmlPart, TQT_SIGNAL(popupMenu(const TQString &, const TQPoint &)), this, TQT_SLOT(slotRightClick(const TQString &, const TQPoint &)));
//initActions
- KActionCollection* ac = new KActionCollection(this);
+ TDEActionCollection* ac = new TDEActionCollection(this);
mCopyAct = KStdAction::copy( TQT_TQOBJECT(this), TQT_SLOT(slotCopy()), ac );
- mCopyURLAct = new KAction( i18n( "Copy Link Address" ), TQString::fromLatin1( "editcopy" ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotCopyURL() ), ac );
+ mCopyURLAct = new TDEAction( i18n( "Copy Link Address" ), TQString::fromLatin1( "editcopy" ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotCopyURL() ), ac );
resize(650, 700);
centerOnScreen(this);
@@ -232,7 +232,7 @@ void HistoryDialog::slotLoadDays()
{
TQDate c2Date(pair.date().year(),pair.date().month(),dayList[i]);
if (mInit.dateMCList.find(pair) == mInit.dateMCList.end())
- new KListViewDateItem(mMainWidget->dateListView, c2Date, pair.metaContact());
+ new TDEListViewDateItem(mMainWidget->dateListView, c2Date, pair.metaContact());
}
mMainWidget->searchProgress->advance(1);
TQTimer::singleShot(0,this,TQT_SLOT(slotLoadDays()));
@@ -319,7 +319,7 @@ void HistoryDialog::init(Kopete::Contact *c)
void HistoryDialog::dateSelected(TQListViewItem* it)
{
- KListViewDateItem *item = static_cast<KListViewDateItem*>(it);
+ TDEListViewDateItem *item = static_cast<TDEListViewDateItem*>(it);
if (!item) return;
@@ -420,11 +420,11 @@ void HistoryDialog::slotSearchTextChanged(const TQString& searchText)
void HistoryDialog::listViewShowElements(bool s)
{
- KListViewDateItem* item = static_cast<KListViewDateItem*>(mMainWidget->dateListView->firstChild());
+ TDEListViewDateItem* item = static_cast<TDEListViewDateItem*>(mMainWidget->dateListView->firstChild());
while (item != 0)
{
item->setVisible(s);
- item = static_cast<KListViewDateItem*>(item->nextSibling());
+ item = static_cast<TDEListViewDateItem*>(item->nextSibling());
}
}
@@ -440,7 +440,7 @@ void HistoryDialog::slotSearchErase()
* How does the search work
* ------------------------
* We do the search respecting the current metacontact filter item. To do this, we iterate over the
-* elements in the KListView (KListViewDateItems) and, for each one, we iterate over its subcontacts,
+* elements in the TDEListView (TDEListViewDateItems) and, for each one, we iterate over its subcontacts,
* manually searching the log files of each one. To avoid searching files twice, the months that have
* been searched already are stored in searchedMonths. The matches are placed in the matches TQMap.
* Finally, the current date item is checked in the matches TQMap, and if it is present, it is shown.
@@ -472,9 +472,9 @@ void HistoryDialog::slotSearch()
mSearching = true;
// iterate over items in the date list widget
- for(KListViewDateItem *curItem = static_cast<KListViewDateItem*>(mMainWidget->dateListView->firstChild());
+ for(TDEListViewDateItem *curItem = static_cast<TDEListViewDateItem*>(mMainWidget->dateListView->firstChild());
curItem != 0;
- curItem = static_cast<KListViewDateItem *>(curItem->nextSibling())
+ curItem = static_cast<TDEListViewDateItem *>(curItem->nextSibling())
)
{
tqApp->processEvents();
@@ -574,8 +574,8 @@ void HistoryDialog::doneProgressBar()
void HistoryDialog::slotRightClick(const TQString &url, const TQPoint &point)
{
- KPopupMenu *chatWindowPopup = 0L;
- chatWindowPopup = new KPopupMenu();
+ TDEPopupMenu *chatWindowPopup = 0L;
+ chatWindowPopup = new TDEPopupMenu();
if ( !url.isEmpty() )
{