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

Nepomuk-Core

  • KTp
  • Widgets
contact-grid-widget.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2011 David Edmundson <kde@davidedmundson.co.uk>
3  * Copyright (C) 2012 Daniele E. Domenichelli <daniele.domenichelli@gmail.com>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19 
20 
21 #ifndef CONTACT_GRID_WIDGET_H
22 #define CONTACT_GRID_WIDGET_H
23 
24 #include <QtGui/QWidget>
25 #include <QAbstractItemDelegate>
26 #include <TelepathyQt/Types>
27 #include <KTp/ktp-export.h>
28 
29 class KLineEdit;
30 
31 namespace KTp
32 {
33 class ContactsFilterModel;
34 class ContactsListModel;
35 
36 class KTP_EXPORT ContactGridWidget : public QWidget
37 {
38  Q_OBJECT
39  Q_DISABLE_COPY(ContactGridWidget)
40 
41  Q_PROPERTY(QString displayNameFilter
42  READ displayNameFilter
43  RESET clearDisplayNameFilter
44  WRITE setDisplayNameFilter
45  NOTIFY displayNameFilterChanged)
46  Q_PROPERTY(QSize iconSize
47  READ iconSize
48  WRITE setIconSize
49  NOTIFY iconSizeChanged)
50 public:
51  explicit ContactGridWidget(ContactsListModel *model, QWidget *parent = 0);
52  virtual ~ContactGridWidget();
53 
54  virtual QString displayNameFilter() const;
55  Q_SLOT virtual void clearDisplayNameFilter();
56  Q_SLOT virtual void setDisplayNameFilter(const QString &displayNameFilter);
57  Q_SIGNAL void displayNameFilterChanged(const QString &displayNameFilter);
58 
59  virtual QSize iconSize() const;
60  Q_SLOT virtual void setIconSize(const QSize &iconSize);
61  Q_SIGNAL void iconSizeChanged(const QSize &iconSize);
62 
63  virtual KTp::ContactsFilterModel* filter() const;
64  virtual KLineEdit* contactFilterLineEdit() const;
65 
66  virtual bool hasSelection() const;
67  virtual Tp::AccountPtr selectedAccount() const;
68  virtual Tp::ContactPtr selectedContact() const;
69 
70 Q_SIGNALS:
71  void selectionChanged(Tp::AccountPtr selectedAccount, Tp::ContactPtr selectedContact);
72 
73 private:
74  class Private;
75  Private * const d;
76 
77  Q_PRIVATE_SLOT(d, void _k_onSelectionChanged(QItemSelection,QItemSelection));
78 
79 }; // class ContactGridWidget
80 
81 } // namespace KTp
82 
83 #endif // CONTACT_GRID_WIDGET_H
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Fri Mar 22 2013 10:58:52 by doxygen 1.8.1.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

ktp-common-internals API Reference

Skip menu "ktp-common-internals API Reference"
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