blob: 5ee8ce77d818c779de82bb4376ae000e0a050ed3 [file] [log] [blame]
Yingdi Yu9e0dc292013-10-10 11:39:45 -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 Yudef90612013-10-09 22:34:42 -070011#ifndef CONTACTPANEL_H
12#define CONTACTPANEL_H
13
14#include <QDialog>
Yingdi Yu01a942b2013-10-10 15:00:58 -070015#include <QStringListModel>
Yingdi Yu0a6b6c52013-10-15 17:54:00 -070016#include <QtSql/QSqlDatabase>
17
18#include "profileeditor.h"
19
20#ifndef Q_MOC_RUN
21#include "contact-storage.h"
22#endif
Yingdi Yudef90612013-10-09 22:34:42 -070023
24namespace Ui {
25class ContactPanel;
26}
27
28class ContactPanel : public QDialog
29{
30 Q_OBJECT
31
32public:
Yingdi Yu0a6b6c52013-10-15 17:54:00 -070033 explicit ContactPanel(ndn::Ptr<ContactStorage> contactStorage, QWidget *parent = 0);
34 ~ContactPanel();
Yingdi Yudef90612013-10-09 22:34:42 -070035
Yingdi Yu01a942b2013-10-10 15:00:58 -070036private slots:
37 void
38 updateSelection(const QItemSelection &selected,
39 const QItemSelection &deselected);
40
Yingdi Yu0a6b6c52013-10-15 17:54:00 -070041 void
42 openProfileEditor();
43
Yingdi Yudef90612013-10-09 22:34:42 -070044private:
Yingdi Yu0a6b6c52013-10-15 17:54:00 -070045 Ui::ContactPanel *ui;
46 ndn::Ptr<ContactStorage> m_contactStorage;
47 QStringListModel* m_contactListModel;
48 ProfileEditor* m_profileEditor;
Yingdi Yudef90612013-10-09 22:34:42 -070049};
50
51#endif // CONTACTPANEL_H