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(); |
| 34 | |
| 35 | private slots: |
| 36 | void |
| 37 | onAddClicked(); |
| 38 | |
| 39 | void |
| 40 | onDeleteClicked(); |
| 41 | |
| 42 | void |
| 43 | onOkClicked(); |
| 44 | |
Yingdi Yu | c26af3c | 2013-10-17 17:03:46 -0700 | [diff] [blame] | 45 | void |
| 46 | onGetClicked(); |
| 47 | |
Yingdi Yu | 0a6b6c5 | 2013-10-15 17:54:00 -0700 | [diff] [blame] | 48 | |
| 49 | private: |
| 50 | Ui::ProfileEditor *ui; |
| 51 | QSqlTableModel* m_tableModel; |
Yingdi Yu | aa8d769 | 2013-10-18 17:05:02 -0700 | [diff] [blame^] | 52 | ndn::Ptr<ContactManager> m_contactManager; |
Yingdi Yu | c26af3c | 2013-10-17 17:03:46 -0700 | [diff] [blame] | 53 | ndn::Name m_defaultIdentity; |
| 54 | ndn::Name m_currentIdentity; |
Yingdi Yu | 0a6b6c5 | 2013-10-15 17:54:00 -0700 | [diff] [blame] | 55 | }; |
| 56 | |
| 57 | #endif // PROFILEEDITOR_H |