blob: 826d133e0317377a2ebcb99660cf130ae79c9827 [file] [log] [blame]
Edric Milaret627500d2015-03-27 16:41:40 -04001/***************************************************************************
Nicolas Jager74fe46f2016-02-29 14:55:09 -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>
22#include <QItemSelection>
Edric Milaretb25af972015-06-17 16:55:45 -040023#include <QSettings>
Edric Milaret627500d2015-03-27 16:41:40 -040024
25#include "navwidget.h"
26#include "accountdetails.h"
Edric Milaret01f23842015-06-22 14:46:01 -040027#include "accountstatedelegate.h"
Edric Milaret627500d2015-03-27 16:41:40 -040028
29#include "accountmodel.h"
30#include "video/devicemodel.h"
31#include "audio/codecmodel.h"
32
33namespace Ui {
34class ConfigurationWidget;
35}
36
37class ConfigurationWidget : public NavWidget
38{
39 Q_OBJECT
40
41public:
42 explicit ConfigurationWidget(QWidget *parent = 0);
43 ~ConfigurationWidget();
Edric Milaret627500d2015-03-27 16:41:40 -040044
Edric Milaret3aeae3a2015-06-01 17:31:54 -040045protected:
46 void showEvent(QShowEvent *event);
47
Edric Milaret627500d2015-03-27 16:41:40 -040048//UI SLOTS
49private slots:
50 void on_deviceBox_currentIndexChanged(int index);
51 void on_sizeBox_currentIndexChanged(int index);
Edric Milaret627500d2015-03-27 16:41:40 -040052 void on_addAccountButton_clicked();
Edric Milaret94b4aab2015-05-08 12:10:44 -040053 void on_startupBox_toggled(bool checked);
Edric Milaret1eece872015-06-10 13:37:51 -040054 void on_clearHistoryButton_clicked();
55 void on_historyDaySettingsSpinBox_valueChanged(int limit);
Edric Milaretb25af972015-06-17 16:55:45 -040056 void on_closeOrMinCheckBox_toggled(bool checked);
Edric Milaret79d3f682015-12-09 12:32:52 -050057 void on_checkUpdateButton_clicked();
58 void on_autoUpdateCheckBox_toggled(bool checked);
59 void on_intervalUpdateCheckSpinBox_valueChanged(int arg1);
Nicolas Jager74fe46f2016-02-29 14:55:09 -050060 void on_stackedWidget_currentChanged(int index);
Edric Milaretfd5a1f22016-02-05 15:30:00 -050061 void on_recordPath_clicked();
Edric Milaret627500d2015-03-27 16:41:40 -040062
63private slots:
64 void accountSelected(QItemSelection itemSel);
Edric Milaret94b4aab2015-05-08 12:10:44 -040065 void deviceIndexChanged(int index);
Edric Milaret4bba46d2015-04-29 16:33:38 -040066
Edric Milaret627500d2015-03-27 16:41:40 -040067private:
68 Ui::ConfigurationWidget *ui;
69 AccountModel* accountModel_;
70 Video::DeviceModel* deviceModel_;
71 CodecModel* codecModel_;
72 bool isLoading_;
73 AccountDetails* accountDetails_;
Edric Milaret01f23842015-06-22 14:46:01 -040074 AccountStateDelegate *accountStateDelegate_;
Edric Milaretb25af972015-06-17 16:55:45 -040075 QSettings settings_;
Edric Milaretef9b85b2016-02-05 11:47:10 -050076 void showPreview();
Edric Milaret627500d2015-03-27 16:41:40 -040077};
78