blob: 545cd02fcf3ab0f9a42ef26c9a698e64405fe821 [file] [log] [blame]
Yingdi Yu348f5ea2014-03-01 14:47:25 -08001/* -*- 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 Yu0b0a7362014-08-05 16:31:30 -070011#ifndef CHRONOS_ADD_CONTACT_PANEL_HPP
12#define CHRONOS_ADD_CONTACT_PANEL_HPP
Yingdi Yu348f5ea2014-03-01 14:47:25 -080013
14#include <QDialog>
15#include <QTableWidgetItem>
16
17#ifndef Q_MOC_RUN
18#include "endorse-info.pb.h"
19#endif
20
21namespace Ui {
22class AddContactPanel;
23}
24
Yingdi Yu0b0a7362014-08-05 16:31:30 -070025namespace chronos {
26
Yingdi Yu348f5ea2014-03-01 14:47:25 -080027class AddContactPanel : public QDialog
28{
29 Q_OBJECT
30
31public:
Yingdi Yufa0b6a02014-04-30 14:26:42 -070032 explicit
Yingdi Yu0b0a7362014-08-05 16:31:30 -070033 AddContactPanel(QWidget* parent = 0);
Yingdi Yu348f5ea2014-03-01 14:47:25 -080034
35 ~AddContactPanel();
36
37public slots:
38 void
Yingdi Yu0b0a7362014-08-05 16:31:30 -070039 onContactEndorseInfoReady(const Chronos::EndorseInfo& endorseInfo);
Yingdi Yu348f5ea2014-03-01 14:47:25 -080040
41private slots:
42 void
43 onCancelClicked();
Yingdi Yufa0b6a02014-04-30 14:26:42 -070044
Yingdi Yu348f5ea2014-03-01 14:47:25 -080045 void
46 onSearchClicked();
47
48 void
49 onAddClicked();
50
51signals:
52 void
53 fetchInfo(const QString& identity);
54
55 void
56 addContact(const QString& identity);
57
58private:
Yingdi Yu0b0a7362014-08-05 16:31:30 -070059 Ui::AddContactPanel* ui;
Yingdi Yu348f5ea2014-03-01 14:47:25 -080060 QString m_searchIdentity;
61
62 QTableWidgetItem* m_typeHeader;
63 QTableWidgetItem* m_valueHeader;
64 QTableWidgetItem* m_endorseHeader;
65};
66
Yingdi Yu0b0a7362014-08-05 16:31:30 -070067} // namespace chronos
68
69#endif // CHRONOS_ADD_CONTACT_PANEL_HPP