forked from Mirrors/freeswitch
4c6942b437
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16203 d0543943-73ff-0310-b7d9-9358b9ac24b2
61 lines
1.2 KiB
C++
61 lines
1.2 KiB
C++
#include <QtGui>
|
|
#include "prefdialog.h"
|
|
#include "ui_prefdialog.h"
|
|
#include "prefportaudio.h"
|
|
#include "prefsofia.h"
|
|
#include "accountdialog.h"
|
|
|
|
PrefDialog::PrefDialog(QWidget *parent) :
|
|
QDialog(parent),
|
|
ui(new Ui::PrefDialog)
|
|
{
|
|
ui->setupUi(this);
|
|
_settings = new QSettings();
|
|
connect(this, SIGNAL(accepted()), this, SLOT(writeConfig()));
|
|
connect(ui->sofiaGwAddBtn, SIGNAL(clicked()), this, SLOT(addAccountBtnClicked()));
|
|
|
|
_accDlg = NULL;
|
|
_mod_portaudio = new PrefPortaudio(ui, this);
|
|
_mod_sofia = new PrefSofia(ui, this);
|
|
readConfig();
|
|
}
|
|
|
|
PrefDialog::~PrefDialog()
|
|
{
|
|
delete ui;
|
|
}
|
|
|
|
void PrefDialog::addAccountBtnClicked()
|
|
{
|
|
if (!_accDlg)
|
|
_accDlg = new AccountDialog();
|
|
|
|
_accDlg->show();
|
|
_accDlg->raise();
|
|
_accDlg->activateWindow();
|
|
}
|
|
|
|
void PrefDialog::writeConfig()
|
|
{
|
|
_mod_portaudio->writeConfig();
|
|
/*_mod_sofia->writeConfig();*/
|
|
}
|
|
|
|
void PrefDialog::changeEvent(QEvent *e)
|
|
{
|
|
QDialog::changeEvent(e);
|
|
switch (e->type()) {
|
|
case QEvent::LanguageChange:
|
|
ui->retranslateUi(this);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
|
|
void PrefDialog::readConfig()
|
|
{
|
|
_mod_portaudio->readConfig();
|
|
/*_mod_sofia->readConfig();*/
|
|
}
|