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

Nepomuk-Core

  • KTp
  • Widgets
join-chat-room-dialog.h
Go to the documentation of this file.
1 /*
2  * This file is part of telepathy-contactslist-prototype
3  *
4  * Copyright (C) 2011 Francesco Nwokeka <francesco.nwokeka@gmail.com>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 #ifndef JOINCHATROOMDIALOG_H
22 #define JOINCHATROOMDIALOG_H
23 
24 #include <TelepathyQt/AccountManager>
25 #include <KDialog>
26 #include <KTp/Models/rooms-model.h>
27 
28 #include <KTp/ktp-export.h>
29 
30 namespace Ui {
31  class JoinChatRoomDialog;
32 }
33 
34 class RoomsModel;
35 class FavoriteRoomsModel;
36 class QSortFilterProxyModel;
37 class KCompletion;
38 
39 namespace KTp {
40 
41 class KTP_EXPORT JoinChatRoomDialog : public KDialog
42 {
43  Q_OBJECT
44 
45 public:
46  explicit JoinChatRoomDialog(Tp::AccountManagerPtr accountManager, QWidget *parent = 0);
47  ~JoinChatRoomDialog();
48 
49  Tp::AccountPtr selectedAccount() const;
50  QString selectedChatRoom() const;
52 private Q_SLOTS:
53  void onTextChanged(QString newText);
54  void onAccountSelectionChanged(int newIndex);
55  void addFavorite();
56  void removeFavorite();
57  void addRecentRoom();
58  void removeRecentRoom();
59  void clearRecentRooms();
60  void getRoomList();
61  void stopListing();
62  void onRoomListChannelReadyForHandling(Tp::PendingOperation *operation);
63  void onRoomListChannelReady(Tp::PendingOperation *operation);
64  void onRoomListChannelClosed(Tp::PendingOperation *operation);
65  void onListing(bool isListing);
66  void onGotRooms(Tp::RoomInfoList roomInfoList);
67  void onFavoriteRoomClicked(const QModelIndex &index);
68  void onRecentRoomClicked();
69  void onRoomClicked(const QModelIndex &index);
70 
71 private:
72  void sendNotificationToUser(const QString& errorMsg);
73  void loadFavoriteRooms();
74 
75  QList<Tp::AccountPtr> m_accounts;
76  Ui::JoinChatRoomDialog *ui;
77  Tp::PendingChannel *m_pendingRoomListChannel;
78  Tp::ChannelPtr m_roomListChannel;
79  Tp::Client::ChannelTypeRoomListInterface *m_iface;
80  RoomsModel *m_model;
81  FavoriteRoomsModel *m_favoritesModel;
82  QSortFilterProxyModel *m_favoritesProxyModel;
83  KConfigGroup m_favoriteRoomsGroup;
84  KConfigGroup m_recentRoomsGroup;
85  QHash <QString, QStringList> m_recentRooms;
86  KCompletion *m_recentComp;
87 };
88 
89 } //namespace KTp
90 
91 #endif // JOINCHATROOMDIALOG_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