From f7da165b865232933124af92994cd3ae9510b89b Mon Sep 17 00:00:00 2001 From: csoler Date: Tue, 4 Sep 2012 21:57:10 +0000 Subject: [PATCH] added help window to VOIP plugin git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5511 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- plugins/VOIP/VOIPPlugin.cpp | 37 ++++++++++++++++++++++++++++++++++--- plugins/VOIP/VOIPPlugin.h | 1 + 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/plugins/VOIP/VOIPPlugin.cpp b/plugins/VOIP/VOIPPlugin.cpp index eddea67fa..89ec84931 100644 --- a/plugins/VOIP/VOIPPlugin.cpp +++ b/plugins/VOIP/VOIPPlugin.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -20,7 +21,7 @@ static void *inited = new VOIPPlugin() ; extern "C" { - // This is *the* function required by RS plugin system to give RS access to the plugin. + // This is *the* functions required by RS plugin system to give RS access to the plugin. // Be careful to: // - always respect the C linkage convention // - always return an object of type RsPlugin* @@ -31,13 +32,19 @@ extern "C" { return (void*)p ; } + + // This symbol contains the svn revision number grabbed from the executable. + // It will be tested by RS to load the plugin automatically, since it is safe to load plugins + // with same revision numbers, assuming that the revision numbers are up-to-date. + // + uint32_t RETROSHARE_PLUGIN_revision = SVN_REVISION_NUMBER ; } void VOIPPlugin::getPluginVersion(int& major,int& minor,int& svn_rev) const { major = 5 ; - minor = 1 ; - svn_rev = 4350 ; + minor = 3 ; + svn_rev = SVN_REVISION_NUMBER ; } VOIPPlugin::VOIPPlugin() @@ -67,6 +74,30 @@ ConfigPage *VOIPPlugin::qt_config_page() const return new AudioInputConfig() ; } +QDialog *VOIPPlugin::qt_about_page() const +{ + static QMessageBox *about_dialog = NULL ; + + if(about_dialog == NULL) + { + about_dialog = new QMessageBox() ; + + QString text ; + text += QObject::tr("

RetroShare VOIP plugin


* Contributors: Cyril Soler, Josselin Jacquard
") ; + text += QObject::tr("
The VOIP plugin adds VOIP to the private chat window of RetroShare. to use it, proceed as follows:
    ") ; + text += QObject::tr("
  • setup microphone levels using the configuration panel
  • ") ; + text += QObject::tr("
  • check your microphone by looking at the VU-metters
  • ") ; + text += QObject::tr("
  • in the private chat, enable sound input/output by clicking on the two VOIP icons
") ; + text += QObject::tr("Your friend needs to run the plugin to talk/listen to you, or course.") ; + text += QObject::tr("

This is an experimental feature. Don't hesitate to send comments and suggestion to the RS dev team.") ; + + about_dialog->setText(text) ; + about_dialog->setStandardButtons(QMessageBox::Ok) ; + } + + return about_dialog ; +} + PopupChatDialog *VOIPPlugin::qt_allocate_new_popup_chat_dialog() const { AudioPopupChatDialog *ap = new AudioPopupChatDialog() ; diff --git a/plugins/VOIP/VOIPPlugin.h b/plugins/VOIP/VOIPPlugin.h index 4fbdf625f..d63d97e47 100644 --- a/plugins/VOIP/VOIPPlugin.h +++ b/plugins/VOIP/VOIPPlugin.h @@ -15,6 +15,7 @@ class VOIPPlugin: public RsPlugin virtual RsPQIService *rs_pqi_service() const ; virtual uint16_t rs_service_id() const { return RS_SERVICE_TYPE_VOIP_PLUGIN ; } virtual ConfigPage *qt_config_page() const ; + virtual QDialog *qt_about_page() const ; virtual RsAutoUpdatePage *qt_transfers_tab() const ; virtual std::string qt_transfers_tab_name() const ; virtual PopupChatDialog *qt_allocate_new_popup_chat_dialog() const ;