Yingdi Yu | 348f5ea | 2014-03-01 14:47:25 -0800 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */ |
| 2 | /* |
| 3 | * Copyright (c) 2013, Regents of the University of California |
| 4 | * Yingdi Yu |
| 5 | * |
| 6 | * BSD license, See the LICENSE file for more information |
| 7 | * |
| 8 | * Author: Yingdi Yu <yingdi@cs.ucla.edu> |
| 9 | */ |
| 10 | |
Yingdi Yu | 0b0a736 | 2014-08-05 16:31:30 -0700 | [diff] [blame^] | 11 | #ifndef CHRONOS_INVITE_LIST_DIALOG_HPP |
| 12 | #define CHRONOS_INVITE_LIST_DIALOG_HPP |
Yingdi Yu | 348f5ea | 2014-03-01 14:47:25 -0800 | [diff] [blame] | 13 | |
| 14 | #include <QDialog> |
| 15 | #include <QStringListModel> |
| 16 | |
| 17 | #ifndef Q_MOC_RUN |
| 18 | #endif |
| 19 | |
| 20 | namespace Ui { |
| 21 | class InviteListDialog; |
| 22 | } |
| 23 | |
Yingdi Yu | 0b0a736 | 2014-08-05 16:31:30 -0700 | [diff] [blame^] | 24 | namespace chronos { |
| 25 | |
Yingdi Yu | 348f5ea | 2014-03-01 14:47:25 -0800 | [diff] [blame] | 26 | class InviteListDialog : public QDialog |
| 27 | { |
| 28 | Q_OBJECT |
| 29 | |
| 30 | public: |
| 31 | explicit |
Yingdi Yu | 0b0a736 | 2014-08-05 16:31:30 -0700 | [diff] [blame^] | 32 | InviteListDialog(QWidget* parent = 0); |
Yingdi Yu | fa0b6a0 | 2014-04-30 14:26:42 -0700 | [diff] [blame] | 33 | |
Yingdi Yu | 348f5ea | 2014-03-01 14:47:25 -0800 | [diff] [blame] | 34 | ~InviteListDialog(); |
| 35 | |
| 36 | void |
| 37 | setInviteLabel(std::string label); |
Yingdi Yu | fa0b6a0 | 2014-04-30 14:26:42 -0700 | [diff] [blame] | 38 | |
Yingdi Yu | 348f5ea | 2014-03-01 14:47:25 -0800 | [diff] [blame] | 39 | signals: |
| 40 | void |
| 41 | sendInvitation(const QString&); |
| 42 | |
| 43 | public slots: |
| 44 | void |
| 45 | onContactAliasListReady(const QStringList& aliasList); |
| 46 | |
| 47 | void |
| 48 | onContactIdListReady(const QStringList& idList); |
| 49 | |
| 50 | private slots: |
Yingdi Yu | fa0b6a0 | 2014-04-30 14:26:42 -0700 | [diff] [blame] | 51 | void |
Yingdi Yu | 348f5ea | 2014-03-01 14:47:25 -0800 | [diff] [blame] | 52 | onInviteClicked(); |
| 53 | |
| 54 | void |
| 55 | onCancelClicked(); |
| 56 | |
| 57 | private: |
Yingdi Yu | 0b0a736 | 2014-08-05 16:31:30 -0700 | [diff] [blame^] | 58 | Ui::InviteListDialog* ui; |
Yingdi Yu | 348f5ea | 2014-03-01 14:47:25 -0800 | [diff] [blame] | 59 | QStringListModel* m_contactListModel; |
| 60 | QStringList m_contactAliasList; |
| 61 | QStringList m_contactIdList; |
| 62 | }; |
| 63 | |
Yingdi Yu | 0b0a736 | 2014-08-05 16:31:30 -0700 | [diff] [blame^] | 64 | } // namespace chronos |
| 65 | |
| 66 | #endif // CHRONOS_INVITE_LIST_DIALOG_HPP |