Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 1 | /*************************************************************************** |
Edric Milaret | 4bba46d | 2015-04-29 16:33:38 -0400 | [diff] [blame] | 2 | * Copyright (C) 2015 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 | |
| 19 | #ifndef CONFIGURATIONWIDGET_H |
| 20 | #define CONFIGURATIONWIDGET_H |
| 21 | |
| 22 | #include <QWidget> |
| 23 | #include <QItemSelection> |
| 24 | |
| 25 | #include "navwidget.h" |
| 26 | #include "accountdetails.h" |
| 27 | |
| 28 | #include "accountmodel.h" |
| 29 | #include "video/devicemodel.h" |
| 30 | #include "audio/codecmodel.h" |
| 31 | |
| 32 | namespace Ui { |
| 33 | class ConfigurationWidget; |
| 34 | } |
| 35 | |
| 36 | class ConfigurationWidget : public NavWidget |
| 37 | { |
| 38 | Q_OBJECT |
| 39 | |
| 40 | public: |
| 41 | explicit ConfigurationWidget(QWidget *parent = 0); |
| 42 | ~ConfigurationWidget(); |
| 43 | void atExit(); |
| 44 | |
Edric Milaret | 3aeae3a | 2015-06-01 17:31:54 -0400 | [diff] [blame^] | 45 | |
| 46 | protected: |
| 47 | void showEvent(QShowEvent *event); |
| 48 | |
Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 49 | //UI SLOTS |
| 50 | private slots: |
| 51 | void on_deviceBox_currentIndexChanged(int index); |
| 52 | void on_sizeBox_currentIndexChanged(int index); |
| 53 | void on_rateBox_currentIndexChanged(int index); |
Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 54 | void on_deleteAccountButton_clicked(); |
| 55 | void on_addAccountButton_clicked(); |
Edric Milaret | 94b4aab | 2015-05-08 12:10:44 -0400 | [diff] [blame] | 56 | void on_startupBox_toggled(bool checked); |
Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 57 | |
| 58 | private slots: |
| 59 | void accountSelected(QItemSelection itemSel); |
Edric Milaret | 94b4aab | 2015-05-08 12:10:44 -0400 | [diff] [blame] | 60 | void deviceIndexChanged(int index); |
Edric Milaret | 4bba46d | 2015-04-29 16:33:38 -0400 | [diff] [blame] | 61 | |
Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 62 | private: |
| 63 | Ui::ConfigurationWidget *ui; |
| 64 | AccountModel* accountModel_; |
| 65 | Video::DeviceModel* deviceModel_; |
| 66 | CodecModel* codecModel_; |
| 67 | bool isLoading_; |
| 68 | AccountDetails* accountDetails_; |
| 69 | }; |
| 70 | |
| 71 | #endif // CONFIGURATIONWIDGET_H |