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 | eb692ac | 2015-02-10 18:46:18 -0800 | [diff] [blame^] | 11 | #ifndef CHRONOCHAT_ADD_CONTACT_PANEL_HPP |
| 12 | #define CHRONOCHAT_ADD_CONTACT_PANEL_HPP |
Yingdi Yu | 348f5ea | 2014-03-01 14:47:25 -0800 | [diff] [blame] | 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 | |
Yingdi Yu | eb692ac | 2015-02-10 18:46:18 -0800 | [diff] [blame^] | 25 | namespace chronochat { |
Yingdi Yu | 0b0a736 | 2014-08-05 16:31:30 -0700 | [diff] [blame] | 26 | |
Yingdi Yu | 348f5ea | 2014-03-01 14:47:25 -0800 | [diff] [blame] | 27 | class AddContactPanel : public QDialog |
| 28 | { |
| 29 | Q_OBJECT |
| 30 | |
| 31 | public: |
Yingdi Yu | fa0b6a0 | 2014-04-30 14:26:42 -0700 | [diff] [blame] | 32 | explicit |
Yingdi Yu | 0b0a736 | 2014-08-05 16:31:30 -0700 | [diff] [blame] | 33 | AddContactPanel(QWidget* parent = 0); |
Yingdi Yu | 348f5ea | 2014-03-01 14:47:25 -0800 | [diff] [blame] | 34 | |
| 35 | ~AddContactPanel(); |
| 36 | |
| 37 | public slots: |
| 38 | void |
Yingdi Yu | eb692ac | 2015-02-10 18:46:18 -0800 | [diff] [blame^] | 39 | onContactEndorseInfoReady(const chronochat::EndorseInfo& endorseInfo); |
Yingdi Yu | 348f5ea | 2014-03-01 14:47:25 -0800 | [diff] [blame] | 40 | |
| 41 | private slots: |
| 42 | void |
| 43 | onCancelClicked(); |
Yingdi Yu | fa0b6a0 | 2014-04-30 14:26:42 -0700 | [diff] [blame] | 44 | |
Yingdi Yu | 348f5ea | 2014-03-01 14:47:25 -0800 | [diff] [blame] | 45 | void |
| 46 | onSearchClicked(); |
| 47 | |
| 48 | void |
| 49 | onAddClicked(); |
| 50 | |
| 51 | signals: |
| 52 | void |
| 53 | fetchInfo(const QString& identity); |
| 54 | |
| 55 | void |
| 56 | addContact(const QString& identity); |
| 57 | |
| 58 | private: |
Yingdi Yu | 0b0a736 | 2014-08-05 16:31:30 -0700 | [diff] [blame] | 59 | Ui::AddContactPanel* ui; |
Yingdi Yu | 348f5ea | 2014-03-01 14:47:25 -0800 | [diff] [blame] | 60 | QString m_searchIdentity; |
| 61 | |
| 62 | QTableWidgetItem* m_typeHeader; |
| 63 | QTableWidgetItem* m_valueHeader; |
| 64 | QTableWidgetItem* m_endorseHeader; |
| 65 | }; |
| 66 | |
Yingdi Yu | eb692ac | 2015-02-10 18:46:18 -0800 | [diff] [blame^] | 67 | } // namespace chronochat |
Yingdi Yu | 0b0a736 | 2014-08-05 16:31:30 -0700 | [diff] [blame] | 68 | |
Yingdi Yu | eb692ac | 2015-02-10 18:46:18 -0800 | [diff] [blame^] | 69 | #endif // CHRONOCHAT_ADD_CONTACT_PANEL_HPP |