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