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

Nepomuk-Core

  • KTp
  • Declarative
conversation.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2011 Lasath Fernando <kde@lasath.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 
20 #ifndef CONVERSATION_H
21 #define CONVERSATION_H
22 
23 #include <QObject>
24 #include <TelepathyQt/Account>
25 #include <TelepathyQt/TextChannel>
26 
27 #include <KIcon>
28 
29 #include "conversation-queue-manager.h"
30 #include "conversation-target.h"
31 #include "messages-model.h"
32 
33 class ConversationTarget;
34 class MessagesModel;
35 class Conversation : public QObject
36 {
37  Q_OBJECT
38 
39  Q_PROPERTY(ConversationTarget *target READ target CONSTANT)
40  Q_PROPERTY(MessagesModel *messages READ messages CONSTANT)
41  Q_PROPERTY(bool valid READ isValid NOTIFY validityChanged)
42 
43  public:
44  Conversation(const Tp::TextChannelPtr &channel, const Tp::AccountPtr &account, QObject *parent = 0);
45  Conversation(QObject *parent = 0);
46  virtual ~Conversation();
47 
48  MessagesModel* messages() const;
49  ConversationTarget* target() const;
50 
51  bool isValid();
52 
53  Q_SIGNALS:
54  void validityChanged(bool isValid);
55  void conversationDelegated();
56 
57  public Q_SLOTS:
58  void delegateToProperClient();
59  void requestClose();
60 
61  private Q_SLOTS:
62  void onChannelInvalidated(Tp::DBusProxy *proxy, const QString &errorName, const QString &errorMessage);
63 
64  private:
65  class ConversationPrivate;
66  ConversationPrivate *d;
67 };
68 
69 Q_DECLARE_METATYPE(Conversation*);
70 
71 #endif // CONVERSATION_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