blob: 5b6ad11eff97245846ce45b2e70f3ce853260cbd [file] [log] [blame]
Yingdi Yu348f5ea2014-03-01 14:47:25 -08001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
2/*
Varun Patila24bd3e2020-11-24 10:08:33 +05303 * Copyright (c) 2020, Regents of the University of California
Yingdi Yu348f5ea2014-03-01 14:47:25 -08004 * 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
Yingdi Yu348f5ea2014-03-01 14:47:25 -080016namespace Ui {
17class SettingDialog;
Varun Patila24bd3e2020-11-24 10:08:33 +053018} // namespace Ui
Yingdi Yu348f5ea2014-03-01 14:47:25 -080019
Yingdi Yueb692ac2015-02-10 18:46:18 -080020namespace chronochat {
Yingdi Yu0b0a7362014-08-05 16:31:30 -070021
Yingdi Yu348f5ea2014-03-01 14:47:25 -080022class SettingDialog : public QDialog
23{
24 Q_OBJECT
25
26public:
Yingdi Yufa0b6a02014-04-30 14:26:42 -070027 explicit
Yingdi Yu0b0a7362014-08-05 16:31:30 -070028 SettingDialog(QWidget* parent = 0);
Yingdi Yu348f5ea2014-03-01 14:47:25 -080029
30 ~SettingDialog();
31
32 void
33 setNick(const QString& nick);
34
35signals:
36 void
37 identityUpdated(const QString& identity);
38
39 void
40 nickUpdated(const QString& nick);
41
Yingdi Yubaaaec02014-09-02 22:05:32 -070042 void
43 prefixUpdated(const QString& prefix);
44
Yingdi Yu348f5ea2014-03-01 14:47:25 -080045public slots:
46 void
47 onIdentityUpdated(const QString& identity);
48
Yingdi Yubaaaec02014-09-02 22:05:32 -070049 void
50 onLocalPrefixUpdated(const QString& prefix);
51
Yingdi Yu348f5ea2014-03-01 14:47:25 -080052private slots:
53 void
54 onSaveClicked();
55
56 void
57 onCancelClicked();
58
59private:
Yingdi Yu0b0a7362014-08-05 16:31:30 -070060 Ui::SettingDialog* ui;
Yingdi Yu348f5ea2014-03-01 14:47:25 -080061 QString m_identity;
62 QString m_nick;
Yingdi Yubaaaec02014-09-02 22:05:32 -070063 QString m_prefix;
Yingdi Yu348f5ea2014-03-01 14:47:25 -080064};
65
Yingdi Yueb692ac2015-02-10 18:46:18 -080066} // namespace chronochat
Yingdi Yu0b0a7362014-08-05 16:31:30 -070067
Yingdi Yueb692ac2015-02-10 18:46:18 -080068#endif // CHRONOCHAT_SETTING_DIALOG_HPP