2010-01-04 20:49:22 +00:00
|
|
|
#include <QtGui>
|
|
|
|
#include "prefdialog.h"
|
|
|
|
#include "ui_prefdialog.h"
|
2010-01-06 02:08:25 +00:00
|
|
|
#include "prefportaudio.h"
|
2010-01-07 06:43:51 +00:00
|
|
|
#include "prefsofia.h"
|
2010-01-11 04:40:39 +00:00
|
|
|
#include "prefaccounts.h"
|
2010-01-04 20:49:22 +00:00
|
|
|
|
|
|
|
PrefDialog::PrefDialog(QWidget *parent) :
|
|
|
|
QDialog(parent),
|
|
|
|
ui(new Ui::PrefDialog)
|
|
|
|
{
|
|
|
|
ui->setupUi(this);
|
2010-01-05 22:16:46 +00:00
|
|
|
_settings = new QSettings();
|
2010-01-06 02:08:25 +00:00
|
|
|
connect(this, SIGNAL(accepted()), this, SLOT(writeConfig()));
|
|
|
|
|
2010-01-14 02:32:20 +00:00
|
|
|
_pref_accounts = new PrefAccounts(ui);
|
2010-01-06 02:08:25 +00:00
|
|
|
_mod_portaudio = new PrefPortaudio(ui, this);
|
2010-01-14 02:32:20 +00:00
|
|
|
_mod_sofia = new PrefSofia(ui, this);
|
2010-01-06 02:08:25 +00:00
|
|
|
readConfig();
|
2010-01-04 20:49:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
PrefDialog::~PrefDialog()
|
|
|
|
{
|
|
|
|
delete ui;
|
|
|
|
}
|
|
|
|
|
2010-01-06 02:08:25 +00:00
|
|
|
void PrefDialog::writeConfig()
|
|
|
|
{
|
|
|
|
_mod_portaudio->writeConfig();
|
2010-01-14 02:32:20 +00:00
|
|
|
_mod_sofia->writeConfig();
|
2010-01-17 23:10:57 +00:00
|
|
|
|
2010-01-04 20:49:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void PrefDialog::changeEvent(QEvent *e)
|
|
|
|
{
|
|
|
|
QDialog::changeEvent(e);
|
|
|
|
switch (e->type()) {
|
|
|
|
case QEvent::LanguageChange:
|
|
|
|
ui->retranslateUi(this);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2010-01-06 02:08:25 +00:00
|
|
|
|
|
|
|
void PrefDialog::readConfig()
|
|
|
|
{
|
2010-01-14 02:32:20 +00:00
|
|
|
_pref_accounts->readConfig();
|
2010-01-06 02:08:25 +00:00
|
|
|
_mod_portaudio->readConfig();
|
2010-01-14 02:32:20 +00:00
|
|
|
_mod_sofia->readConfig();
|
2010-01-06 02:08:25 +00:00
|
|
|
}
|