• 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.12
  • kdenetwork
  • kopete
  • kopete
  • contactlist
contactlistplainmodel.h
Go to the documentation of this file.
1 /*
2  Kopete Contactlist Model
3 
4  Copyright (c) 2007 by Aleix Pol <aleixpol@gmail.com>
5  Copyright 2009 by Roman Jarosz <kedgedev@gmail.com>
6 
7  Kopete (c) 2002-2009 by the Kopete developers <kopete-devel@kde.org>
8 
9  *************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  *************************************************************************
17 */
18 
19 #ifndef KOPETE_UI_CONTACTLISTPLAINMODEL_H
20 #define KOPETE_UI_CONTACTLISTPLAINMODEL_H
21 
22 #include "contactlistmodel.h"
23 
24 #include <kopete_export.h>
25 
26 namespace Kopete {
27 
28 class Group;
29 class Contactlist;
30 class MetaContact;
31 class ContactListElement;
32 
33 namespace UI {
34 
35 class MetaContactModelItem;
36 class GroupModelItem;
37 class ContactListPlainModelItem;
41 class KOPETE_CONTACT_LIST_EXPORT ContactListPlainModel : public ContactListModel
42 {
43 Q_OBJECT
44 public:
45  ContactListPlainModel(QObject* parent = 0);
46  ~ContactListPlainModel();
47 
48  virtual QVariant data ( const QModelIndex & index, int role = Qt::DisplayRole ) const;
49  virtual QModelIndex index ( int row, int column, const QModelIndex & parent = QModelIndex() ) const;
50 
51  virtual QModelIndex parent ( const QModelIndex & index ) const;
52  virtual int rowCount ( const QModelIndex & parent = QModelIndex() ) const;
53  virtual bool hasChildren ( const QModelIndex & parent = QModelIndex() ) const;
54 
55  virtual Qt::ItemFlags flags(const QModelIndex &index) const;
56 
57  virtual bool dropMimeData(const QMimeData *data, Qt::DropAction action,
58  int row, int column, const QModelIndex &parent);
59 
60 public Q_SLOTS:
61  virtual void addMetaContact( Kopete::MetaContact* );
62  virtual void removeMetaContact( Kopete::MetaContact* );
63 
64 protected Q_SLOTS:
65  virtual void handleContactDataChange(Kopete::MetaContact*);
66  virtual void appearanceConfigChanged();
67  virtual void loadContactList();
68 
69 protected:
70  virtual void loadModelSettingsImpl( QDomElement& rootElement );
71  virtual void saveModelSettingsImpl( QDomDocument& doc, QDomElement& rootElement );
72 
73  virtual bool dropMetaContacts( int row, const QModelIndex &parent, Qt::DropAction action, const QList<GroupMetaContactPair> &items );
74 
75 private:
76  void addMetaContactImpl( Kopete::MetaContact *mc );
77  QModelIndexList indexListFor( Kopete::ContactListElement* ) const;
78 
79  void savePositions();
80  void loadPositions();
81 
82  QHash<const Kopete::MetaContact*, int > m_addContactPosition;
83  QList<Kopete::MetaContact*> m_contacts;
84 };
85 
86 }
87 
88 }
89 
90 #endif
91 //kate: tab-width 4
Kopete::UI::ContactListPlainModel
Definition: contactlistplainmodel.h:41
contactlistmodel.h
QObject
Kopete::Items::MetaContact
Definition: kopeteitembase.h:57
Kopete::Items::Group
Definition: kopeteitembase.h:57
Kopete::UI::ContactListModel
Definition: contactlistmodel.h:42
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:53:40 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