blob: 5ee8ce77d818c779de82bb4376ae000e0a050ed3 [file] [log] [blame]
Yingdi Yu847aa862013-10-09 16:35:53 -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 CONTACTPANEL_H
12#define CONTACTPANEL_H
13
14#include <QDialog>
Yingdi Yu40eca752013-10-10 15:00:58 -070015#include <QStringListModel>
Yingdi Yu3b318c12013-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 Yu847aa862013-10-09 16:35:53 -070023
24namespace Ui {
25class ContactPanel;
26}
27
28class ContactPanel : public QDialog
29{
30 Q_OBJECT
31
32public:
Yingdi Yu3b318c12013-10-15 17:54:00 -070033 explicit ContactPanel(ndn::Ptr<ContactStorage> contactStorage, QWidget *parent = 0);
34 ~ContactPanel();
Yingdi Yu847aa862013-10-09 16:35:53 -070035
Yingdi Yu40eca752013-10-10 15:00:58 -070036private slots:
37 void
38 updateSelection(const QItemSelection &selected,
39 const QItemSelection &deselected);
40
Yingdi Yu3b318c12013-10-15 17:54:00 -070041 void
42 openProfileEditor();
43
Yingdi Yu847aa862013-10-09 16:35:53 -070044private:
Yingdi Yu3b318c12013-10-15 17:54:00 -070045 Ui::ContactPanel *ui;
46 ndn::Ptr<ContactStorage> m_contactStorage;
47 QStringListModel* m_contactListModel;
48 ProfileEditor* m_profileEditor;
Yingdi Yu847aa862013-10-09 16:35:53 -070049};
50
51#endif // CONTACTPANEL_H