]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Add an about dialog so we can know versions that are being used.
authorJoão Mesquita <jmesquita@freeswitch.org>
Fri, 8 Jan 2010 00:12:54 +0000 (00:12 +0000)
committerJoão Mesquita <jmesquita@freeswitch.org>
Fri, 8 Jan 2010 00:12:54 +0000 (00:12 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16205 d0543943-73ff-0310-b7d9-9358b9ac24b2

fscomm/FSComm.pro
fscomm/mainwindow.cpp
fscomm/mainwindow.h
fscomm/mainwindow.ui
fscomm/preferences/accountdialog.cpp
fscomm/preferences/accountdialog.h

index 47a3629ecdb5028ba3d2acb46a13b48e6b11ca7f..2c3e716532f83f11aee2cb231ab8ab2e7462e567 100644 (file)
@@ -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 \
index 162a8b9fcee7530256ce424d4c4663247132bea8..b5918840d6c2737933011f25aa7d1ebab9b7f449 100644 (file)
@@ -31,6 +31,7 @@
 #include <QMessageBox>
 #include "mainwindow.h"
 #include "ui_mainwindow.h"
+#include <switch_version.h>
 
 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("<h2>FSComm</h2>"
+                          "<p>Author: Jo&atilde;o Mesquita &lt;jmesquita@freeswitch.org>"
+                          "<p>FsComm is a softphone based on libfreeswitch."
+                          "<p>The FreeSWITCH&trade; images and name are trademark of"
+                          " Anthony Minessale II, primary author of FreeSWITCH&trade;."
+                          "<p>Compiled FSComm version: %1"
+                          "<p>%2").arg(SWITCH_VERSION_FULL, result));
+}
index 103b1165dc0502cdb8ed44533ee7bc5446940e6d..4f0420752eae4d30310cc299fdce5494a42e0d20 100644 (file)
@@ -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);
index c7d5dc6510789f8767f59812de79af954fc9c938..8cb83a7475b48f7465cca7b9aa0b5bddf2d70a01 100644 (file)
     <addaction name="separator"/>
     <addaction name="action_Exit"/>
    </widget>
+   <widget class="QMenu" name="menuHelp">
+    <property name="title">
+     <string>Help</string>
+    </property>
+    <addaction name="actionAbout"/>
+   </widget>
    <addaction name="menu_File"/>
+   <addaction name="menuHelp"/>
   </widget>
   <widget class="QToolBar" name="mainToolBar">
    <attribute name="toolBarArea">
     <string>&amp;Exit</string>
    </property>
   </action>
+  <action name="actionAbout">
+   <property name="text">
+    <string>About</string>
+   </property>
+  </action>
  </widget>
  <layoutdefault spacing="6" margin="11"/>
  <resources/>
index f690a7d367c6aba7d5f023803ec2688e6611b391..76063bde3ff6735c8ef6720838ad83ea188abe32 100644 (file)
@@ -13,6 +13,11 @@ AccountDialog::~AccountDialog()
     delete ui;
 }
 
+void AccountDialog::writeConfig()
+{
+
+}
+
 void AccountDialog::changeEvent(QEvent *e)
 {
     QDialog::changeEvent(e);
index 7cb5673a3fb4e537147d7da73e7b6f6e4de4f541..c8afc1d279e820a34df7c98d47e1bbd1cbc7879e 100644 (file)
@@ -13,6 +13,9 @@ public:
     AccountDialog(QWidget *parent = 0);
     ~AccountDialog();
 
+private slots:
+    void writeConfig();
+
 protected:
     void changeEvent(QEvent *e);