blob: f247476179c214b788e7acf3e9496e9d0e7734bf [file] [log] [blame]
Edric Milaret627500d2015-03-27 16:41:40 -04001/***************************************************************************
Edric Milaretdda49b62016-02-05 14:27:38 -05002 * Copyright (C) 2015-2016 by Savoir-faire Linux *
Edric Milaret627500d2015-03-27 16:41:40 -04003 * 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 Milaret5f316da2015-09-28 11:57:42 -040019#pragma once
Edric Milaret627500d2015-03-27 16:41:40 -040020
21#include <QWidget>
Edric Milaret3e6aefe2015-06-05 16:07:26 -040022#include <QMap>
Edric Milaret627500d2015-03-27 16:41:40 -040023
24#include <QTableWidgetItem>
25
26#include "accountmodel.h"
27#include "audio/codecmodel.h"
Edric Milaret3e6aefe2015-06-05 16:07:26 -040028#include "account.h"
Edric Milaret627500d2015-03-27 16:41:40 -040029
30namespace Ui {
31class AccountDetails;
32}
33
34class AccountDetails : public QWidget
35{
36 Q_OBJECT
37
Edric Milaret627500d2015-03-27 16:41:40 -040038public:
Edric Milaretdda49b62016-02-05 14:27:38 -050039 explicit AccountDetails(QWidget* parent = 0);
Edric Milaret627500d2015-03-27 16:41:40 -040040 ~AccountDetails();
41
Edric Milaretdda49b62016-02-05 14:27:38 -050042 void setAccount(Account* currentAccount);
Edric Milaret627500d2015-03-27 16:41:40 -040043 void save();
44
45//UI SLOTS
46private slots:
47 void on_upAudioButton_clicked();
48 void on_downAudioButton_clicked();
49 void on_upVideoButton_clicked();
50 void on_downVideoButton_clicked();
Edric Milaretdda49b62016-02-05 14:27:38 -050051 void on_playButton_clicked();
Edric Milaret627500d2015-03-27 16:41:40 -040052
53private slots:
Edric Milaret3e6aefe2015-06-05 16:07:26 -040054 void onCertButtonClicked();
Edric Milaretb1b00ce2016-02-03 14:10:05 -050055 void ringtonesBoxCurrentIndexChanged(int index);
Edric Milaretdda49b62016-02-05 14:27:38 -050056 void audioCodecSelectionChanged(const QItemSelection& selected, const QItemSelection& deselected);
57 void videoCodecSelectionChanged(const QItemSelection& selected, const QItemSelection& deselected);
Edric Milaretb1b00ce2016-02-03 14:10:05 -050058
Edric Milaret627500d2015-03-27 16:41:40 -040059private:
Edric Milaretdda49b62016-02-05 14:27:38 -050060 Ui::AccountDetails* ui;
Edric Milaret627500d2015-03-27 16:41:40 -040061 CodecModel* codecModel_;
62 Account* currentAccount_;
Edric Milaret3e6aefe2015-06-05 16:07:26 -040063 typedef void (Account::*ACC_PTR)(const QString&);
64 QMap<QString, ACC_PTR > certMap_;
Edric Milaret627500d2015-03-27 16:41:40 -040065
Edric Milaretdda49b62016-02-05 14:27:38 -050066 void stopRingtone();
Edric Milaret627500d2015-03-27 16:41:40 -040067};
68