• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdenetwork API Reference
  • KDE Home
  • Contact Us
 

kopete/kopete

  • sources
  • kde-4.14
  • kdenetwork
  • kopete
  • kopete
  • contactlist
kopetecontactlistview.h
Go to the documentation of this file.
1 /*
2  Kopete Contact List View
3 
4  Copyright (c) 2001-2002 by Duncan Mac-Vicar Prett <duncan@kde.org>
5  Copyright (c) 2002 by Nick Betcher <nbetcher@usinternet.com>
6  Copyright (c) 2002 by Stefan Gehn <metz@gehn.net>
7  Copyright (c) 2002-2005 by Olivier Goffart <ogoffart@kde.org>
8  Copyright (c) 2004 by Richard Smith <kde@metafoo.co.uk>
9  Copyright 2007-2008 by Matt Rogers <mattr@kde.org>
10  Copyright 2009 by Roman Jarosz <kedgedev@gmail.com>
11 
12  Kopete (c) 2002-2009 by the Kopete developers <kopete-devel@kde.org>
13 
14  *************************************************************************
15  * *
16  * This program is free software; you can redistribute it and/or modify *
17  * it under the terms of the GNU General Public License as published by *
18  * the Free Software Foundation; either version 2 of the License, or *
19  * (at your option) any later version. *
20  * *
21  *************************************************************************
22 */
23 
24 #ifndef KOPETE_CONTACTLISTVIEW_H
25 #define KOPETE_CONTACTLISTVIEW_H
26 
27 #include <QTreeView>
28 
29 #include <QPixmap>
30 #include <QList>
31 #include <QStringList>
32 #include <QRect>
33 #include <QTimer>
34 #include <QPointer>
35 #include <QMouseEvent>
36 #include <QDropEvent>
37 
38 #include <kopete_export.h>
39 
40 class KActionCollection;
41 class KAction;
42 class KSelectAction;
43 class KActionMenu;
44 
45 class KopeteContactListViewPrivate;
46 
47 namespace Kopete
48 {
49 class Contact;
50 class MetaContact;
51 class Group;
52 class MessageEvent;
53 class Account;
54 }
55 
59 class KOPETE_CONTACT_LIST_EXPORT KopeteContactListView : public QTreeView
60 {
61  Q_OBJECT
62 
63 public:
64  KopeteContactListView( QWidget *parent = 0 );
65  ~KopeteContactListView();
66 
67  void initActions( KActionCollection *ac );
68  virtual void setModel( QAbstractItemModel *newModel );
69 
70  int visibleContentHeight() const;
71 
72  virtual void keyboardSearch( const QString &search );
73 
74 public Q_SLOTS:
75  virtual void reset();
76  void contactActivated( const QModelIndex& index );
77 
78  void showItemProperties();
79  void mergeMetaContact();
80  void addGroup();
81  void startChat();
82  void sendFile();
83  void sendMessage();
84  void sendEmail();
85  void rename();
86  void addTemporaryContact();
87  void removeGroupOrMetaContact();
88  void moveToGroup();
89  void copyToGroup();
90 
91 Q_SIGNALS:
92  void visibleContentHeightChanged();
93 
94 protected:
95  virtual void contextMenuEvent( QContextMenuEvent* event );
96  virtual void mouseReleaseEvent( QMouseEvent *event );
97  virtual void startDrag( Qt::DropActions supportedActions );
98  virtual void dragMoveEvent( QDragMoveEvent *event );
99  virtual void timerEvent( QTimerEvent *event );
100  virtual bool eventFilter( QObject *object, QEvent *event );
101  virtual bool viewportEvent( QEvent *event );
102 
103 protected slots:
104  virtual void rowsInserted( const QModelIndex &parent, int start, int end );
105  virtual void selectionChanged( const QItemSelection& selected, const QItemSelection& deselected );
106 
107 private slots:
108  void reexpandGroups();
109  void itemExpanded( const QModelIndex& index );
110  void itemCollapsed( const QModelIndex& index );
111 
112  void updateActions();
113  void updateMetaContactActions();
114  void slotSettingsChanged();
115  void addToAddContactMenu( Kopete::Account* account );
116  void removeToAddContactMenu( const Kopete::Account *account );
117  void addContact();
118 
119 private:
120  Kopete::MetaContact* metaContactFromIndex( const QModelIndex& index ) const;
121  Kopete::Group* groupFromIndex( const QModelIndex& index ) const;
122 
123  void groupPopup( Kopete::Group *group, const QPoint& pos );
124  void metaContactPopup( Kopete::MetaContact *metaContact, const QPoint& pos );
125  void miscPopup( QModelIndexList indexes, const QPoint& pos );
126  Kopete::Contact* contactAt( const QPoint& point ) const;
127 
128  void setScrollAutoHide( bool autoHide );
129  void setScrollHide( bool hide );
130 
131  int visibleContentHeight( const QModelIndex& parent ) const;
132 
133  KopeteContactListViewPrivate *d;
134 };
135 
136 
137 #endif
138 // vim: set noet ts=4 sts=4 sw=4:
QModelIndex
QEvent
QWidget
KopeteContactListView
Definition: kopetecontactlistview.h:59
QTreeView::dragMoveEvent
virtual void dragMoveEvent(QDragMoveEvent *event)
QDragMoveEvent
QPoint
QMouseEvent
QAbstractScrollArea::contextMenuEvent
virtual void contextMenuEvent(QContextMenuEvent *e)
QTreeView::keyboardSearch
virtual void keyboardSearch(const QString &search)
KSelectAction
Kopete::Items::MetaContact
Definition: kopeteitembase.h:57
QTimerEvent
QTreeView::viewportEvent
virtual bool viewportEvent(QEvent *event)
Kopete::Items::Group
Definition: kopeteitembase.h:57
QTreeView::timerEvent
virtual void timerEvent(QTimerEvent *event)
QContextMenuEvent
QObject
QTreeView::rowsInserted
virtual void rowsInserted(const QModelIndex &parent, int start, int end)
QAbstractItemView::startDrag
virtual void startDrag(QFlags< Qt::DropAction > supportedActions)
QObject::eventFilter
virtual bool eventFilter(QObject *watched, QEvent *event)
QString
QTreeView::mouseReleaseEvent
virtual void mouseReleaseEvent(QMouseEvent *event)
QItemSelection
KActionMenu
QTreeView
Qt::DropActions
typedef DropActions
QTreeView::setModel
virtual void setModel(QAbstractItemModel *model)
QTreeView::selectionChanged
virtual void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
KAction
QAbstractItemModel
QTreeView::reset
virtual void reset()
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:29:08 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kopete/kopete

Skip menu "kopete/kopete"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdenetwork API Reference

Skip menu "kdenetwork API Reference"
  • kget
  • kopete
  •   kopete
  •   libkopete
  • krdc
  • krfb

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal