blob: 0c73fa792a950eea48c1e6d3cbdbdb1879c4888c [file] [log] [blame]
Yingdi Yu348f5ea2014-03-01 14:47:25 -08001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
2/*
Varun Patila24bd3e2020-11-24 10:08:33 +05303 * Copyright (c) 2020, Regents of the University of California
Yingdi Yu348f5ea2014-03-01 14:47:25 -08004 * 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 Yueb692ac2015-02-10 18:46:18 -080011#ifndef CHRONOCHAT_ADD_CONTACT_PANEL_HPP
12#define CHRONOCHAT_ADD_CONTACT_PANEL_HPP
Yingdi Yu348f5ea2014-03-01 14:47:25 -080013
14#include <QDialog>
15#include <QTableWidgetItem>
16
17#ifndef Q_MOC_RUN
Qiuhan Ding0cfc1512015-02-17 17:44:11 -080018#include "endorse-info.hpp"
Yingdi Yu348f5ea2014-03-01 14:47:25 -080019#endif
20
21namespace Ui {
22class AddContactPanel;
Varun Patila24bd3e2020-11-24 10:08:33 +053023} // namespace Ui
Yingdi Yu348f5ea2014-03-01 14:47:25 -080024
Yingdi Yueb692ac2015-02-10 18:46:18 -080025namespace chronochat {
Yingdi Yu0b0a7362014-08-05 16:31:30 -070026
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
Qiuhan Ding0cfc1512015-02-17 17:44:11 -080039 onContactEndorseInfoReady(const 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 Yueb692ac2015-02-10 18:46:18 -080067} // namespace chronochat
Yingdi Yu0b0a7362014-08-05 16:31:30 -070068
Yingdi Yueb692ac2015-02-10 18:46:18 -080069#endif // CHRONOCHAT_ADD_CONTACT_PANEL_HPP