Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 1 | /*************************************************************************** |
Anthony Léonard | 2fde81d | 2017-04-17 10:06:55 -0400 | [diff] [blame] | 2 | * Copyright (C) 2015-2017 by Savoir-faire Linux * |
Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 3 | * Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>* |
| 4 | * * |
| 5 | * This program is free software; you can redistribute it and/or modify * |
| 6 | * it under the terms of the GNU General Public License as published by * |
| 7 | * the Free Software Foundation; either version 3 of the License, or * |
| 8 | * (at your option) any later version. * |
| 9 | * * |
| 10 | * This program is distributed in the hope that it will be useful, * |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
| 13 | * GNU General Public License for more details. * |
| 14 | * * |
| 15 | * You should have received a copy of the GNU General Public License * |
| 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. * |
| 17 | **************************************************************************/ |
| 18 | |
Edric Milaret | 5f316da | 2015-09-28 11:57:42 -0400 | [diff] [blame] | 19 | #pragma once |
Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 20 | |
| 21 | #include <QWidget> |
Edric Milaret | 3e6aefe | 2015-06-05 16:07:26 -0400 | [diff] [blame] | 22 | #include <QMap> |
Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 23 | |
| 24 | #include <QTableWidgetItem> |
| 25 | |
| 26 | #include "accountmodel.h" |
Edric Milaret | e82782e | 2016-03-21 12:14:17 -0400 | [diff] [blame] | 27 | #include "codecmodel.h" |
Edric Milaret | 3e6aefe | 2015-06-05 16:07:26 -0400 | [diff] [blame] | 28 | #include "account.h" |
Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 29 | |
Nicolas Jager | 74fe46f | 2016-02-29 14:55:09 -0500 | [diff] [blame] | 30 | class QPushButton; |
| 31 | |
Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 32 | namespace Ui { |
| 33 | class AccountDetails; |
| 34 | } |
| 35 | |
| 36 | class AccountDetails : public QWidget |
| 37 | { |
| 38 | Q_OBJECT |
| 39 | |
Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 40 | public: |
Edric Milaret | dda49b6 | 2016-02-05 14:27:38 -0500 | [diff] [blame] | 41 | explicit AccountDetails(QWidget* parent = 0); |
Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 42 | ~AccountDetails(); |
| 43 | |
Edric Milaret | dda49b6 | 2016-02-05 14:27:38 -0500 | [diff] [blame] | 44 | void setAccount(Account* currentAccount); |
Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 45 | void save(); |
| 46 | |
| 47 | //UI SLOTS |
| 48 | private slots: |
| 49 | void on_upAudioButton_clicked(); |
| 50 | void on_downAudioButton_clicked(); |
| 51 | void on_upVideoButton_clicked(); |
| 52 | void on_downVideoButton_clicked(); |
Edric Milaret | dda49b6 | 2016-02-05 14:27:38 -0500 | [diff] [blame] | 53 | void on_playButton_clicked(); |
Edric Milaret | 5746784 | 2016-08-30 13:06:11 -0400 | [diff] [blame] | 54 | void on_addDeviceButton_clicked(); |
| 55 | void on_cancelButton_clicked(); |
| 56 | void on_exportOnRingButton_clicked(); |
| 57 | void on_exportEndedOkButton_clicked(); |
| 58 | void on_cancelAddButton_clicked(); |
Anthony Léonard | 59db8ce | 2016-10-19 10:54:11 -0400 | [diff] [blame] | 59 | void on_devicesStackedWidget_currentChanged(int arg1); |
Anthony Léonard | aa90e1a | 2016-10-12 11:24:17 -0400 | [diff] [blame] | 60 | void on_registerButton_clicked(); |
Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 61 | |
| 62 | private slots: |
Edric Milaret | 3e6aefe | 2015-06-05 16:07:26 -0400 | [diff] [blame] | 63 | void onCertButtonClicked(); |
Edric Milaret | b1b00ce | 2016-02-03 14:10:05 -0500 | [diff] [blame] | 64 | void ringtonesBoxCurrentIndexChanged(int index); |
Edric Milaret | dda49b6 | 2016-02-05 14:27:38 -0500 | [diff] [blame] | 65 | void audioCodecSelectionChanged(const QItemSelection& selected, const QItemSelection& deselected); |
| 66 | void videoCodecSelectionChanged(const QItemSelection& selected, const QItemSelection& deselected); |
Edric Milaret | 5746784 | 2016-08-30 13:06:11 -0400 | [diff] [blame] | 67 | void exportOnRingEnded(Account::ExportOnRingStatus state, const QString& pin); |
Anthony Léonard | aa90e1a | 2016-10-12 11:24:17 -0400 | [diff] [blame] | 68 | void handle_nameRegistrationEnded(NameDirectory::RegisterNameStatus status, const QString& name); |
Olivier SOLDANO | d048d17 | 2017-09-28 15:34:32 -0400 | [diff] [blame] | 69 | void on_changePassBtn_clicked(); |
| 70 | void on_confirmChangeBtn_clicked(); |
| 71 | void on_cancelChangeBtn_clicked(); |
Edric Milaret | b1b00ce | 2016-02-03 14:10:05 -0500 | [diff] [blame] | 72 | |
Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 73 | private: |
Edric Milaret | dda49b6 | 2016-02-05 14:27:38 -0500 | [diff] [blame] | 74 | Ui::AccountDetails* ui; |
Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 75 | CodecModel* codecModel_; |
| 76 | Account* currentAccount_; |
Edric Milaret | 3e6aefe | 2015-06-05 16:07:26 -0400 | [diff] [blame] | 77 | typedef void (Account::*ACC_PTR)(const QString&); |
| 78 | QMap<QString, ACC_PTR > certMap_; |
Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 79 | |
Edric Milaret | dda49b6 | 2016-02-05 14:27:38 -0500 | [diff] [blame] | 80 | void stopRingtone(); |
Olivier SOLDANO | d048d17 | 2017-09-28 15:34:32 -0400 | [diff] [blame] | 81 | void resetPasswordChangeUI(); |
Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 82 | }; |