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: |
| 30 | explicit InviteListDialog(ndn::Ptr<ContactManager> contactManager, |
| 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; |
| 53 | ndn::Ptr<ContactManager> m_contactManager; |
| 54 | QStringListModel* m_contactListModel; |
| 55 | std::vector<ndn::Ptr<ContactItem> > m_contactList; |
| 56 | std::vector<std::string> m_invitedContacts; |
| 57 | }; |
| 58 | |
| 59 | #endif // INVITELISTDIALOG_H |