blob: 34eb2e9a680dff9955d98521a4abce941bb2916f [file] [log] [blame]
Yingdi Yud59b5932013-10-16 13:16:49 -07001/* -*- 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 Yua4898752013-10-15 20:31:37 -070011#include "addcontactpanel.h"
12#include "ui_addcontactpanel.h"
13
Yingdi Yuaa8d7692013-10-18 17:05:02 -070014using namespace ndn;
15using namespace std;
16
17AddContactPanel::AddContactPanel(Ptr<ContactManager> contactManager,
Yingdi Yu0b82a4e2013-10-18 11:29:25 -070018 QWidget *parent)
Yingdi Yud59b5932013-10-16 13:16:49 -070019 : QDialog(parent)
20 , ui(new Ui::AddContactPanel)
Yingdi Yu0b82a4e2013-10-18 11:29:25 -070021 , m_contactManager(contactManager)
Yingdi Yua4898752013-10-15 20:31:37 -070022{
Yingdi Yud59b5932013-10-16 13:16:49 -070023 ui->setupUi(this);
24
25 connect(ui->cancelButton, SIGNAL(clicked()),
26 this, SLOT(onCancelClicked()));
27 connect(ui->searchButton, SIGNAL(clicked()),
28 this, SLOT(onSearchClicked()));
Yingdi Yuaa8d7692013-10-18 17:05:02 -070029 connect(&*m_contactManager, SIGNAL(contactFetched(Ptr<EndorseCertificate>)),
30 this, SLOT(selfEndorseCertificateFetched(Ptr<EndorseCertificate>)));
Yingdi Yua4898752013-10-15 20:31:37 -070031}
32
33AddContactPanel::~AddContactPanel()
34{
35 delete ui;
36}
Yingdi Yud59b5932013-10-16 13:16:49 -070037
38void
39AddContactPanel::onCancelClicked()
40{ this->close(); }
41
42void
43AddContactPanel::onSearchClicked()
44{
Yingdi Yuaa8d7692013-10-18 17:05:02 -070045 QString inputIdentity = ui->contactInput->text();
46 m_searchIdentity = Name(inputIdentity.toUtf8().constData());
Yingdi Yud59b5932013-10-16 13:16:49 -070047}
48
49void
50AddContactPanel::onAddClicked()
51{
52}
53
Yingdi Yuaa8d7692013-10-18 17:05:02 -070054void
55AddContactPanel::selfEndorseCertificateFetched(Ptr<EndorseCertificate> endorseCertificate)
56{
57}
58
Yingdi Yud59b5932013-10-16 13:16:49 -070059#if WAF
60#include "addcontactpanel.moc"
61#include "addcontactpanel.cpp.moc"
62#endif