Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 1 | /*************************************************************************** |
Nicolas Jager | 74fe46f | 2016-02-29 14:55:09 -0500 | [diff] [blame^] | 2 | * Copyright (C) 2015-2016 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> |
| 22 | #include <QItemSelection> |
Edric Milaret | b25af97 | 2015-06-17 16:55:45 -0400 | [diff] [blame] | 23 | #include <QSettings> |
Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 24 | |
| 25 | #include "navwidget.h" |
| 26 | #include "accountdetails.h" |
Edric Milaret | 01f2384 | 2015-06-22 14:46:01 -0400 | [diff] [blame] | 27 | #include "accountstatedelegate.h" |
Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 28 | |
| 29 | #include "accountmodel.h" |
| 30 | #include "video/devicemodel.h" |
| 31 | #include "audio/codecmodel.h" |
| 32 | |
| 33 | namespace Ui { |
| 34 | class ConfigurationWidget; |
| 35 | } |
| 36 | |
| 37 | class ConfigurationWidget : public NavWidget |
| 38 | { |
| 39 | Q_OBJECT |
| 40 | |
| 41 | public: |
| 42 | explicit ConfigurationWidget(QWidget *parent = 0); |
| 43 | ~ConfigurationWidget(); |
Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 44 | |
Edric Milaret | 3aeae3a | 2015-06-01 17:31:54 -0400 | [diff] [blame] | 45 | protected: |
| 46 | void showEvent(QShowEvent *event); |
| 47 | |
Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 48 | //UI SLOTS |
| 49 | private slots: |
| 50 | void on_deviceBox_currentIndexChanged(int index); |
| 51 | void on_sizeBox_currentIndexChanged(int index); |
Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 52 | void on_addAccountButton_clicked(); |
Edric Milaret | 94b4aab | 2015-05-08 12:10:44 -0400 | [diff] [blame] | 53 | void on_startupBox_toggled(bool checked); |
Edric Milaret | 1eece87 | 2015-06-10 13:37:51 -0400 | [diff] [blame] | 54 | void on_clearHistoryButton_clicked(); |
| 55 | void on_historyDaySettingsSpinBox_valueChanged(int limit); |
Edric Milaret | b25af97 | 2015-06-17 16:55:45 -0400 | [diff] [blame] | 56 | void on_closeOrMinCheckBox_toggled(bool checked); |
Edric Milaret | 79d3f68 | 2015-12-09 12:32:52 -0500 | [diff] [blame] | 57 | void on_checkUpdateButton_clicked(); |
| 58 | void on_autoUpdateCheckBox_toggled(bool checked); |
| 59 | void on_intervalUpdateCheckSpinBox_valueChanged(int arg1); |
Nicolas Jager | 74fe46f | 2016-02-29 14:55:09 -0500 | [diff] [blame^] | 60 | void on_stackedWidget_currentChanged(int index); |
Edric Milaret | fd5a1f2 | 2016-02-05 15:30:00 -0500 | [diff] [blame] | 61 | void on_recordPath_clicked(); |
Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 62 | |
| 63 | private slots: |
| 64 | void accountSelected(QItemSelection itemSel); |
Edric Milaret | 94b4aab | 2015-05-08 12:10:44 -0400 | [diff] [blame] | 65 | void deviceIndexChanged(int index); |
Edric Milaret | 4bba46d | 2015-04-29 16:33:38 -0400 | [diff] [blame] | 66 | |
Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 67 | private: |
| 68 | Ui::ConfigurationWidget *ui; |
| 69 | AccountModel* accountModel_; |
| 70 | Video::DeviceModel* deviceModel_; |
| 71 | CodecModel* codecModel_; |
| 72 | bool isLoading_; |
| 73 | AccountDetails* accountDetails_; |
Edric Milaret | 01f2384 | 2015-06-22 14:46:01 -0400 | [diff] [blame] | 74 | AccountStateDelegate *accountStateDelegate_; |
Edric Milaret | b25af97 | 2015-06-17 16:55:45 -0400 | [diff] [blame] | 75 | QSettings settings_; |
Edric Milaret | ef9b85b | 2016-02-05 11:47:10 -0500 | [diff] [blame] | 76 | void showPreview(); |
Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 77 | }; |
| 78 | |