mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-11 17:04:31 -05:00
renamed AudioInputConfig into VOIPConfigPanel
This commit is contained in:
parent
0de9c877b8
commit
c4fbd3a4f5
@ -86,9 +86,9 @@ QMAKE_CXXFLAGS += -D__STDC_CONSTANT_MACROS
|
||||
QMAKE_CXXFLAGS *= -Wall
|
||||
|
||||
SOURCES = VOIPPlugin.cpp \
|
||||
gui/VOIPConfigPanel.cpp \
|
||||
services/p3VOIP.cc \
|
||||
services/rsVOIPItems.cc \
|
||||
gui/AudioInputConfig.cpp \
|
||||
gui/AudioStats.cpp \
|
||||
gui/AudioWizard.cpp \
|
||||
gui/SpeexProcessor.cpp \
|
||||
@ -102,9 +102,9 @@ SOURCES = VOIPPlugin.cpp \
|
||||
gui/VOIPToasterNotify.cpp
|
||||
|
||||
HEADERS = VOIPPlugin.h \
|
||||
gui/VOIPConfigPanel.h \
|
||||
services/p3VOIP.h \
|
||||
services/rsVOIPItems.h \
|
||||
gui/AudioInputConfig.h \
|
||||
gui/AudioStats.h \
|
||||
gui/AudioWizard.h \
|
||||
gui/SpeexProcessor.h \
|
||||
@ -118,9 +118,10 @@ HEADERS = VOIPPlugin.h \
|
||||
gui/VOIPToasterNotify.h \
|
||||
interface/rsVOIP.h
|
||||
|
||||
FORMS = gui/AudioInputConfig.ui \
|
||||
FORMS = \
|
||||
gui/AudioStats.ui \
|
||||
gui/AudioWizard.ui \
|
||||
gui/VOIPConfigPanel.ui \
|
||||
gui/VOIPToasterItem.ui
|
||||
|
||||
TARGET = VOIP
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include "VOIPPlugin.h"
|
||||
#include "interface/rsVOIP.h"
|
||||
|
||||
#include "gui/AudioInputConfig.h"
|
||||
#include "gui/VOIPConfigPanel.h"
|
||||
#include "gui/VOIPChatWidgetHolder.h"
|
||||
#include "gui/VOIPGUIHandler.h"
|
||||
#include "gui/VOIPNotify.h"
|
||||
@ -112,7 +112,7 @@ ConfigPage *VOIPPlugin::qt_config_page() const
|
||||
// The config pages are deleted when config is closed, so it's important not to static the
|
||||
// created object.
|
||||
//
|
||||
return new AudioInputConfig() ;
|
||||
return new VOIPConfigPanel() ;
|
||||
}
|
||||
|
||||
QDialog *VOIPPlugin::qt_about_page() const
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <QPainter>
|
||||
|
||||
#include "AudioStats.h"
|
||||
#include "AudioInputConfig.h"
|
||||
#include "VOIPConfigPanel.h"
|
||||
//#include "Global.h"
|
||||
//#include "smallft.h"
|
||||
|
||||
|
@ -80,7 +80,7 @@ voipGraph::voipGraph(QWidget *parent)
|
||||
}
|
||||
|
||||
/** Constructor */
|
||||
AudioInputConfig::AudioInputConfig(QWidget * parent, Qt::WindowFlags flags)
|
||||
VOIPConfigPanel::VOIPConfigPanel(QWidget * parent, Qt::WindowFlags flags)
|
||||
: ConfigPage(parent, flags)
|
||||
{
|
||||
std::cerr << "Creating audioInputConfig object" << std::endl;
|
||||
@ -118,13 +118,13 @@ AudioInputConfig::AudioInputConfig(QWidget * parent, Qt::WindowFlags flags)
|
||||
QObject::connect(ui.availableBW_SB,SIGNAL(valueChanged(double)),this,SLOT(updateAvailableBW(double))) ;
|
||||
}
|
||||
|
||||
void AudioInputConfig::updateAvailableBW(double r)
|
||||
void VOIPConfigPanel::updateAvailableBW(double r)
|
||||
{
|
||||
std::cerr << "Setting max bandwidth to " << r << " KB/s" << std::endl;
|
||||
videoProcessor->setMaximumBandwidth((uint32_t)(r*1024)) ;
|
||||
}
|
||||
|
||||
void AudioInputConfig::togglePreview(bool b)
|
||||
void VOIPConfigPanel::togglePreview(bool b)
|
||||
{
|
||||
if(b)
|
||||
{
|
||||
@ -138,7 +138,7 @@ void AudioInputConfig::togglePreview(bool b)
|
||||
}
|
||||
}
|
||||
|
||||
AudioInputConfig::~AudioInputConfig()
|
||||
VOIPConfigPanel::~VOIPConfigPanel()
|
||||
{
|
||||
disconnect( qtTick, SIGNAL( timeout ( ) ), this, SLOT( on_Tick_timeout() ) );
|
||||
|
||||
@ -166,7 +166,7 @@ AudioInputConfig::~AudioInputConfig()
|
||||
}
|
||||
|
||||
/** Loads the settings for this page */
|
||||
void AudioInputConfig::load()
|
||||
void VOIPConfigPanel::load()
|
||||
{
|
||||
//connect( ui.allowIpDeterminationCB, SIGNAL( toggled( bool ) ), this, SLOT( toggleIpDetermination(bool) ) );
|
||||
//connect( ui.allowTunnelConnectionCB, SIGNAL( toggled( bool ) ), this, SLOT( toggleTunnelConnection(bool) ) );
|
||||
@ -199,7 +199,7 @@ void AudioInputConfig::load()
|
||||
}
|
||||
|
||||
|
||||
void AudioInputConfig::loadSettings() {
|
||||
void VOIPConfigPanel::loadSettings() {
|
||||
/*QList<QString> keys;
|
||||
|
||||
if (AudioInputRegistrar::qmNew)
|
||||
@ -258,7 +258,7 @@ void AudioInputConfig::loadSettings() {
|
||||
videoInput->start() ;
|
||||
}
|
||||
|
||||
bool AudioInputConfig::save(QString &/*errmsg*/) {//mainly useless beacause saving occurs in realtime
|
||||
bool VOIPConfigPanel::save(QString &/*errmsg*/) {//mainly useless beacause saving occurs in realtime
|
||||
//s.iQuality = qsQuality->value();
|
||||
rsVOIP->setVoipiNoiseSuppress((ui.qsNoise->value() == 14) ? 0 : - ui.qsNoise->value());
|
||||
rsVOIP->setVoipiMinLoudness(20000 - ui.qsAmp->value());
|
||||
@ -272,14 +272,14 @@ bool AudioInputConfig::save(QString &/*errmsg*/) {//mainly useless beacause savi
|
||||
return true;
|
||||
}
|
||||
|
||||
void AudioInputConfig::on_qsTransmitHold_valueChanged(int v) {
|
||||
void VOIPConfigPanel::on_qsTransmitHold_valueChanged(int v) {
|
||||
float val = static_cast<float>(v * FRAME_SIZE);
|
||||
val = val / SAMPLING_RATE;
|
||||
ui.qlTransmitHold->setText(tr("%1 s").arg(val, 0, 'f', 2));
|
||||
rsVOIP->setVoipVoiceHold(v);
|
||||
}
|
||||
|
||||
void AudioInputConfig::on_qsNoise_valueChanged(int v) {
|
||||
void VOIPConfigPanel::on_qsNoise_valueChanged(int v) {
|
||||
QPalette pal;
|
||||
|
||||
if (v < 15) {
|
||||
@ -292,19 +292,19 @@ void AudioInputConfig::on_qsNoise_valueChanged(int v) {
|
||||
rsVOIP->setVoipiNoiseSuppress(- ui.qsNoise->value());
|
||||
}
|
||||
|
||||
void AudioInputConfig::on_qsAmp_valueChanged(int v) {
|
||||
void VOIPConfigPanel::on_qsAmp_valueChanged(int v) {
|
||||
v = 20000 - v;
|
||||
float d = 20000.0f/static_cast<float>(v);
|
||||
ui.qlAmp->setText(QString::fromLatin1("%1").arg(d, 0, 'f', 2));
|
||||
rsVOIP->setVoipiMinLoudness(20000 - ui.qsAmp->value());
|
||||
}
|
||||
|
||||
void AudioInputConfig::on_qcbEchoCancel_clicked() {
|
||||
void VOIPConfigPanel::on_qcbEchoCancel_clicked() {
|
||||
rsVOIP->setVoipEchoCancel(ui.qcbEchoCancel->isChecked());
|
||||
}
|
||||
|
||||
|
||||
void AudioInputConfig::on_qcbTransmit_currentIndexChanged(int v) {
|
||||
void VOIPConfigPanel::on_qcbTransmit_currentIndexChanged(int v) {
|
||||
switch (v) {
|
||||
case 0:
|
||||
ui.qswTransmit->setCurrentWidget(ui.qwContinuous);
|
||||
@ -321,7 +321,7 @@ void AudioInputConfig::on_qcbTransmit_currentIndexChanged(int v) {
|
||||
}
|
||||
|
||||
|
||||
void AudioInputConfig::on_Tick_timeout()
|
||||
void VOIPConfigPanel::on_Tick_timeout()
|
||||
{
|
||||
if (!inputAudioProcessor)
|
||||
{
|
||||
@ -356,13 +356,13 @@ void AudioInputConfig::on_Tick_timeout()
|
||||
}
|
||||
}
|
||||
|
||||
void AudioInputConfig::emptyBuffer() {
|
||||
void VOIPConfigPanel::emptyBuffer() {
|
||||
while(inputAudioProcessor->hasPendingPackets()) {
|
||||
inputAudioProcessor->getNetworkPacket(); //that will purge the buffer
|
||||
}
|
||||
}
|
||||
|
||||
void AudioInputConfig::on_qpbAudioWizard_clicked() {
|
||||
void VOIPConfigPanel::on_qpbAudioWizard_clicked() {
|
||||
AudioWizard aw(this);
|
||||
aw.exec();
|
||||
loadSettings();
|
@ -48,7 +48,7 @@ private:
|
||||
|
||||
#include "ui_AudioInputConfig.h"
|
||||
|
||||
class AudioInputConfig : public ConfigPage
|
||||
class VOIPConfigPanel : public ConfigPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@ -72,9 +72,9 @@ class AudioInputConfig : public ConfigPage
|
||||
|
||||
public:
|
||||
/** Default Constructor */
|
||||
AudioInputConfig(QWidget * parent = 0, Qt::WindowFlags flags = 0);
|
||||
VOIPConfigPanel(QWidget * parent = 0, Qt::WindowFlags flags = 0);
|
||||
/** Default Destructor */
|
||||
~AudioInputConfig();
|
||||
~VOIPConfigPanel();
|
||||
|
||||
/** Saves the changes on this page */
|
||||
virtual bool save(QString &errmsg);
|
Loading…
Reference in New Issue
Block a user