blob: a18f8fc073940fc09e4566cf49fd6412199b45be [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_PROFILE_EDITOR_HPP
12#define CHRONOCHAT_PROFILE_EDITOR_HPP
Yingdi Yu348f5ea2014-03-01 14:47:25 -080013
14#include <QDialog>
15#include <QtSql/QSqlTableModel>
16
17#ifndef Q_MOC_RUN
18#endif
19
20namespace Ui {
21class ProfileEditor;
22}
23
Yingdi Yueb692ac2015-02-10 18:46:18 -080024namespace chronochat {
Yingdi Yu0b0a7362014-08-05 16:31:30 -070025
Yingdi Yu348f5ea2014-03-01 14:47:25 -080026class ProfileEditor : public QDialog
27{
28 Q_OBJECT
29
30public:
Yingdi Yu0b0a7362014-08-05 16:31:30 -070031 explicit ProfileEditor(QWidget* parent = 0);
Yingdi Yufa0b6a02014-04-30 14:26:42 -070032
Yingdi Yu348f5ea2014-03-01 14:47:25 -080033 ~ProfileEditor();
34
35public slots:
36 void
37 onCloseDBModule();
38
39 void
40 onIdentityUpdated(const QString& identity);
Yingdi Yufa0b6a02014-04-30 14:26:42 -070041
Varun Patil3d850902020-11-23 12:19:14 +053042 void
43 resetPanel();
44
Yingdi Yu348f5ea2014-03-01 14:47:25 -080045private slots:
46 void
47 onAddClicked();
48
49 void
50 onDeleteClicked();
51
52 void
53 onOkClicked();
54
55signals:
56 void
57 updateProfile();
58
59private:
Yingdi Yu0b0a7362014-08-05 16:31:30 -070060 Ui::ProfileEditor* ui;
Yingdi Yu348f5ea2014-03-01 14:47:25 -080061 QSqlTableModel* m_tableModel;
62 QString m_identity;
63};
64
Yingdi Yueb692ac2015-02-10 18:46:18 -080065} // namespace chronochat
Yingdi Yu0b0a7362014-08-05 16:31:30 -070066
Yingdi Yueb692ac2015-02-10 18:46:18 -080067#endif // CHRONOCHAT_PROFILE_EDITOR_HPP