Commit ef9b85b8 authored by Edric Milaret's avatar Edric Milaret

fix undesired effect of warning label on preview during call

Change-Id: I1d8b4a16c883e404f4d06c10a9891bf9fa5a8daf
Tuleap: #277
parent b1b00cee
......@@ -95,6 +95,19 @@ ConfigurationWidget::ConfigurationWidget(QWidget *parent) :
#endif
}
void ConfigurationWidget::showPreview()
{
if (ui->tabWidget->currentIndex() == 1
&& CallModel::instance().getActiveCalls().size() == 0) {
ui->previewUnavailable->hide();
ui->videoView->show();
Video::PreviewManager::instance().startPreview();
} else {
ui->previewUnavailable->show();
ui->videoView->hide();
}
}
void
ConfigurationWidget::showEvent(QShowEvent *event) {
......@@ -105,15 +118,7 @@ ConfigurationWidget::showEvent(QShowEvent *event) {
ui->intervalUpdateCheckSpinBox->setValue(win_sparkle_get_update_check_interval() / 86400);
#endif
QWidget::showEvent(event);
if (ui->tabWidget->currentIndex() == 1
&& CallModel::instance().getActiveCalls().size() == 0) {
ui->previewUnavailable->hide();
ui->videoView->show();
Video::PreviewManager::instance().startPreview();
} else {
ui->previewUnavailable->show();
ui->videoView->hide();
}
showPreview();
}
void
......@@ -260,3 +265,10 @@ ConfigurationWidget::on_intervalUpdateCheckSpinBox_valueChanged(int arg1)
win_sparkle_set_update_check_interval(arg1 * 86400);
#endif
}
void
ConfigurationWidget::on_tabWidget_currentChanged(int index)
{
Q_UNUSED(index)
showPreview();
}
......@@ -59,6 +59,7 @@ private slots:
void on_checkUpdateButton_clicked();
void on_autoUpdateCheckBox_toggled(bool checked);
void on_intervalUpdateCheckSpinBox_valueChanged(int arg1);
void on_tabWidget_currentChanged(int index);
private slots:
void accountSelected(QItemSelection itemSel);
......@@ -73,5 +74,6 @@ private:
AccountDetails* accountDetails_;
AccountStateDelegate *accountStateDelegate_;
QSettings settings_;
void showPreview();
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment