From c52c8ba2261b93b3f1a06de4ee7a9c1a3a2c738a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Mesquita?= Date: Fri, 8 Jan 2010 00:12:54 +0000 Subject: [PATCH] Add an about dialog so we can know versions that are being used. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16205 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- fscomm/FSComm.pro | 3 ++- fscomm/mainwindow.cpp | 17 +++++++++++++++++ fscomm/mainwindow.h | 2 ++ fscomm/mainwindow.ui | 12 ++++++++++++ fscomm/preferences/accountdialog.cpp | 5 +++++ fscomm/preferences/accountdialog.h | 3 +++ 6 files changed, 41 insertions(+), 1 deletion(-) diff --git a/fscomm/FSComm.pro b/fscomm/FSComm.pro index 47a3629ecd..2c3e716532 100644 --- a/fscomm/FSComm.pro +++ b/fscomm/FSComm.pro @@ -40,7 +40,8 @@ HEADERS += mainwindow.h \ preferences/accountdialog.h FORMS += mainwindow.ui \ preferences/prefdialog.ui \ - preferences/accountdialog.ui + preferences/accountdialog.ui \ + ../aboutdialog.ui RESOURCES += resources.qrc OTHER_FILES += conf/portaudio.conf.xml \ conf/event_socket.conf.xml \ diff --git a/fscomm/mainwindow.cpp b/fscomm/mainwindow.cpp index 162a8b9fce..b5918840d6 100644 --- a/fscomm/mainwindow.cpp +++ b/fscomm/mainwindow.cpp @@ -31,6 +31,7 @@ #include #include "mainwindow.h" #include "ui_mainwindow.h" +#include MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), @@ -88,6 +89,7 @@ MainWindow::MainWindow(QWidget *parent) : connect(ui->listCalls, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(callListDoubleClick(QListWidgetItem*))); connect(ui->action_Preferences, SIGNAL(triggered()), this, SLOT(prefTriggered())); connect(ui->action_Exit, SIGNAL(triggered()), this, SLOT(close())); + connect(ui->actionAbout, SIGNAL(triggered()), this, SLOT(showAbout())); } MainWindow::~MainWindow() @@ -332,3 +334,18 @@ void MainWindow::changeEvent(QEvent *e) break; } } + +void MainWindow::showAbout() +{ + QString result; + g_FSHost.sendCmd("version", "", &result); + + QMessageBox::about(this, tr("About FSComm"), + tr("

FSComm

" + "

Author: João Mesquita <jmesquita@freeswitch.org>" + "

FsComm is a softphone based on libfreeswitch." + "

The FreeSWITCH™ images and name are trademark of" + " Anthony Minessale II, primary author of FreeSWITCH™." + "

Compiled FSComm version: %1" + "

%2").arg(SWITCH_VERSION_FULL, result)); +} diff --git a/fscomm/mainwindow.h b/fscomm/mainwindow.h index 103b1165dc..4f0420752e 100644 --- a/fscomm/mainwindow.h +++ b/fscomm/mainwindow.h @@ -43,6 +43,7 @@ namespace Ui { class MainWindow; } + class MainWindow : public QMainWindow { Q_OBJECT public: @@ -56,6 +57,7 @@ signals: void dtmfDialed(QString); private slots: + void showAbout(); void prefTriggered(); void coreLoadingError(QString); void gwStateChanged(QString, int); diff --git a/fscomm/mainwindow.ui b/fscomm/mainwindow.ui index c7d5dc6510..8cb83a7475 100644 --- a/fscomm/mainwindow.ui +++ b/fscomm/mainwindow.ui @@ -322,7 +322,14 @@ + + + Help + + + + @@ -343,6 +350,11 @@ &Exit + + + About + + diff --git a/fscomm/preferences/accountdialog.cpp b/fscomm/preferences/accountdialog.cpp index f690a7d367..76063bde3f 100644 --- a/fscomm/preferences/accountdialog.cpp +++ b/fscomm/preferences/accountdialog.cpp @@ -13,6 +13,11 @@ AccountDialog::~AccountDialog() delete ui; } +void AccountDialog::writeConfig() +{ + +} + void AccountDialog::changeEvent(QEvent *e) { QDialog::changeEvent(e); diff --git a/fscomm/preferences/accountdialog.h b/fscomm/preferences/accountdialog.h index 7cb5673a3f..c8afc1d279 100644 --- a/fscomm/preferences/accountdialog.h +++ b/fscomm/preferences/accountdialog.h @@ -13,6 +13,9 @@ public: AccountDialog(QWidget *parent = 0); ~AccountDialog(); +private slots: + void writeConfig(); + protected: void changeEvent(QEvent *e);