Yingdi Yu | 847aa86 | 2013-10-09 16:35:53 -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 CONTACTPANEL_H |
| 12 | #define CONTACTPANEL_H |
| 13 | |
| 14 | #include <QDialog> |
Yingdi Yu | 40eca75 | 2013-10-10 15:00:58 -0700 | [diff] [blame] | 15 | #include <QStringListModel> |
Yingdi Yu | 3b318c1 | 2013-10-15 17:54:00 -0700 | [diff] [blame^] | 16 | #include <QtSql/QSqlDatabase> |
| 17 | |
| 18 | #include "profileeditor.h" |
| 19 | |
| 20 | #ifndef Q_MOC_RUN |
| 21 | #include "contact-storage.h" |
| 22 | #endif |
Yingdi Yu | 847aa86 | 2013-10-09 16:35:53 -0700 | [diff] [blame] | 23 | |
| 24 | namespace Ui { |
| 25 | class ContactPanel; |
| 26 | } |
| 27 | |
| 28 | class ContactPanel : public QDialog |
| 29 | { |
| 30 | Q_OBJECT |
| 31 | |
| 32 | public: |
Yingdi Yu | 3b318c1 | 2013-10-15 17:54:00 -0700 | [diff] [blame^] | 33 | explicit ContactPanel(ndn::Ptr<ContactStorage> contactStorage, QWidget *parent = 0); |
| 34 | ~ContactPanel(); |
Yingdi Yu | 847aa86 | 2013-10-09 16:35:53 -0700 | [diff] [blame] | 35 | |
Yingdi Yu | 40eca75 | 2013-10-10 15:00:58 -0700 | [diff] [blame] | 36 | private slots: |
| 37 | void |
| 38 | updateSelection(const QItemSelection &selected, |
| 39 | const QItemSelection &deselected); |
| 40 | |
Yingdi Yu | 3b318c1 | 2013-10-15 17:54:00 -0700 | [diff] [blame^] | 41 | void |
| 42 | openProfileEditor(); |
| 43 | |
Yingdi Yu | 847aa86 | 2013-10-09 16:35:53 -0700 | [diff] [blame] | 44 | private: |
Yingdi Yu | 3b318c1 | 2013-10-15 17:54:00 -0700 | [diff] [blame^] | 45 | Ui::ContactPanel *ui; |
| 46 | ndn::Ptr<ContactStorage> m_contactStorage; |
| 47 | QStringListModel* m_contactListModel; |
| 48 | ProfileEditor* m_profileEditor; |
Yingdi Yu | 847aa86 | 2013-10-09 16:35:53 -0700 | [diff] [blame] | 49 | }; |
| 50 | |
| 51 | #endif // CONTACTPANEL_H |