Zhenkai Zhu | 275ba3a | 2012-06-01 23:10:43 -0700 | [diff] [blame] | 1 | #include "settingdialog.h" |
| 2 | |
| 3 | SettingDialog::SettingDialog(QWidget *parent, QString nick, QString chatroom, QString prefix) |
| 4 | : QDialog(parent) |
| 5 | { |
| 6 | setupUi(this); |
| 7 | nickEdit->setPlaceholderText(nick); |
| 8 | roomEdit->setPlaceholderText(chatroom); |
| 9 | prefixEdit->setPlaceholderText(prefix); |
| 10 | connect(cancelButton, SIGNAL(clicked()), this, SLOT(reject())); |
Zhenkai Zhu | 3472e3f | 2012-06-02 00:44:42 -0700 | [diff] [blame^] | 11 | connect(okButton, SIGNAL(clicked()), this, SLOT(update())); |
| 12 | } |
| 13 | |
| 14 | void |
| 15 | SettingDialog::update() |
| 16 | { |
| 17 | emit updated(nickEdit->text(), roomEdit->text(), prefixEdit->text()); |
| 18 | accept(); |
Zhenkai Zhu | 275ba3a | 2012-06-01 23:10:43 -0700 | [diff] [blame] | 19 | } |