blob: c4baa9a30c3c695b918bfb4b5573f8308f6b5d8c [file] [log] [blame]
Edric Milaret627500d2015-03-27 16:41:40 -04001/***************************************************************************
Edric Milaret4bba46d2015-04-29 16:33:38 -04002 * Copyright (C) 2015 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
19#ifndef ACCOUNTDETAILS_H
20#define ACCOUNTDETAILS_H
21
22#include <QWidget>
23
24#include <QTableWidgetItem>
25
26#include "accountmodel.h"
27#include "audio/codecmodel.h"
28
29namespace Ui {
30class AccountDetails;
31}
32
33class AccountDetails : public QWidget
34{
35 Q_OBJECT
36
37private:
38 enum CodecType { AUDIO, VIDEO, ALL };
39
40public:
41 explicit AccountDetails(QWidget *parent = 0);
42 ~AccountDetails();
43
44 void setAccount(Account *currentAccount);
45 void reloadCodec(CodecType type = CodecType::ALL);
46 void save();
47
48//UI SLOTS
49private slots:
50 void on_upAudioButton_clicked();
51 void on_downAudioButton_clicked();
52 void on_upVideoButton_clicked();
53 void on_downVideoButton_clicked();
54 void on_audioCodecView_itemSelectionChanged();
55 void on_videoCodecView_itemSelectionChanged();
56 void on_hostnameEdit_editingFinished();
57 void on_usernameEdit_editingFinished();
58 void on_passwordEdit_editingFinished();
59 void on_proxyEdit_editingFinished();
60 void on_voicemailEdit_editingFinished();
61 void on_tabWidget_currentChanged(int index);
Edric Milarete6538792015-05-08 11:51:01 -040062 void on_upnpCheckBox_clicked(bool checked);
Edric Milaret627500d2015-03-27 16:41:40 -040063
64private slots:
65 void audio_codec_checked(int row, int column);
66 void setVideoEnabled(bool enabled);
67 void video_codec_checked(int row, int column);
68 void setAutoAnswer(bool enabled);
69 void aliasChanged();
70 void bootstrapChanged();
71
72private:
73 Ui::AccountDetails *ui;
74 CodecModel* codecModel_;
75 Account* currentAccount_;
76 bool codecModelModified;
77
78};
79
80#endif // ACCOUNTDETAILS_H