blob: 5b9955823e910e9725d883523dd4ead132d1aa3d [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
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
21namespace Ui {
22class AddContactPanel;
23}
24
25class AddContactPanel : public QDialog
26{
27 Q_OBJECT
28
29public:
Yingdi Yufa0b6a02014-04-30 14:26:42 -070030 explicit
Yingdi Yu348f5ea2014-03-01 14:47:25 -080031 AddContactPanel(QWidget *parent = 0);
32
33 ~AddContactPanel();
34
35public slots:
36 void
37 onContactEndorseInfoReady(const chronos::EndorseInfo& endorseInfo);
38
39private slots:
40 void
41 onCancelClicked();
Yingdi Yufa0b6a02014-04-30 14:26:42 -070042
Yingdi Yu348f5ea2014-03-01 14:47:25 -080043 void
44 onSearchClicked();
45
46 void
47 onAddClicked();
48
49signals:
50 void
51 fetchInfo(const QString& identity);
52
53 void
54 addContact(const QString& identity);
55
56private:
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