Yingdi Yu | 348f5ea | 2014-03-01 14:47:25 -0800 | [diff] [blame] | 1 | /* -*- 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 | |
| 11 | #ifndef PROFILE_EDITOR_H |
| 12 | #define PROFILE_EDITOR_H |
| 13 | |
| 14 | #include <QDialog> |
| 15 | #include <QtSql/QSqlTableModel> |
| 16 | |
| 17 | #ifndef Q_MOC_RUN |
| 18 | #endif |
| 19 | |
| 20 | namespace Ui { |
| 21 | class ProfileEditor; |
| 22 | } |
| 23 | |
| 24 | class ProfileEditor : public QDialog |
| 25 | { |
| 26 | Q_OBJECT |
| 27 | |
| 28 | public: |
| 29 | explicit ProfileEditor(QWidget *parent = 0); |
Yingdi Yu | fa0b6a0 | 2014-04-30 14:26:42 -0700 | [diff] [blame^] | 30 | |
Yingdi Yu | 348f5ea | 2014-03-01 14:47:25 -0800 | [diff] [blame] | 31 | ~ProfileEditor(); |
| 32 | |
| 33 | public slots: |
| 34 | void |
| 35 | onCloseDBModule(); |
| 36 | |
| 37 | void |
| 38 | onIdentityUpdated(const QString& identity); |
Yingdi Yu | fa0b6a0 | 2014-04-30 14:26:42 -0700 | [diff] [blame^] | 39 | |
Yingdi Yu | 348f5ea | 2014-03-01 14:47:25 -0800 | [diff] [blame] | 40 | private slots: |
| 41 | void |
| 42 | onAddClicked(); |
| 43 | |
| 44 | void |
| 45 | onDeleteClicked(); |
| 46 | |
| 47 | void |
| 48 | onOkClicked(); |
| 49 | |
| 50 | signals: |
| 51 | void |
| 52 | updateProfile(); |
| 53 | |
| 54 | private: |
| 55 | Ui::ProfileEditor *ui; |
| 56 | QSqlTableModel* m_tableModel; |
| 57 | QString m_identity; |
| 58 | }; |
| 59 | |
| 60 | #endif // PROFILE_EDITOR_H |