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

Nepomuk-Core

  • KTp
  • Declarative
contact-pin.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2012 Aleix Pol <aleixpol@kde.org>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Lesser General Public
6  License as published by the Free Software Foundation; either
7  version 2.1 of the License, or (at your option) any later version.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Lesser General Public License for more details.
13 
14  You should have received a copy of the GNU Lesser General Public
15  License along with this library; if not, write to the Free Software
16  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18 
19 #ifndef CONTACTPIN_H
20 #define CONTACTPIN_H
21 
22 #include <QObject>
23 #include "KTp/types.h"
24 
25 class PinnedContactsModel;
26 
27 class ContactPin : public QObject
28 {
29  Q_OBJECT
30  Q_PROPERTY(KTp::ContactPtr contact READ contact WRITE setContact)
31  Q_PROPERTY(Tp::AccountPtr account READ account WRITE setAccount)
32  Q_PROPERTY(PinnedContactsModel *model READ model WRITE setModel)
33  Q_PROPERTY(bool pinned READ isPinned NOTIFY pinnedChanged)
34 
35  public:
36  explicit ContactPin(QObject *parent = 0);
37 
38  KTp::ContactPtr contact() const;
39  Tp::AccountPtr account() const;
40  PinnedContactsModel* model() const;
41  bool isPinned() const;
42 
43  void setContact(const KTp::ContactPtr &contact);
44  void setAccount(const Tp::AccountPtr &account);
45  void setModel(PinnedContactsModel *model);
46 
47  Q_SCRIPTABLE void toggle();
48 
49  Q_SIGNALS:
50  void pinnedChanged();
51 
52  private:
53  PinnedContactsModel *m_model;
54  KTp::ContactPtr m_contact;
55  Tp::AccountPtr m_account;
56 };
57 
58 #endif // CONTACTPIN_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