blob: 1dc5f5eb67b7c66f88593a9bb6501363a07b6a42 [file] [log] [blame]
Yingdi Yu348f5ea2014-03-01 14:47:25 -08001/* -*- 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 Yu0b0a7362014-08-05 16:31:30 -070011#ifndef CHRONOS_PROFILE_EDITOR_HPP
12#define CHRONOS_PROFILE_EDITOR_HPP
Yingdi Yu348f5ea2014-03-01 14:47:25 -080013
14#include <QDialog>
15#include <QtSql/QSqlTableModel>
16
17#ifndef Q_MOC_RUN
18#endif
19
20namespace Ui {
21class ProfileEditor;
22}
23
Yingdi Yu0b0a7362014-08-05 16:31:30 -070024namespace chronos {
25
Yingdi Yu348f5ea2014-03-01 14:47:25 -080026class ProfileEditor : public QDialog
27{
28 Q_OBJECT
29
30public:
Yingdi Yu0b0a7362014-08-05 16:31:30 -070031 explicit ProfileEditor(QWidget* parent = 0);
Yingdi Yufa0b6a02014-04-30 14:26:42 -070032
Yingdi Yu348f5ea2014-03-01 14:47:25 -080033 ~ProfileEditor();
34
35public slots:
36 void
37 onCloseDBModule();
38
39 void
40 onIdentityUpdated(const QString& identity);
Yingdi Yufa0b6a02014-04-30 14:26:42 -070041
Yingdi Yu348f5ea2014-03-01 14:47:25 -080042private slots:
43 void
44 onAddClicked();
45
46 void
47 onDeleteClicked();
48
49 void
50 onOkClicked();
51
52signals:
53 void
54 updateProfile();
55
56private:
Yingdi Yu0b0a7362014-08-05 16:31:30 -070057 Ui::ProfileEditor* ui;
Yingdi Yu348f5ea2014-03-01 14:47:25 -080058 QSqlTableModel* m_tableModel;
59 QString m_identity;
60};
61
Yingdi Yu0b0a7362014-08-05 16:31:30 -070062} // namespace chronos
63
64#endif // CHRONOS_PROFILE_EDITOR_HPP