diff --git a/fscomm/FSComm.pro b/fscomm/FSComm.pro
index 0934c124db..47a3629ecd 100644
--- a/fscomm/FSComm.pro
+++ b/fscomm/FSComm.pro
@@ -28,18 +28,22 @@ SOURCES += main.cpp \
mod_qsettings/mod_qsettings.cpp \
preferences/prefdialog.cpp \
preferences/prefportaudio.cpp \
- preferences/prefsofia.cpp
+ preferences/prefsofia.cpp \
+ preferences/accountdialog.cpp
HEADERS += mainwindow.h \
fshost.h \
call.h \
mod_qsettings/mod_qsettings.h \
preferences/prefdialog.h \
preferences/prefportaudio.h \
- preferences/prefsofia.h
+ preferences/prefsofia.h \
+ preferences/accountdialog.h
FORMS += mainwindow.ui \
- preferences/prefdialog.ui
+ preferences/prefdialog.ui \
+ preferences/accountdialog.ui
RESOURCES += resources.qrc
OTHER_FILES += conf/portaudio.conf.xml \
conf/event_socket.conf.xml \
conf/freeswitch.xml \
- conf/sofia.conf.xml
+ conf/sofia.conf.xml \
+ conf/account.conf.xml
diff --git a/fscomm/conf/account.conf.xml b/fscomm/conf/account.conf.xml
new file mode 100644
index 0000000000..4d65e8e318
--- /dev/null
+++ b/fscomm/conf/account.conf.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/fscomm/preferences/accountdialog.cpp b/fscomm/preferences/accountdialog.cpp
new file mode 100644
index 0000000000..f690a7d367
--- /dev/null
+++ b/fscomm/preferences/accountdialog.cpp
@@ -0,0 +1,26 @@
+#include "accountdialog.h"
+#include "ui_accountdialog.h"
+
+AccountDialog::AccountDialog(QWidget *parent) :
+ QDialog(parent),
+ ui(new Ui::AccountDialog)
+{
+ ui->setupUi(this);
+}
+
+AccountDialog::~AccountDialog()
+{
+ delete ui;
+}
+
+void AccountDialog::changeEvent(QEvent *e)
+{
+ QDialog::changeEvent(e);
+ switch (e->type()) {
+ case QEvent::LanguageChange:
+ ui->retranslateUi(this);
+ break;
+ default:
+ break;
+ }
+}
diff --git a/fscomm/preferences/accountdialog.h b/fscomm/preferences/accountdialog.h
new file mode 100644
index 0000000000..7cb5673a3f
--- /dev/null
+++ b/fscomm/preferences/accountdialog.h
@@ -0,0 +1,23 @@
+#ifndef ACCOUNTDIALOG_H
+#define ACCOUNTDIALOG_H
+
+#include
+
+namespace Ui {
+ class AccountDialog;
+}
+
+class AccountDialog : public QDialog {
+ Q_OBJECT
+public:
+ AccountDialog(QWidget *parent = 0);
+ ~AccountDialog();
+
+protected:
+ void changeEvent(QEvent *e);
+
+private:
+ Ui::AccountDialog *ui;
+};
+
+#endif // ACCOUNTDIALOG_H
diff --git a/fscomm/preferences/accountdialog.ui b/fscomm/preferences/accountdialog.ui
new file mode 100644
index 0000000000..acddb9eb05
--- /dev/null
+++ b/fscomm/preferences/accountdialog.ui
@@ -0,0 +1,272 @@
+
+
+ AccountDialog
+
+
+ Qt::WindowModal
+
+
+
+ 0
+ 0
+ 495
+ 573
+
+
+
+ Account
+
+
+ -
+
+
+ name
+
+
+
+ -
+
+
+ -
+
+
+ username
+
+
+
+ -
+
+
+ -
+
+
+ realm
+
+
+
+ -
+
+
+ -
+
+
+ from-user
+
+
+
+ -
+
+
+ -
+
+
+ from-domain
+
+
+
+ -
+
+
+ -
+
+
+ password
+
+
+
+ -
+
+
+ -
+
+
+ extension
+
+
+
+ -
+
+
+ -
+
+
+ proxy
+
+
+
+ -
+
+
+ -
+
+
+ register-proxy
+
+
+
+ -
+
+
+ -
+
+
+ expire-seconds
+
+
+
+ -
+
+
+ 60
+
+
+
+ -
+
+
+ register
+
+
+
+ -
+
+
-
+
+ true
+
+
+ -
+
+ false
+
+
+
+
+ -
+
+
+ register-transport
+
+
+
+ -
+
+
-
+
+ udp
+
+
+ -
+
+ tcp
+
+
+
+
+ -
+
+
+ retry-seconds
+
+
+
+ -
+
+
+ 30
+
+
+
+ -
+
+
+ contact-params
+
+
+
+ -
+
+
+ -
+
+
+ caller-id-in-from
+
+
+
+ -
+
+
+ ping
+
+
+
+ -
+
+
+ 25
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+ QDialogButtonBox::Cancel|QDialogButtonBox::Ok
+
+
+
+ -
+
+
-
+
+ false
+
+
+ -
+
+ true
+
+
+
+
+
+
+
+
+
+ buttonBox
+ accepted()
+ AccountDialog
+ accept()
+
+
+ 248
+ 254
+
+
+ 157
+ 274
+
+
+
+
+ buttonBox
+ rejected()
+ AccountDialog
+ reject()
+
+
+ 316
+ 260
+
+
+ 286
+ 274
+
+
+
+
+
diff --git a/fscomm/preferences/prefdialog.cpp b/fscomm/preferences/prefdialog.cpp
index 8a53fc2120..05242f3f1f 100644
--- a/fscomm/preferences/prefdialog.cpp
+++ b/fscomm/preferences/prefdialog.cpp
@@ -3,6 +3,7 @@
#include "ui_prefdialog.h"
#include "prefportaudio.h"
#include "prefsofia.h"
+#include "accountdialog.h"
PrefDialog::PrefDialog(QWidget *parent) :
QDialog(parent),
@@ -11,7 +12,9 @@ PrefDialog::PrefDialog(QWidget *parent) :
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();
@@ -22,6 +25,16 @@ PrefDialog::~PrefDialog()
delete ui;
}
+void PrefDialog::addAccountBtnClicked()
+{
+ if (!_accDlg)
+ _accDlg = new AccountDialog();
+
+ _accDlg->show();
+ _accDlg->raise();
+ _accDlg->activateWindow();
+}
+
void PrefDialog::writeConfig()
{
_mod_portaudio->writeConfig();
diff --git a/fscomm/preferences/prefdialog.h b/fscomm/preferences/prefdialog.h
index 5ad01c852e..1c1ee66b04 100644
--- a/fscomm/preferences/prefdialog.h
+++ b/fscomm/preferences/prefdialog.h
@@ -8,6 +8,7 @@
class PrefPortaudio;
class PrefSofia;
+class AccountDialog;
namespace Ui {
class PrefDialog;
@@ -23,11 +24,13 @@ protected:
void changeEvent(QEvent *e);
private slots:
+ void addAccountBtnClicked();
void writeConfig();
private:
void readConfig();
QSettings *_settings;
+ AccountDialog *_accDlg;
Ui::PrefDialog *ui;
PrefPortaudio *_mod_portaudio;
PrefSofia *_mod_sofia;
diff --git a/fscomm/preferences/prefdialog.ui b/fscomm/preferences/prefdialog.ui
index 276c89ed4c..2d8c7c7a26 100644
--- a/fscomm/preferences/prefdialog.ui
+++ b/fscomm/preferences/prefdialog.ui
@@ -64,6 +64,15 @@
:/images/pref_general.jpg:/images/pref_general.jpg
+ -
+
+ Accounts
+
+
+
+ :/images/pref_accounts.jpg:/images/pref_accounts.jpg
+
+
-
Sofia
@@ -87,9 +96,9 @@
-
- 0
+ 1
-
+
-
@@ -122,7 +131,71 @@
-
+
+
+ -
+
+
+ QAbstractItemView::NoEditTriggers
+
+
+
+ Enabled
+
+
+
+
+ Name
+
+
+
+
+ Username
+
+
+
+
+ -
+
+
-
+
+
+ Add
+
+
+
+ -
+
+
+ Remove
+
+
+
+ -
+
+
+ Edit
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+
+
+
-
@@ -716,7 +789,7 @@
-
+
-
diff --git a/fscomm/resources.qrc b/fscomm/resources.qrc
index aedbf6a89f..bd71ace462 100644
--- a/fscomm/resources.qrc
+++ b/fscomm/resources.qrc
@@ -4,6 +4,7 @@
resources/pref_sip.png
resources/pref_audio.gif
resources/pref_general.jpg
+ resources/pref_accounts.jpg
conf/freeswitch.xml
@@ -11,6 +12,7 @@
conf/event_socket.conf.xml
conf/portaudio.conf.xml
conf/sofia.conf.xml
+ conf/account.conf.xml
resources/test.wav
diff --git a/fscomm/resources/pref_accounts.jpg b/fscomm/resources/pref_accounts.jpg
new file mode 100644
index 0000000000..95292c82b6
Binary files /dev/null and b/fscomm/resources/pref_accounts.jpg differ