Yingdi Yu | 42f6646 | 2013-10-31 17:38:22 -0700 | [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 | |
| 11 | #ifndef INVITELISTDIALOG_H |
| 12 | #define INVITELISTDIALOG_H |
| 13 | |
| 14 | #include <QDialog> |
| 15 | #include <QStringListModel> |
| 16 | |
| 17 | #ifndef Q_MOC_RUN |
| 18 | #include "contact-manager.h" |
| 19 | #endif |
| 20 | |
| 21 | namespace Ui { |
| 22 | class InviteListDialog; |
| 23 | } |
| 24 | |
| 25 | class InviteListDialog : public QDialog |
| 26 | { |
| 27 | Q_OBJECT |
| 28 | |
| 29 | public: |
Yingdi Yu | a1a688f | 2014-02-06 18:09:22 -0800 | [diff] [blame^] | 30 | explicit InviteListDialog(ndn::shared_ptr<chronos::ContactManager> contactManager, |
Yingdi Yu | 42f6646 | 2013-10-31 17:38:22 -0700 | [diff] [blame] | 31 | QWidget *parent = 0); |
| 32 | ~InviteListDialog(); |
| 33 | |
| 34 | void |
| 35 | setInviteLabel(std::string label); |
| 36 | |
| 37 | signals: |
| 38 | void |
| 39 | invitionDetermined(QString, bool); |
| 40 | |
| 41 | private slots: |
| 42 | void |
| 43 | refreshContactList(); |
| 44 | |
| 45 | void |
| 46 | inviteWrapper(); |
| 47 | |
| 48 | void |
| 49 | onCancelClicked(); |
| 50 | |
| 51 | private: |
| 52 | Ui::InviteListDialog *ui; |
Yingdi Yu | a1a688f | 2014-02-06 18:09:22 -0800 | [diff] [blame^] | 53 | ndn::shared_ptr<chronos::ContactManager> m_contactManager; |
Yingdi Yu | 42f6646 | 2013-10-31 17:38:22 -0700 | [diff] [blame] | 54 | QStringListModel* m_contactListModel; |
Yingdi Yu | a1a688f | 2014-02-06 18:09:22 -0800 | [diff] [blame^] | 55 | std::vector<ndn::shared_ptr<chronos::ContactItem> > m_contactList; |
Yingdi Yu | 42f6646 | 2013-10-31 17:38:22 -0700 | [diff] [blame] | 56 | std::vector<std::string> m_invitedContacts; |
| 57 | }; |
| 58 | |
| 59 | #endif // INVITELISTDIALOG_H |