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 | |
| 11 | #ifndef SETTING_DIALOG_H |
| 12 | #define SETTING_DIALOG_H |
| 13 | |
| 14 | #include <QDialog> |
| 15 | |
| 16 | #ifndef Q_MOC_RUN |
| 17 | #endif |
| 18 | |
| 19 | namespace Ui { |
| 20 | class SettingDialog; |
| 21 | } |
| 22 | |
| 23 | class SettingDialog : public QDialog |
| 24 | { |
| 25 | Q_OBJECT |
| 26 | |
| 27 | public: |
Yingdi Yu | fa0b6a0 | 2014-04-30 14:26:42 -0700 | [diff] [blame^] | 28 | explicit |
Yingdi Yu | 348f5ea | 2014-03-01 14:47:25 -0800 | [diff] [blame] | 29 | SettingDialog(QWidget *parent = 0); |
| 30 | |
| 31 | ~SettingDialog(); |
| 32 | |
| 33 | void |
| 34 | setNick(const QString& nick); |
| 35 | |
| 36 | signals: |
| 37 | void |
| 38 | identityUpdated(const QString& identity); |
| 39 | |
| 40 | void |
| 41 | nickUpdated(const QString& nick); |
| 42 | |
| 43 | public slots: |
| 44 | void |
| 45 | onIdentityUpdated(const QString& identity); |
| 46 | |
| 47 | private slots: |
| 48 | void |
| 49 | onSaveClicked(); |
| 50 | |
| 51 | void |
| 52 | onCancelClicked(); |
| 53 | |
| 54 | private: |
| 55 | Ui::SettingDialog *ui; |
| 56 | QString m_identity; |
| 57 | QString m_nick; |
| 58 | }; |
| 59 | |
| 60 | #endif // SETTING_DIALOG_H |