Yingdi Yu | 348f5ea | 2014-03-01 14:47:25 -0800 | [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 | |||||
Yingdi Yu | eb692ac | 2015-02-10 18:46:18 -0800 | [diff] [blame] | 11 | #ifndef CHRONOCHAT_PROFILE_EDITOR_HPP |
12 | #define CHRONOCHAT_PROFILE_EDITOR_HPP | ||||
Yingdi Yu | 348f5ea | 2014-03-01 14:47:25 -0800 | [diff] [blame] | 13 | |
14 | #include <QDialog> | ||||
15 | #include <QtSql/QSqlTableModel> | ||||
16 | |||||
17 | #ifndef Q_MOC_RUN | ||||
18 | #endif | ||||
19 | |||||
20 | namespace Ui { | ||||
21 | class ProfileEditor; | ||||
22 | } | ||||
23 | |||||
Yingdi Yu | eb692ac | 2015-02-10 18:46:18 -0800 | [diff] [blame] | 24 | namespace chronochat { |
Yingdi Yu | 0b0a736 | 2014-08-05 16:31:30 -0700 | [diff] [blame] | 25 | |
Yingdi Yu | 348f5ea | 2014-03-01 14:47:25 -0800 | [diff] [blame] | 26 | class ProfileEditor : public QDialog |
27 | { | ||||
28 | Q_OBJECT | ||||
29 | |||||
30 | public: | ||||
Yingdi Yu | 0b0a736 | 2014-08-05 16:31:30 -0700 | [diff] [blame] | 31 | explicit ProfileEditor(QWidget* parent = 0); |
Yingdi Yu | fa0b6a0 | 2014-04-30 14:26:42 -0700 | [diff] [blame] | 32 | |
Yingdi Yu | 348f5ea | 2014-03-01 14:47:25 -0800 | [diff] [blame] | 33 | ~ProfileEditor(); |
34 | |||||
35 | public slots: | ||||
36 | void | ||||
37 | onCloseDBModule(); | ||||
38 | |||||
39 | void | ||||
40 | onIdentityUpdated(const QString& identity); | ||||
Yingdi Yu | fa0b6a0 | 2014-04-30 14:26:42 -0700 | [diff] [blame] | 41 | |
Varun Patil | 3d85090 | 2020-11-23 12:19:14 +0530 | [diff] [blame^] | 42 | void |
43 | resetPanel(); | ||||
44 | |||||
Yingdi Yu | 348f5ea | 2014-03-01 14:47:25 -0800 | [diff] [blame] | 45 | private slots: |
46 | void | ||||
47 | onAddClicked(); | ||||
48 | |||||
49 | void | ||||
50 | onDeleteClicked(); | ||||
51 | |||||
52 | void | ||||
53 | onOkClicked(); | ||||
54 | |||||
55 | signals: | ||||
56 | void | ||||
57 | updateProfile(); | ||||
58 | |||||
59 | private: | ||||
Yingdi Yu | 0b0a736 | 2014-08-05 16:31:30 -0700 | [diff] [blame] | 60 | Ui::ProfileEditor* ui; |
Yingdi Yu | 348f5ea | 2014-03-01 14:47:25 -0800 | [diff] [blame] | 61 | QSqlTableModel* m_tableModel; |
62 | QString m_identity; | ||||
63 | }; | ||||
64 | |||||
Yingdi Yu | eb692ac | 2015-02-10 18:46:18 -0800 | [diff] [blame] | 65 | } // namespace chronochat |
Yingdi Yu | 0b0a736 | 2014-08-05 16:31:30 -0700 | [diff] [blame] | 66 | |
Yingdi Yu | eb692ac | 2015-02-10 18:46:18 -0800 | [diff] [blame] | 67 | #endif // CHRONOCHAT_PROFILE_EDITOR_HPP |