in mono mode we should not show the Pan controls
This commit is contained in:
parent
0d6262edc4
commit
7324a29031
5 changed files with 27 additions and 12 deletions
|
@ -19,8 +19,6 @@
|
|||
- save client settings on Linux cmdline termination signal, coded by pljones (#70)
|
||||
|
||||
|
||||
TODO in mono mode we should not show the Pan controls
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -71,14 +71,14 @@ CChannelFader::CChannelFader ( QWidget* pNW,
|
|||
pFader->setMinimumHeight ( 75 );
|
||||
|
||||
// setup panning control
|
||||
pPan->setRange ( 0, AUD_MIX_PAN_MAX );
|
||||
pPan->setValue ( AUD_MIX_PAN_MAX / 2 );
|
||||
pPan->setFixedSize ( 55, 55 );
|
||||
pPan->setRange ( 0, AUD_MIX_PAN_MAX );
|
||||
pPan->setValue ( AUD_MIX_PAN_MAX / 2 );
|
||||
pPan->setFixedSize ( 50, 50 );
|
||||
pPan->setNotchesVisible ( true );
|
||||
pPanInfoGrid->addWidget ( pPanLabel, 0, Qt::AlignLeft );
|
||||
pPanInfoGrid->addWidget ( pPanLabel, 0, Qt::AlignLeft );
|
||||
pPanInfoGrid->addWidget ( pInfoLabel );
|
||||
pPanGrid->addLayout ( pPanInfoGrid );
|
||||
pPanGrid->addWidget ( pPan, 0, Qt::AlignHCenter );
|
||||
pPanGrid->addLayout ( pPanInfoGrid );
|
||||
pPanGrid->addWidget ( pPan, 0, Qt::AlignHCenter );
|
||||
|
||||
// setup fader tag label (black bold text which is centered)
|
||||
plblLabel->setTextFormat ( Qt::PlainText );
|
||||
|
@ -610,6 +610,8 @@ CAudioMixerBoard::CAudioMixerBoard ( QWidget* parent, Qt::WindowFlags ) :
|
|||
vecStoredFaderIsSolo ( MAX_NUM_STORED_FADER_SETTINGS, false ),
|
||||
vecStoredFaderIsMute ( MAX_NUM_STORED_FADER_SETTINGS, false ),
|
||||
iNewClientFaderLevel ( 100 ),
|
||||
bDisplayPans ( false ),
|
||||
bIsPanSupported ( false ),
|
||||
bNoFaderVisible ( true ),
|
||||
strServerName ( "" )
|
||||
{
|
||||
|
@ -721,14 +723,22 @@ void CAudioMixerBoard::SetDisplayChannelLevels ( const bool eNDCL )
|
|||
}
|
||||
}
|
||||
|
||||
void CAudioMixerBoard::SetPanIsSupported()
|
||||
void CAudioMixerBoard::SetDisplayPans ( const bool eNDP )
|
||||
{
|
||||
bDisplayPans = eNDP;
|
||||
|
||||
for ( int i = 0; i < MAX_NUM_CHANNELS; i++ )
|
||||
{
|
||||
vecpChanFader[i]->SetDisplayPans ( true );
|
||||
vecpChanFader[i]->SetDisplayPans ( eNDP && bIsPanSupported );
|
||||
}
|
||||
}
|
||||
|
||||
void CAudioMixerBoard::SetPanIsSupported()
|
||||
{
|
||||
bIsPanSupported = true;
|
||||
SetDisplayPans ( bDisplayPans );
|
||||
}
|
||||
|
||||
void CAudioMixerBoard::HideAll()
|
||||
{
|
||||
// make all controls invisible
|
||||
|
@ -743,7 +753,8 @@ void CAudioMixerBoard::HideAll()
|
|||
vecpChanFader[i]->Hide();
|
||||
}
|
||||
|
||||
// set flag
|
||||
// set flags
|
||||
bIsPanSupported = false;
|
||||
bNoFaderVisible = true;
|
||||
|
||||
// emit status of connected clients
|
||||
|
|
|
@ -144,6 +144,7 @@ public:
|
|||
void SetServerName ( const QString& strNewServerName );
|
||||
void SetGUIDesign ( const EGUIDesign eNewDesign );
|
||||
void SetDisplayChannelLevels ( const bool eNDCL );
|
||||
void SetDisplayPans ( const bool eNDP );
|
||||
void SetPanIsSupported();
|
||||
void SetRemoteFaderIsMute ( const int iChannelIdx, const bool bIsMute );
|
||||
|
||||
|
@ -192,6 +193,8 @@ protected:
|
|||
CMixerBoardScrollArea* pScrollArea;
|
||||
QHBoxLayout* pMainLayout;
|
||||
bool bDisplayChannelLevels;
|
||||
bool bDisplayPans;
|
||||
bool bIsPanSupported;
|
||||
bool bNoFaderVisible;
|
||||
QString strServerName;
|
||||
|
||||
|
|
|
@ -661,6 +661,9 @@ void CClientDlg::UpdateRevSelection()
|
|||
rbtReverbSelR->setChecked ( true );
|
||||
}
|
||||
}
|
||||
|
||||
// update visibility of the pan controls in the audio mixer board (pan is not supported for mono)
|
||||
MainMixerBoard->SetDisplayPans ( pClient->GetAudioChannels() != CC_MONO );
|
||||
}
|
||||
|
||||
void CClientDlg::OnAudioPanValueChanged ( int value )
|
||||
|
|
|
@ -82,7 +82,7 @@ void CSettings::Load()
|
|||
{
|
||||
if ( GetNumericIniSet ( IniXMLDocument, "client",
|
||||
QString ( "storedpanvalue%1" ).arg ( iIdx ),
|
||||
0, AUD_MIX_PAN_MAX/2, iValue ) )
|
||||
0, AUD_MIX_PAN_MAX, iValue ) )
|
||||
{
|
||||
pClient->vecStoredPanValues[iIdx] = iValue;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue