fixes for the QT4 slider controls

This commit is contained in:
Volker Fischer 2008-02-02 09:35:58 +00:00
parent cfa6891b5b
commit 2b47659346
5 changed files with 14 additions and 17 deletions

View file

@ -73,9 +73,8 @@ CChannelFader::CChannelFader ( QWidget* pNW,
void CChannelFader::OnValueChanged ( int value )
{
// convert actual slider range in gain values
// reverse linear scale and normalize so that maximum gain is 1
const double dCurGain =
static_cast<double> ( AUD_MIX_FADER_MAX - value ) / AUD_MIX_FADER_MAX;
// and normalize so that maximum gain is 1
const double dCurGain = static_cast<double> ( value ) / AUD_MIX_FADER_MAX;
emit valueChanged ( dCurGain );
}

View file

@ -65,7 +65,7 @@ public:
bool IsVisible() { return pLabel->isVisible(); }
// init gain value -> maximum value as definition according to server
void ResetGain() { pFader->setValue ( 0 ); }
void ResetGain() { pFader->setValue ( AUD_MIX_FADER_MAX ); }
protected:
QGridLayout* pMainGrid;

View file

@ -176,6 +176,7 @@ void CClient::run()
#ifdef _WIN32
SetThreadPriority ( GetCurrentThread(), THREAD_PRIORITY_ABOVE_NORMAL );
#else
/*
// set the process to realtime privs, taken from
// "http://www.gardena.net/benno/linux/audio" but does not seem to work,
// maybe a problem with user rights
@ -183,6 +184,7 @@ void CClient::run()
memset ( &schp, 0, sizeof ( schp ) );
schp.sched_priority = sched_get_priority_max ( SCHED_FIFO );
sched_setscheduler ( 0, SCHED_FIFO, &schp );
*/
#endif
// init object

View file

@ -121,7 +121,7 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP, QWidget* parent )
// audio reverberation
SliderAudReverb->setRange ( 0, AUD_REVERB_MAX );
const int iCurAudReverb = pClient->GetReverbLevel();
SliderAudReverb->setValue ( AUD_REVERB_MAX - iCurAudReverb );
SliderAudReverb->setValue ( iCurAudReverb );
SliderAudReverb->setTickInterval ( AUD_REVERB_MAX / 9 );
@ -244,11 +244,8 @@ void CLlconClientDlg::OnConnectDisconBut()
// set address and check if address is valid
if ( pClient->SetServerAddr ( LineEditServerAddr->text() ) )
{
#if ( QT_VERSION > 300 )
pClient->start ( QThread::TimeCriticalPriority );
#else
pClient->start();
#endif
PushButtonConnect->setText ( CON_BUT_DISCONNECTTEXT );
// start timer for level meter bar

View file

@ -91,11 +91,10 @@ public slots:
void OnTimerSigMet();
void OnTimerStatus() { UpdateDisplay(); }
void OnOpenGeneralSettings();
void OnSliderAudInFader ( int value ) { pClient->SetAudioInFader(value); }
void OnSliderAudReverb ( int value )
{ pClient->SetReverbLevel ( AUD_REVERB_MAX - value ); }
void OnRevSelL() { pClient->SetReverbOnLeftChan(true); }
void OnRevSelR() { pClient->SetReverbOnLeftChan(false); }
void OnSliderAudInFader ( int value ) { pClient->SetAudioInFader ( value ); }
void OnSliderAudReverb ( int value ) { pClient->SetReverbLevel ( value ); }
void OnRevSelL() { pClient->SetReverbOnLeftChan ( true ); }
void OnRevSelR() { pClient->SetReverbOnLeftChan ( false ); }
void OnConClientListMesReceived ( CVector<CChannelShortInfo> vecChanInfo )
{ MainMixerBoard->ApplyNewConClientList ( vecChanInfo ); }
void OnChangeChanGain ( int iId, double dGain )