blob: a8cef6c655e884e237390b9fa45d56f84ae25640 [file] [log] [blame]
Yingdi Yu348f5ea2014-03-01 14:47:25 -08001/* -*- 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 Yueb692ac2015-02-10 18:46:18 -080011#ifndef CHRONOCHAT_SETTING_DIALOG_HPP
12#define CHRONOCHAT_SETTING_DIALOG_HPP
Yingdi Yu348f5ea2014-03-01 14:47:25 -080013
14#include <QDialog>
15
16#ifndef Q_MOC_RUN
17#endif
18
19namespace Ui {
20class SettingDialog;
21}
22
Yingdi Yueb692ac2015-02-10 18:46:18 -080023namespace chronochat {
Yingdi Yu0b0a7362014-08-05 16:31:30 -070024
Yingdi Yu348f5ea2014-03-01 14:47:25 -080025class SettingDialog : public QDialog
26{
27 Q_OBJECT
28
29public:
Yingdi Yufa0b6a02014-04-30 14:26:42 -070030 explicit
Yingdi Yu0b0a7362014-08-05 16:31:30 -070031 SettingDialog(QWidget* parent = 0);
Yingdi Yu348f5ea2014-03-01 14:47:25 -080032
33 ~SettingDialog();
34
35 void
36 setNick(const QString& nick);
37
38signals:
39 void
40 identityUpdated(const QString& identity);
41
42 void
43 nickUpdated(const QString& nick);
44
Yingdi Yubaaaec02014-09-02 22:05:32 -070045 void
46 prefixUpdated(const QString& prefix);
47
Yingdi Yu348f5ea2014-03-01 14:47:25 -080048public slots:
49 void
50 onIdentityUpdated(const QString& identity);
51
Yingdi Yubaaaec02014-09-02 22:05:32 -070052 void
53 onLocalPrefixUpdated(const QString& prefix);
54
Yingdi Yu348f5ea2014-03-01 14:47:25 -080055private slots:
56 void
57 onSaveClicked();
58
59 void
60 onCancelClicked();
61
62private:
Yingdi Yu0b0a7362014-08-05 16:31:30 -070063 Ui::SettingDialog* ui;
Yingdi Yu348f5ea2014-03-01 14:47:25 -080064 QString m_identity;
65 QString m_nick;
Yingdi Yubaaaec02014-09-02 22:05:32 -070066 QString m_prefix;
Yingdi Yu348f5ea2014-03-01 14:47:25 -080067};
68
Yingdi Yueb692ac2015-02-10 18:46:18 -080069} // namespace chronochat
Yingdi Yu0b0a7362014-08-05 16:31:30 -070070
Yingdi Yueb692ac2015-02-10 18:46:18 -080071#endif // CHRONOCHAT_SETTING_DIALOG_HPP