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_SETTING_DIALOG_HPP |
12 | #define CHRONOCHAT_SETTING_DIALOG_HPP | ||||
Yingdi Yu | 348f5ea | 2014-03-01 14:47:25 -0800 | [diff] [blame] | 13 | |
14 | #include <QDialog> | ||||
15 | |||||
16 | #ifndef Q_MOC_RUN | ||||
17 | #endif | ||||
18 | |||||
19 | namespace Ui { | ||||
20 | class SettingDialog; | ||||
21 | } | ||||
22 | |||||
Yingdi Yu | eb692ac | 2015-02-10 18:46:18 -0800 | [diff] [blame] | 23 | namespace chronochat { |
Yingdi Yu | 0b0a736 | 2014-08-05 16:31:30 -0700 | [diff] [blame] | 24 | |
Yingdi Yu | 348f5ea | 2014-03-01 14:47:25 -0800 | [diff] [blame] | 25 | class SettingDialog : public QDialog |
26 | { | ||||
27 | Q_OBJECT | ||||
28 | |||||
29 | public: | ||||
Yingdi Yu | fa0b6a0 | 2014-04-30 14:26:42 -0700 | [diff] [blame] | 30 | explicit |
Yingdi Yu | 0b0a736 | 2014-08-05 16:31:30 -0700 | [diff] [blame] | 31 | SettingDialog(QWidget* parent = 0); |
Yingdi Yu | 348f5ea | 2014-03-01 14:47:25 -0800 | [diff] [blame] | 32 | |
33 | ~SettingDialog(); | ||||
34 | |||||
35 | void | ||||
36 | setNick(const QString& nick); | ||||
37 | |||||
38 | signals: | ||||
39 | void | ||||
40 | identityUpdated(const QString& identity); | ||||
41 | |||||
42 | void | ||||
43 | nickUpdated(const QString& nick); | ||||
44 | |||||
Yingdi Yu | baaaec0 | 2014-09-02 22:05:32 -0700 | [diff] [blame] | 45 | void |
46 | prefixUpdated(const QString& prefix); | ||||
47 | |||||
Yingdi Yu | 348f5ea | 2014-03-01 14:47:25 -0800 | [diff] [blame] | 48 | public slots: |
49 | void | ||||
50 | onIdentityUpdated(const QString& identity); | ||||
51 | |||||
Yingdi Yu | baaaec0 | 2014-09-02 22:05:32 -0700 | [diff] [blame] | 52 | void |
53 | onLocalPrefixUpdated(const QString& prefix); | ||||
54 | |||||
Yingdi Yu | 348f5ea | 2014-03-01 14:47:25 -0800 | [diff] [blame] | 55 | private slots: |
56 | void | ||||
57 | onSaveClicked(); | ||||
58 | |||||
59 | void | ||||
60 | onCancelClicked(); | ||||
61 | |||||
62 | private: | ||||
Yingdi Yu | 0b0a736 | 2014-08-05 16:31:30 -0700 | [diff] [blame] | 63 | Ui::SettingDialog* ui; |
Yingdi Yu | 348f5ea | 2014-03-01 14:47:25 -0800 | [diff] [blame] | 64 | QString m_identity; |
65 | QString m_nick; | ||||
Yingdi Yu | baaaec0 | 2014-09-02 22:05:32 -0700 | [diff] [blame] | 66 | QString m_prefix; |
Yingdi Yu | 348f5ea | 2014-03-01 14:47:25 -0800 | [diff] [blame] | 67 | }; |
68 | |||||
Yingdi Yu | eb692ac | 2015-02-10 18:46:18 -0800 | [diff] [blame] | 69 | } // namespace chronochat |
Yingdi Yu | 0b0a736 | 2014-08-05 16:31:30 -0700 | [diff] [blame] | 70 | |
Yingdi Yu | eb692ac | 2015-02-10 18:46:18 -0800 | [diff] [blame] | 71 | #endif // CHRONOCHAT_SETTING_DIALOG_HPP |