Yingdi Yu | 0a6b6c5 | 2013-10-15 17:54:00 -0700 | [diff] [blame] | 1 | /* -*- 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 Yu | aa8d769 | 2013-10-18 17:05:02 -0700 | [diff] [blame] | 18 | #include "contact-manager.h" |
Yingdi Yu | 0a6b6c5 | 2013-10-15 17:54:00 -0700 | [diff] [blame] | 19 | #endif |
| 20 | |
| 21 | namespace Ui { |
| 22 | class ProfileEditor; |
| 23 | } |
| 24 | |
| 25 | class ProfileEditor : public QDialog |
| 26 | { |
| 27 | Q_OBJECT |
| 28 | |
| 29 | public: |
Yingdi Yu | aa8d769 | 2013-10-18 17:05:02 -0700 | [diff] [blame] | 30 | explicit ProfileEditor(ndn::Ptr<ContactManager> contactManager, |
Yingdi Yu | c26af3c | 2013-10-17 17:03:46 -0700 | [diff] [blame] | 31 | QWidget *parent = 0); |
Yingdi Yu | 0a6b6c5 | 2013-10-15 17:54:00 -0700 | [diff] [blame] | 32 | |
| 33 | ~ProfileEditor(); |
Yingdi Yu | b35b865 | 2013-11-07 11:32:40 -0800 | [diff] [blame^] | 34 | |
| 35 | inline void |
| 36 | setCurrentIdentity(const ndn::Name& name) |
| 37 | { m_currentIdentity = name; } |
Yingdi Yu | 0a6b6c5 | 2013-10-15 17:54:00 -0700 | [diff] [blame] | 38 | |
| 39 | private slots: |
| 40 | void |
| 41 | onAddClicked(); |
| 42 | |
| 43 | void |
| 44 | onDeleteClicked(); |
| 45 | |
| 46 | void |
| 47 | onOkClicked(); |
| 48 | |
Yingdi Yu | c26af3c | 2013-10-17 17:03:46 -0700 | [diff] [blame] | 49 | void |
| 50 | onGetClicked(); |
| 51 | |
Yingdi Yu | 0a6b6c5 | 2013-10-15 17:54:00 -0700 | [diff] [blame] | 52 | |
| 53 | private: |
| 54 | Ui::ProfileEditor *ui; |
| 55 | QSqlTableModel* m_tableModel; |
Yingdi Yu | aa8d769 | 2013-10-18 17:05:02 -0700 | [diff] [blame] | 56 | ndn::Ptr<ContactManager> m_contactManager; |
Yingdi Yu | c26af3c | 2013-10-17 17:03:46 -0700 | [diff] [blame] | 57 | ndn::Name m_currentIdentity; |
Yingdi Yu | 0a6b6c5 | 2013-10-15 17:54:00 -0700 | [diff] [blame] | 58 | }; |
| 59 | |
| 60 | #endif // PROFILEEDITOR_H |