changed stereo reverberation behaviour: now the channel selection radio buttons are invisible in case of stereo since they are not used in that mode anyway
This commit is contained in:
parent
7362dae229
commit
e873a70047
2 changed files with 24 additions and 47 deletions
|
@ -251,11 +251,7 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP,
|
|||
SliderAudReverb->setValue ( iCurAudReverb );
|
||||
SliderAudReverb->setTickInterval ( AUD_REVERB_MAX / 5 );
|
||||
|
||||
|
||||
// set radio buttons ---
|
||||
// reverb channel
|
||||
RevSelectionButtonGroup.addButton ( RadioButtonRevSelL );
|
||||
RevSelectionButtonGroup.addButton ( RadioButtonRevSelR );
|
||||
// init reverb channel
|
||||
UpdateRevSelection();
|
||||
|
||||
|
||||
|
@ -335,9 +331,11 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP,
|
|||
this, SLOT ( OnSliderAudReverb ( int ) ) );
|
||||
|
||||
// radio buttons
|
||||
QObject::connect ( &RevSelectionButtonGroup,
|
||||
SIGNAL ( buttonClicked ( QAbstractButton* ) ), this,
|
||||
SLOT ( OnRevSelectionButtonGroupClicked ( QAbstractButton* ) ) );
|
||||
QObject::connect ( RadioButtonRevSelL, SIGNAL ( clicked() ),
|
||||
this, SLOT ( OnRevSelL() ) );
|
||||
|
||||
QObject::connect ( RadioButtonRevSelR, SIGNAL ( clicked() ),
|
||||
this, SLOT ( OnRevSelR() ) );
|
||||
|
||||
// line edits
|
||||
QObject::connect ( LineEditFaderTag, SIGNAL ( textChanged ( const QString& ) ),
|
||||
|
@ -446,32 +444,26 @@ void CLlconClientDlg::UpdateRevSelection()
|
|||
{
|
||||
if ( pClient->GetUseStereo() )
|
||||
{
|
||||
// for stereo set both channels checked and disable all settings
|
||||
RevSelectionButtonGroup.setExclusive ( false );
|
||||
|
||||
// to be able to set both checks, exclusive has to be disabled
|
||||
RadioButtonRevSelL->setChecked ( true );
|
||||
RadioButtonRevSelR->setChecked ( true );
|
||||
|
||||
// enable exclusive again, since this is required for mono mode
|
||||
RevSelectionButtonGroup.setExclusive ( true );
|
||||
|
||||
// the user shall not modify the radio buttons in stereo mode
|
||||
RadioButtonRevSelL->setEnabled ( false );
|
||||
RadioButtonRevSelR->setEnabled ( false );
|
||||
// for stereo make channel selection invisible since
|
||||
// reverberation effect is always applied to both channels
|
||||
RadioButtonRevSelL->setVisible ( false );
|
||||
RadioButtonRevSelR->setVisible ( false );
|
||||
}
|
||||
else
|
||||
{
|
||||
// mono case, enable all radio buttons and set to current value
|
||||
RadioButtonRevSelL->setEnabled ( true );
|
||||
RadioButtonRevSelR->setEnabled ( true );
|
||||
// make radio buttons visible
|
||||
RadioButtonRevSelL->setVisible ( true );
|
||||
RadioButtonRevSelR->setVisible ( true );
|
||||
|
||||
// first reset and then set correct selection
|
||||
RadioButtonRevSelL->setChecked ( false );
|
||||
RadioButtonRevSelR->setChecked ( false );
|
||||
|
||||
RadioButtonRevSelL->setChecked ( pClient->IsReverbOnLeftChan() );
|
||||
RadioButtonRevSelR->setChecked ( !pClient->IsReverbOnLeftChan() );
|
||||
// update value
|
||||
if ( pClient->IsReverbOnLeftChan() )
|
||||
{
|
||||
RadioButtonRevSelL->setChecked ( true );
|
||||
}
|
||||
else
|
||||
{
|
||||
RadioButtonRevSelR->setChecked ( true );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -564,19 +556,6 @@ void CLlconClientDlg::OnNumClientsChanged ( int iNewNumClients )
|
|||
SetMyWindowTitle ( iNewNumClients );
|
||||
}
|
||||
|
||||
void CLlconClientDlg::OnRevSelectionButtonGroupClicked ( QAbstractButton* button )
|
||||
{
|
||||
if ( button == RadioButtonRevSelL )
|
||||
{
|
||||
pClient->SetReverbOnLeftChan ( true );
|
||||
}
|
||||
|
||||
if ( button == RadioButtonRevSelR )
|
||||
{
|
||||
pClient->SetReverbOnLeftChan ( false );
|
||||
}
|
||||
}
|
||||
|
||||
void CLlconClientDlg::SetMyWindowTitle ( const int iNumClients )
|
||||
{
|
||||
// show number of connected clients in window title (and therefore also in
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#include <qtimer.h>
|
||||
#include <qslider.h>
|
||||
#include <qradiobutton.h>
|
||||
#include <qbuttongroup.h>
|
||||
#include <qmenubar.h>
|
||||
#include <qlayout.h>
|
||||
#include "global.h"
|
||||
|
@ -96,8 +95,6 @@ protected:
|
|||
QMenu* pViewMenu;
|
||||
QMenuBar* pMenu;
|
||||
|
||||
QButtonGroup RevSelectionButtonGroup;
|
||||
|
||||
CClientSettingsDlg ClientSettingsDlg;
|
||||
CChatDlg ChatDlg;
|
||||
|
||||
|
@ -109,7 +106,8 @@ public slots:
|
|||
void OnOpenChatDialog() { ShowChatWindow(); }
|
||||
void OnSliderAudInFader ( int value );
|
||||
void OnSliderAudReverb ( int value ) { pClient->SetReverbLevel ( value ); }
|
||||
void OnRevSelectionButtonGroupClicked ( QAbstractButton* button );
|
||||
void OnRevSelL() { pClient->SetReverbOnLeftChan ( true ); }
|
||||
void OnRevSelR() { pClient->SetReverbOnLeftChan ( false ); }
|
||||
void OnConClientListMesReceived ( CVector<CChannelShortInfo> vecChanInfo );
|
||||
void OnChangeChanGain ( int iId, double dGain )
|
||||
{ pClient->SetRemoteChanGain ( iId, dGain ); }
|
||||
|
|
Loading…
Reference in a new issue