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 | |
| 11 | #ifndef ADD_CONTACT_PANEL_H |
| 12 | #define ADD_CONTACT_PANEL_H |
| 13 | |
| 14 | #include <QDialog> |
| 15 | #include <QTableWidgetItem> |
| 16 | |
| 17 | #ifndef Q_MOC_RUN |
| 18 | #include "endorse-info.pb.h" |
| 19 | #endif |
| 20 | |
| 21 | namespace Ui { |
| 22 | class AddContactPanel; |
| 23 | } |
| 24 | |
| 25 | class AddContactPanel : public QDialog |
| 26 | { |
| 27 | Q_OBJECT |
| 28 | |
| 29 | public: |
Yingdi Yu | fa0b6a0 | 2014-04-30 14:26:42 -0700 | [diff] [blame^] | 30 | explicit |
Yingdi Yu | 348f5ea | 2014-03-01 14:47:25 -0800 | [diff] [blame] | 31 | AddContactPanel(QWidget *parent = 0); |
| 32 | |
| 33 | ~AddContactPanel(); |
| 34 | |
| 35 | public slots: |
| 36 | void |
| 37 | onContactEndorseInfoReady(const chronos::EndorseInfo& endorseInfo); |
| 38 | |
| 39 | private slots: |
| 40 | void |
| 41 | onCancelClicked(); |
Yingdi Yu | fa0b6a0 | 2014-04-30 14:26:42 -0700 | [diff] [blame^] | 42 | |
Yingdi Yu | 348f5ea | 2014-03-01 14:47:25 -0800 | [diff] [blame] | 43 | void |
| 44 | onSearchClicked(); |
| 45 | |
| 46 | void |
| 47 | onAddClicked(); |
| 48 | |
| 49 | signals: |
| 50 | void |
| 51 | fetchInfo(const QString& identity); |
| 52 | |
| 53 | void |
| 54 | addContact(const QString& identity); |
| 55 | |
| 56 | private: |
| 57 | Ui::AddContactPanel *ui; |
| 58 | QString m_searchIdentity; |
| 59 | |
| 60 | QTableWidgetItem* m_typeHeader; |
| 61 | QTableWidgetItem* m_valueHeader; |
| 62 | QTableWidgetItem* m_endorseHeader; |
| 63 | }; |
| 64 | |
| 65 | #endif // ADD_CONTACT_PANEL_H |