blob: 92ceaeba4c4a843e5c9d4682f49ad90e4c8de9d0 [file] [log] [blame]
Yingdi Yu0a6b6c52013-10-15 17:54:00 -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
11#ifndef PROFILEEDITOR_H
12#define PROFILEEDITOR_H
13
14#include <QDialog>
15#include <QtSql/QSqlTableModel>
16
17#ifndef Q_MOC_RUN
Yingdi Yuaa8d7692013-10-18 17:05:02 -070018#include "contact-manager.h"
Yingdi Yu0a6b6c52013-10-15 17:54:00 -070019#endif
20
21namespace Ui {
22class ProfileEditor;
23}
24
25class ProfileEditor : public QDialog
26{
27 Q_OBJECT
28
29public:
Yingdi Yuaa8d7692013-10-18 17:05:02 -070030 explicit ProfileEditor(ndn::Ptr<ContactManager> contactManager,
Yingdi Yuc26af3c2013-10-17 17:03:46 -070031 QWidget *parent = 0);
Yingdi Yu0a6b6c52013-10-15 17:54:00 -070032
33 ~ProfileEditor();
Yingdi Yub35b8652013-11-07 11:32:40 -080034
35 inline void
36 setCurrentIdentity(const ndn::Name& name)
37 { m_currentIdentity = name; }
Yingdi Yu0a6b6c52013-10-15 17:54:00 -070038
39private slots:
40 void
41 onAddClicked();
42
43 void
44 onDeleteClicked();
45
46 void
47 onOkClicked();
48
Yingdi Yuc26af3c2013-10-17 17:03:46 -070049 void
50 onGetClicked();
51
Yingdi Yu0a6b6c52013-10-15 17:54:00 -070052
53private:
54 Ui::ProfileEditor *ui;
55 QSqlTableModel* m_tableModel;
Yingdi Yuaa8d7692013-10-18 17:05:02 -070056 ndn::Ptr<ContactManager> m_contactManager;
Yingdi Yuc26af3c2013-10-17 17:03:46 -070057 ndn::Name m_currentIdentity;
Yingdi Yu0a6b6c52013-10-15 17:54:00 -070058};
59
60#endif // PROFILEEDITOR_H