Yingdi Yu | d59b593 | 2013-10-16 13:16:49 -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 | |
Yingdi Yu | a489875 | 2013-10-15 20:31:37 -0700 | [diff] [blame] | 11 | #ifndef ADDCONTACTPANEL_H |
| 12 | #define ADDCONTACTPANEL_H |
| 13 | |
| 14 | #include <QDialog> |
Yingdi Yu | c29fb98 | 2013-10-20 19:43:10 -0700 | [diff] [blame^] | 15 | #include <QMetaType> |
| 16 | #include "warningdialog.h" |
Yingdi Yu | a489875 | 2013-10-15 20:31:37 -0700 | [diff] [blame] | 17 | |
Yingdi Yu | d59b593 | 2013-10-16 13:16:49 -0700 | [diff] [blame] | 18 | #ifndef Q_MOC_RUN |
| 19 | #include "endorse-certificate.h" |
Yingdi Yu | 0b82a4e | 2013-10-18 11:29:25 -0700 | [diff] [blame] | 20 | #include "contact-manager.h" |
Yingdi Yu | d59b593 | 2013-10-16 13:16:49 -0700 | [diff] [blame] | 21 | #endif |
| 22 | |
Yingdi Yu | a489875 | 2013-10-15 20:31:37 -0700 | [diff] [blame] | 23 | namespace Ui { |
| 24 | class AddContactPanel; |
| 25 | } |
| 26 | |
Yingdi Yu | c29fb98 | 2013-10-20 19:43:10 -0700 | [diff] [blame^] | 27 | Q_DECLARE_METATYPE(ndn::Name) |
| 28 | |
| 29 | Q_DECLARE_METATYPE(EndorseCertificate) |
| 30 | |
Yingdi Yu | a489875 | 2013-10-15 20:31:37 -0700 | [diff] [blame] | 31 | class AddContactPanel : public QDialog |
| 32 | { |
Yingdi Yu | 0b82a4e | 2013-10-18 11:29:25 -0700 | [diff] [blame] | 33 | Q_OBJECT |
Yingdi Yu | a489875 | 2013-10-15 20:31:37 -0700 | [diff] [blame] | 34 | |
| 35 | public: |
Yingdi Yu | 0b82a4e | 2013-10-18 11:29:25 -0700 | [diff] [blame] | 36 | explicit AddContactPanel(ndn::Ptr<ContactManager> contactManager, |
| 37 | QWidget *parent = 0); |
| 38 | |
| 39 | ~AddContactPanel(); |
Yingdi Yu | a489875 | 2013-10-15 20:31:37 -0700 | [diff] [blame] | 40 | |
Yingdi Yu | d59b593 | 2013-10-16 13:16:49 -0700 | [diff] [blame] | 41 | private slots: |
| 42 | void |
| 43 | onCancelClicked(); |
| 44 | |
| 45 | void |
| 46 | onSearchClicked(); |
| 47 | |
| 48 | void |
| 49 | onAddClicked(); |
| 50 | |
Yingdi Yu | aa8d769 | 2013-10-18 17:05:02 -0700 | [diff] [blame] | 51 | void |
Yingdi Yu | c29fb98 | 2013-10-20 19:43:10 -0700 | [diff] [blame^] | 52 | selfEndorseCertificateFetched(const EndorseCertificate& endorseCertificate); |
| 53 | |
| 54 | void |
| 55 | selfEndorseCertificateFetchFailed(const ndn::Name& identity); |
Yingdi Yu | aa8d769 | 2013-10-18 17:05:02 -0700 | [diff] [blame] | 56 | |
Yingdi Yu | a489875 | 2013-10-15 20:31:37 -0700 | [diff] [blame] | 57 | private: |
Yingdi Yu | d59b593 | 2013-10-16 13:16:49 -0700 | [diff] [blame] | 58 | Ui::AddContactPanel *ui; |
Yingdi Yu | aa8d769 | 2013-10-18 17:05:02 -0700 | [diff] [blame] | 59 | ndn::Name m_searchIdentity; |
Yingdi Yu | 0b82a4e | 2013-10-18 11:29:25 -0700 | [diff] [blame] | 60 | ndn::Ptr<ContactManager> m_contactManager; |
Yingdi Yu | c29fb98 | 2013-10-20 19:43:10 -0700 | [diff] [blame^] | 61 | WarningDialog* m_warningDialog; |
Yingdi Yu | a489875 | 2013-10-15 20:31:37 -0700 | [diff] [blame] | 62 | }; |
| 63 | |
| 64 | #endif // ADDCONTACTPANEL_H |