blob: 29212f98c3d2ecd4c0d99611f2f6bb56b1937a6d [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);
62
63private slots:
64 void audio_codec_checked(int row, int column);
65 void setVideoEnabled(bool enabled);
66 void video_codec_checked(int row, int column);
67 void setAutoAnswer(bool enabled);
68 void aliasChanged();
69 void bootstrapChanged();
70
71private:
72 Ui::AccountDetails *ui;
73 CodecModel* codecModel_;
74 Account* currentAccount_;
75 bool codecModelModified;
76
77};
78
79#endif // ACCOUNTDETAILS_H