blob: 01d5f574f1168bcf97400e254a79efb4c4a09ae9 [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_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
Yingdi Yu348f5ea2014-03-01 14:47:25 -080017namespace Ui {
18class ProfileEditor;
Varun Patila24bd3e2020-11-24 10:08:33 +053019} // namespace Ui
Yingdi Yu348f5ea2014-03-01 14:47:25 -080020
Yingdi Yueb692ac2015-02-10 18:46:18 -080021namespace chronochat {
Yingdi Yu0b0a7362014-08-05 16:31:30 -070022
Yingdi Yu348f5ea2014-03-01 14:47:25 -080023class ProfileEditor : public QDialog
24{
25 Q_OBJECT
26
27public:
Yingdi Yu0b0a7362014-08-05 16:31:30 -070028 explicit ProfileEditor(QWidget* parent = 0);
Yingdi Yufa0b6a02014-04-30 14:26:42 -070029
Yingdi Yu348f5ea2014-03-01 14:47:25 -080030 ~ProfileEditor();
31
32public slots:
33 void
34 onCloseDBModule();
35
36 void
37 onIdentityUpdated(const QString& identity);
Yingdi Yufa0b6a02014-04-30 14:26:42 -070038
Varun Patil3d850902020-11-23 12:19:14 +053039 void
40 resetPanel();
41
Yingdi Yu348f5ea2014-03-01 14:47:25 -080042private slots:
43 void
44 onAddClicked();
45
46 void
47 onDeleteClicked();
48
49 void
50 onOkClicked();
51
52signals:
53 void
54 updateProfile();
55
56private:
Yingdi Yu0b0a7362014-08-05 16:31:30 -070057 Ui::ProfileEditor* ui;
Varun Patila24bd3e2020-11-24 10:08:33 +053058 QSqlTableModel* m_tableModel = 0;
Yingdi Yu348f5ea2014-03-01 14:47:25 -080059 QString m_identity;
60};
61
Yingdi Yueb692ac2015-02-10 18:46:18 -080062} // namespace chronochat
Yingdi Yu0b0a7362014-08-05 16:31:30 -070063
Yingdi Yueb692ac2015-02-10 18:46:18 -080064#endif // CHRONOCHAT_PROFILE_EDITOR_HPP