Project 'savoirfairelinux/ring-client-windows' was moved to 'savoirfairelinux/jami-client-windows'. Please update any links and bookmarks that may still have the old path.
Select Git revision
-
Refs #68886 Change-Id: I69b44506dc52a18c47f102466472c68fbf08600b
Refs #68886 Change-Id: I69b44506dc52a18c47f102466472c68fbf08600b
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
configurationwidget.cpp 5.06 KiB
/***************************************************************************
* Copyright (C) 2011-2015 by Savoir-Faire Linux *
* 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/>. *
**************************************************************************/
#include "configurationwidget.h"
#include "ui_configurationwidget.h"
#include "video/devicemodel.h"
#include "video/channel.h"
#include "video/resolution.h"
#include "video/rate.h"
#include "accountmodel.h"
#include "protocolmodel.h"
#include "accountdetails.h"
#include <video/previewmanager.h>
ConfigurationWidget::ConfigurationWidget(QWidget *parent) :
NavWidget(Nav, parent),
ui(new Ui::ConfigurationWidget),
accountModel_(AccountModel::instance()),
deviceModel_(Video::DeviceModel::instance()),
accountDetails_(new AccountDetails())
{
ui->setupUi(this);
ui->accountView->setModel(accountModel_);
//FIXME : Seems to set the active device instead of taking the default one
isLoading_ = true;
ui->deviceBox->setModel(deviceModel_);
ui->deviceBox->setCurrentIndex(deviceModel_->activeIndex());
connect(ui->accountView->selectionModel(),
SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
this, SLOT(accountSelected(QItemSelection)));
ui->accountView->setCurrentIndex(accountModel_->index(0));
ui->accountDetailLayout->addWidget(accountDetails_);
ui->testVideoButton->setCheckable(true);
ui->accountTypeBox->setModel(accountModel_->protocolModel());
}
void ConfigurationWidget::atExit() {
accountModel_->save();
accountDetails_->save();
}
ConfigurationWidget::~ConfigurationWidget()
{
delete ui;
}
void
ConfigurationWidget::on_deviceBox_currentIndexChanged(int index)