configurationwidget.h 2.85 KB
Newer Older
1
/***************************************************************************
2
 * Copyright (C) 2015-2016 by Savoir-faire Linux                           *
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
 * Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>*
 *                                                                         *
 * This program is free software; you can redistribute it and/or modify    *
 * it under the terms of the GNU General Public License as published by    *
 * the Free Software Foundation; either version 3 of the License, or       *
 * (at your option) any later version.                                     *
 *                                                                         *
 * This program is distributed in the hope that it will be useful,         *
 * but WITHOUT ANY WARRANTY; without even the implied warranty of          *
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the           *
 * GNU General Public License for more details.                            *
 *                                                                         *
 * You should have received a copy of the GNU General Public License       *
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.   *
 **************************************************************************/

Edric Milaret's avatar
Edric Milaret committed
19
#pragma once
20 21 22

#include <QWidget>
#include <QItemSelection>
23
#include <QSettings>
24 25 26

#include "navwidget.h"
#include "accountdetails.h"
Edric Milaret's avatar
Edric Milaret committed
27
#include "accountstatedelegate.h"
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44

#include "accountmodel.h"
#include "video/devicemodel.h"
#include "audio/codecmodel.h"

namespace Ui {
class ConfigurationWidget;
}

class ConfigurationWidget : public NavWidget
{
    Q_OBJECT

public:
    explicit ConfigurationWidget(QWidget *parent = 0);
    ~ConfigurationWidget();

45 46 47
protected:
    void showEvent(QShowEvent *event);

48 49 50 51 52
//UI SLOTS
private slots:
    void on_deviceBox_currentIndexChanged(int index);
    void on_sizeBox_currentIndexChanged(int index);
    void on_addAccountButton_clicked();
53
    void on_startupBox_toggled(bool checked);
54 55
    void on_clearHistoryButton_clicked();
    void on_historyDaySettingsSpinBox_valueChanged(int limit);
56
    void on_closeOrMinCheckBox_toggled(bool checked);
57 58 59
    void on_checkUpdateButton_clicked();
    void on_autoUpdateCheckBox_toggled(bool checked);
    void on_intervalUpdateCheckSpinBox_valueChanged(int arg1);
60
    void on_stackedWidget_currentChanged(int index);
61
    void on_recordPath_clicked();
62 63 64

private slots:
    void accountSelected(QItemSelection itemSel);
65
    void deviceIndexChanged(int index);
66 67
    void outputIndexChanged(int index);
    void inputIndexChanged(int index);
68 69 70 71 72 73 74
private:
    Ui::ConfigurationWidget *ui;
    AccountModel* accountModel_;
    Video::DeviceModel* deviceModel_;
    CodecModel* codecModel_;
    bool isLoading_;
    AccountDetails* accountDetails_;
Edric Milaret's avatar
Edric Milaret committed
75
    AccountStateDelegate *accountStateDelegate_;
76
    QSettings settings_;
77
    void showPreview();
78 79
};