summaryrefslogtreecommitdiffstats
path: root/kopete/kopete/contactlist/kopetecontactlistview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/kopete/contactlist/kopetecontactlistview.cpp')
-rw-r--r--kopete/kopete/contactlist/kopetecontactlistview.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/kopete/kopete/contactlist/kopetecontactlistview.cpp b/kopete/kopete/contactlist/kopetecontactlistview.cpp
index e271801e..54f52528 100644
--- a/kopete/kopete/contactlist/kopetecontactlistview.cpp
+++ b/kopete/kopete/contactlist/kopetecontactlistview.cpp
@@ -81,19 +81,19 @@ class KopeteContactListViewPrivate
public:
std::auto_ptr<ContactListViewStrategy> viewStrategy;
- void updateViewStrategy( KListView *view );
+ void updateViewStrategy( TDEListView *view );
};
class ContactListViewStrategy
{
public:
- ContactListViewStrategy( KListView *view )
+ ContactListViewStrategy( TDEListView *view )
: _listView( view )
{
view->clear();
}
virtual ~ContactListViewStrategy() {}
- KListView *listView() { return _listView; }
+ TDEListView *listView() { return _listView; }
void addCurrentItems()
{
// Add the already existing groups now
@@ -147,13 +147,13 @@ protected:
}
private:
- KListView *_listView;
+ TDEListView *_listView;
};
class ArrangeByGroupsViewStrategy : public ContactListViewStrategy
{
public:
- ArrangeByGroupsViewStrategy( KListView *view )
+ ArrangeByGroupsViewStrategy( TDEListView *view )
: ContactListViewStrategy( view )
{
addCurrentItems();
@@ -242,7 +242,7 @@ private:
class ArrangeByPresenceViewStrategy : public ContactListViewStrategy
{
public:
- ArrangeByPresenceViewStrategy( KListView *view )
+ ArrangeByPresenceViewStrategy( TDEListView *view )
: ContactListViewStrategy( view )
, m_onlineItem( new KopeteStatusGroupViewItem( Kopete::OnlineStatus::Online, listView() ) )
, m_offlineItem( new KopeteStatusGroupViewItem( Kopete::OnlineStatus::Offline, listView() ) )
@@ -357,7 +357,7 @@ private:
TQGuardedPtr<KopeteGroupViewItem> m_temporaryItem;
};
-void KopeteContactListViewPrivate::updateViewStrategy( KListView *view )
+void KopeteContactListViewPrivate::updateViewStrategy( TDEListView *view )
{
// this is a bit nasty, but this function needs changing if we add
// more view strategies anyway, so it should be fine.
@@ -411,8 +411,8 @@ KopeteContactListView::KopeteContactListView( TQWidget *parent, const char *name
setFullWidth( true );
- connect( this, TQT_SIGNAL( contextMenu( KListView *, TQListViewItem *, const TQPoint & ) ),
- TQT_SLOT( slotContextMenu( KListView *, TQListViewItem *, const TQPoint & ) ) );
+ connect( this, TQT_SIGNAL( contextMenu( TDEListView *, TQListViewItem *, const TQPoint & ) ),
+ TQT_SLOT( slotContextMenu( TDEListView *, TQListViewItem *, const TQPoint & ) ) );
connect( this, TQT_SIGNAL( expanded( TQListViewItem * ) ),
TQT_SLOT( slotExpanded( TQListViewItem * ) ) );
connect( this, TQT_SIGNAL( collapsed( TQListViewItem * ) ),
@@ -459,7 +459,7 @@ KopeteContactListView::KopeteContactListView( TQWidget *parent, const char *name
slotSettingsChanged();
}
-void KopeteContactListView::initActions( KActionCollection *ac )
+void KopeteContactListView::initActions( TDEActionCollection *ac )
{
actionUndo = KStdAction::undo( TQT_TQOBJECT(this) , TQT_SLOT( slotUndo() ) , ac );
actionRedo = KStdAction::redo( TQT_TQOBJECT(this) , TQT_SLOT( slotRedo() ) , ac );
@@ -467,7 +467,7 @@ void KopeteContactListView::initActions( KActionCollection *ac )
actionRedo->setEnabled(false);
- new KAction( i18n( "Create New Group..." ), 0, 0, TQT_TQOBJECT(this), TQT_SLOT( addGroup() ),
+ new TDEAction( i18n( "Create New Group..." ), 0, 0, TQT_TQOBJECT(this), TQT_SLOT( addGroup() ),
ac, "AddGroup" );
actionSendMessage = KopeteStdAction::sendMessage(
@@ -482,19 +482,19 @@ void KopeteContactListView::initActions( KActionCollection *ac )
actionRemove = KopeteStdAction::deleteContact( TQT_TQOBJECT(this), TQT_SLOT( slotRemove() ),
ac, "contactRemove" );
- actionSendEmail = new KAction( i18n( "Send Email..." ), TQString::fromLatin1( "mail_generic" ),
+ actionSendEmail = new TDEAction( i18n( "Send Email..." ), TQString::fromLatin1( "mail_generic" ),
0, TQT_TQOBJECT(this), TQT_SLOT( slotSendEmail() ), ac, "contactSendEmail" );
/* this actionRename is buggy, and useless with properties, removed in kopeteui.rc*/
- actionRename = new KAction( i18n( "Rename" ), "filesaveas", 0,
+ actionRename = new TDEAction( i18n( "Rename" ), "filesaveas", 0,
TQT_TQOBJECT(this), TQT_SLOT( slotRename() ), ac, "contactRename" );
actionSendFile = KopeteStdAction::sendFile( TQT_TQOBJECT(this), TQT_SLOT( slotSendFile() ),
ac, "contactSendFile" );
- actionAddContact = new KActionMenu( i18n( "&Add Contact" ),
+ actionAddContact = new TDEActionMenu( i18n( "&Add Contact" ),
TQString::fromLatin1( "add_user" ), ac , "contactAddContact" );
actionAddContact->popupMenu()->insertTitle( i18n("Select Account") );
- actionAddTemporaryContact = new KAction( i18n( "Add to Your Contact List" ), "add_user", 0,
+ actionAddTemporaryContact = new TDEAction( i18n( "Add to Your Contact List" ), "add_user", 0,
TQT_TQOBJECT(this), TQT_SLOT( slotAddTemporaryContact() ), ac, "contactAddTemporaryContact" );
connect( Kopete::ContactList::self(), TQT_SIGNAL( metaContactSelected( bool ) ), this, TQT_SLOT( slotMetaContactSelected( bool ) ) );
@@ -502,7 +502,7 @@ void KopeteContactListView::initActions( KActionCollection *ac )
connect( Kopete::AccountManager::self(), TQT_SIGNAL(accountRegistered( Kopete::Account* )), TQT_SLOT(slotAddSubContactActionNewAccount(Kopete::Account*)));
connect( Kopete::AccountManager::self(), TQT_SIGNAL(accountUnregistered( const Kopete::Account* )), TQT_SLOT(slotAddSubContactActionAccountDeleted(const Kopete::Account *)));
- actionProperties = new KAction( i18n( "&Properties" ), "edit_user", TQt::Key_Alt + TQt::Key_Return,
+ actionProperties = new TDEAction( i18n( "&Properties" ), "edit_user", TQt::Key_Alt + TQt::Key_Return,
TQT_TQOBJECT(this), TQT_SLOT( slotProperties() ), ac, "contactProperties" );
// Update enabled/disabled actions
@@ -516,7 +516,7 @@ KopeteContactListView::~KopeteContactListView()
void KopeteContactListView::slotAddSubContactActionNewAccount(Kopete::Account* account)
{
- KAction *action = new KAction( account->accountLabel(), account->accountIcon(), 0 , TQT_TQOBJECT(this), TQT_SLOT(slotAddContact()), account);
+ TDEAction *action = new TDEAction( account->accountLabel(), account->accountIcon(), 0 , TQT_TQOBJECT(this), TQT_SLOT(slotAddContact()), account);
m_accountAddContactMap.insert( account, action);
actionAddContact->insert( action );
}
@@ -526,7 +526,7 @@ void KopeteContactListView::slotAddSubContactActionAccountDeleted(const Kopete::
kdDebug(14000) << k_funcinfo << endl;
if ( m_accountAddContactMap.contains( account ) )
{
- KAction *action = m_accountAddContactMap[account];
+ TDEAction *action = m_accountAddContactMap[account];
m_accountAddContactMap.remove( account );
actionAddContact->remove( action );
}
@@ -636,7 +636,7 @@ void KopeteContactListView::slotCollapsed( TQListViewItem *item )
}
}
-void KopeteContactListView::slotContextMenu( KListView * /*listview*/,
+void KopeteContactListView::slotContextMenu( TDEListView * /*listview*/,
TQListViewItem *item, const TQPoint &point )
{
// FIXME: this code should be moved to the various list view item classes.
@@ -659,7 +659,7 @@ void KopeteContactListView::slotContextMenu( KListView * /*listview*/,
int nb = Kopete::ContactList::self()->selectedMetaContacts().count() +
Kopete::ContactList::self()->selectedGroups().count();
- KMainWindow *window = dynamic_cast<KMainWindow *>(topLevelWidget());
+ TDEMainWindow *window = dynamic_cast<TDEMainWindow *>(topLevelWidget());
if ( !window )
{
kdError( 14000 ) << k_funcinfo << "Main window not found, unable to display context-menu; "
@@ -677,13 +677,13 @@ void KopeteContactListView::slotContextMenu( KListView * /*listview*/,
Kopete::Contact *c = metaLVI->contactForPoint( TQPoint( px, py ) ) ;
if ( c )
{
- KPopupMenu *p = c->popupMenu();
+ TDEPopupMenu *p = c->popupMenu();
connect( p, TQT_SIGNAL( aboutToHide() ), p, TQT_SLOT( deleteLater() ) );
p->popup( point );
}
else
{
- KPopupMenu *popup = dynamic_cast<KPopupMenu *>(
+ TDEPopupMenu *popup = dynamic_cast<TDEPopupMenu *>(
window->factory()->container( "contact_popup", window ) );
if ( popup )
{
@@ -709,7 +709,7 @@ void KopeteContactListView::slotContextMenu( KListView * /*listview*/,
sep = false;
}
- KPopupMenu *contactMenu = it.current()->popupMenu();
+ TDEPopupMenu *contactMenu = it.current()->popupMenu();
connect( popup, TQT_SIGNAL( aboutToHide() ), contactMenu, TQT_SLOT( deleteLater() ) );
TQString nick=c->property(Kopete::Global::Properties::self()->nickName()).value().toString();
TQString text= nick.isEmpty() ? c->contactId() : i18n( "Translators: format: '<displayName> (<id>)'", "%2 <%1>" ). arg( c->contactId(), nick );
@@ -727,7 +727,7 @@ void KopeteContactListView::slotContextMenu( KListView * /*listview*/,
}
else if ( groupvi && nb == 1 )
{
- KPopupMenu *popup = dynamic_cast<KPopupMenu *>(
+ TDEPopupMenu *popup = dynamic_cast<TDEPopupMenu *>(
window->factory()->container( "group_popup", window ) );
if ( popup )
{
@@ -745,14 +745,14 @@ void KopeteContactListView::slotContextMenu( KListView * /*listview*/,
}
else if ( nb >= 1 )
{
- KPopupMenu *popup = dynamic_cast<KPopupMenu *>(
+ TDEPopupMenu *popup = dynamic_cast<TDEPopupMenu *>(
window->factory()->container( "contactlistitems_popup", window ) );
if ( popup )
popup->popup( point );
}
else
{
- KPopupMenu *popup = dynamic_cast<KPopupMenu *>(
+ TDEPopupMenu *popup = dynamic_cast<TDEPopupMenu *>(
window->factory()->container( "contactlist_popup", window ) );
if ( popup )
{
@@ -1066,7 +1066,7 @@ bool KopeteContactListView::acceptDrag(TQDropEvent *e) const
TQListViewItem *source=currentItem();
TQListViewItem *parent;
TQListViewItem *afterme;
- // Due to a little design problem in KListView::findDrop() we can't
+ // Due to a little design problem in TDEListView::findDrop() we can't
// call it directly from a const method until KDE 4.0, but as the
// method is in fact const we can of course get away with a
// const_cast...
@@ -1204,7 +1204,7 @@ void KopeteContactListView::findDrop(const TQPoint &pos, TQListViewItem *&parent
void KopeteContactListView::contentsMousePressEvent( TQMouseEvent *e )
{
- KListView::contentsMousePressEvent( e );
+ TDEListView::contentsMousePressEvent( e );
if (e->button() == Qt::LeftButton )
{
TQPoint p=contentsToViewport(e->pos());