Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Jamulus.pro
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,10 @@ DISTFILES += ChangeLog \
src/res/CLEDRedSmall.png \
src/res/CLEDYellow.png \
src/res/CLEDYellowSmall.png \
src/res/LEDBlackSmall.png \
src/res/LEDGreenSmall.png \
src/res/LEDRedSmall.png \
src/res/LEDYellowSmall.png \
src/res/IndicatorGreen.png \
src/res/IndicatorYellow.png \
src/res/IndicatorRed.png \
Expand Down
60 changes: 51 additions & 9 deletions src/audiomixerboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,28 +219,24 @@ void CChannelFader::SetGUIDesign ( const EGUIDesign eNewDesign )

pLabelGrid->addWidget ( plblLabel, 0, Qt::AlignVCenter ); // label next to icons
pLabelInstBox->setMinimumHeight ( 52 ); // maximum height of the instrument+flag pictures
pFader->setMinimumHeight ( 120 ); // if this value is too small, the fader might not be movable with the mouse for fancy skin (#292)
pPan->setFixedSize ( 50, 50 );
pPanLabel->setText ( tr ( "PAN" ) );
pcbMute->setText ( tr ( "MUTE" ) );
pcbSolo->setText ( tr ( "SOLO" ) );
strGroupBaseText = tr ( "GRP" );
plbrChannelLevel->SetLevelMeterType ( CLevelMeter::MT_LED );
strGroupBaseText = tr ( "GRP" );
iInstrPicMaxWidth = INVALID_INDEX; // no instrument picture scaling
break;

case GD_SLIMFADER:
pLabelPictGrid->addWidget ( plblLabel, 0, Qt::AlignHCenter ); // label below icons
pLabelInstBox->setMinimumHeight ( 130 ); // maximum height of the instrument+flag+label
pFader->setMinimumHeight ( 85 );
pPan->setFixedSize ( 28, 28 );
pFader->setTickPosition ( QSlider::NoTicks );
pFader->setStyleSheet ( "" );
pPanLabel->setText ( tr ( "Pan" ) );
pcbMute->setText ( tr ( "M" ) );
pcbSolo->setText ( tr ( "S" ) );
strGroupBaseText = tr ( "G" );
plbrChannelLevel->SetLevelMeterType ( CLevelMeter::MT_SLIM_BAR );
strGroupBaseText = tr ( "G" );
iInstrPicMaxWidth = 18; // scale instrument picture to avoid enlarging the width by the picture
break;

Expand All @@ -250,13 +246,11 @@ void CChannelFader::SetGUIDesign ( const EGUIDesign eNewDesign )
pFader->setStyleSheet ( "" );
pLabelGrid->addWidget ( plblLabel, 0, Qt::AlignVCenter ); // label next to icons
pLabelInstBox->setMinimumHeight ( 52 ); // maximum height of the instrument+flag pictures
pFader->setMinimumHeight ( 85 );
pPan->setFixedSize ( 50, 50 );
pPanLabel->setText ( tr ( "Pan" ) );
pcbMute->setText ( tr ( "Mute" ) );
pcbSolo->setText ( tr ( "Solo" ) );
strGroupBaseText = tr ( "Grp" );
plbrChannelLevel->SetLevelMeterType ( CLevelMeter::MT_BAR );
strGroupBaseText = tr ( "Grp" );
iInstrPicMaxWidth = INVALID_INDEX; // no instrument picture scaling
break;
}
Expand All @@ -268,6 +262,45 @@ void CChannelFader::SetGUIDesign ( const EGUIDesign eNewDesign )
SetChannelInfos ( cReceivedChanInfo );
}

void CChannelFader::SetMeterStyle ( const EMeterStyle eNewMeterStyle )
{
eMeterStyle = eNewMeterStyle;

switch ( eNewMeterStyle )
{
case MT_BAR:
plbrChannelLevel->SetLevelMeterType ( CLevelMeter::MT_BAR );
// Fader height controls the distribution of the LEDs, if the value is too small the fader might not be movable
pFader->setMinimumHeight ( 120 );
break;

case MT_SLIM_BAR:
plbrChannelLevel->SetLevelMeterType ( CLevelMeter::MT_SLIM_BAR );
// Fader height controls the distribution of the LEDs, if the value is too small the fader might not be movable
pFader->setMinimumHeight ( 85 );
break;

case MT_SLIM_LED:
plbrChannelLevel->SetLevelMeterType ( CLevelMeter::MT_SLIM_LED );
// Fader height controls the distribution of the LEDs, if the value is too small the fader might not be movable
pFader->setMinimumHeight ( 162 );
break;

case MT_SMALL_LED:
plbrChannelLevel->SetLevelMeterType ( CLevelMeter::MT_SMALL_LED );
// Fader height controls the distribution of the LEDs, if the value is too small the fader might not be movable
pFader->setMinimumHeight ( 85 );
break;

default:
// reset style sheet and set original parameters
plbrChannelLevel->SetLevelMeterType ( CLevelMeter::MT_LED );
// Fader height controls the distribution of the LEDs, if the value is too small the fader might not be movable
pFader->setMinimumHeight ( 120 );
break;
}
}

void CChannelFader::SetDisplayChannelLevel ( const bool eNDCL ) { plbrChannelLevel->setHidden ( !eNDCL ); }

bool CChannelFader::GetDisplayChannelLevel() { return !plbrChannelLevel->isHidden(); }
Expand Down Expand Up @@ -952,6 +985,15 @@ void CAudioMixerBoard::SetGUIDesign ( const EGUIDesign eNewDesign )
}
}

void CAudioMixerBoard::SetMeterStyle ( const EMeterStyle eNewMeterStyle )
{
// apply GUI design to child GUI controls
for ( int i = 0; i < MAX_NUM_CHANNELS; i++ )
{
vecpChanFader[i]->SetMeterStyle ( eNewMeterStyle );
}
}

void CAudioMixerBoard::SetDisplayPans ( const bool eNDP )
{
bDisplayPans = eNDP;
Expand Down
23 changes: 13 additions & 10 deletions src/audiomixerboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class CChannelFader : public QObject
bool IsMute() { return pcbMute->isChecked(); }
int GetGroupID() { return iGroupID; }
void SetGUIDesign ( const EGUIDesign eNewDesign );
void SetMeterStyle ( const EMeterStyle eNewMeterStyle );
void SetDisplayChannelLevel ( const bool eNDCL );
bool GetDisplayChannelLevel();
void SetDisplayPans ( const bool eNDP );
Expand Down Expand Up @@ -115,16 +116,17 @@ class CChannelFader : public QObject

CChannelInfo cReceivedChanInfo;

bool bOtherChannelIsSolo;
bool bIsMyOwnFader;
bool bIsMutedAtServer;
double dPreviousFaderLevel;
int iGroupID;
QString strGroupBaseText;
int iRunningNewClientCnt;
int iInstrPicMaxWidth;
EGUIDesign eDesign;
QPixmap BitmapMutedIcon;
bool bOtherChannelIsSolo;
bool bIsMyOwnFader;
bool bIsMutedAtServer;
double dPreviousFaderLevel;
int iGroupID;
QString strGroupBaseText;
int iRunningNewClientCnt;
int iInstrPicMaxWidth;
EGUIDesign eDesign;
EMeterStyle eMeterStyle;
QPixmap BitmapMutedIcon;

public slots:
void OnLevelValueChanged ( int value )
Expand Down Expand Up @@ -188,6 +190,7 @@ class CAudioMixerBoard : public QGroupBox, public CAudioMixerBoardSlots<MAX_NUM_
void SetServerName ( const QString& strNewServerName );
QString GetServerName() { return strServerName; }
void SetGUIDesign ( const EGUIDesign eNewDesign );
void SetMeterStyle ( const EMeterStyle eNewMeterStyle );
void SetDisplayPans ( const bool eNDP );
void SetPanIsSupported();
void SetRemoteFaderIsMute ( const int iChannelIdx, const bool bIsMute );
Expand Down
1 change: 1 addition & 0 deletions src/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ CClient::CClient ( const quint16 iPortNumber,
bFraSiFactDefSupported ( false ),
bFraSiFactSafeSupported ( false ),
eGUIDesign ( GD_ORIGINAL ),
eMeterStyle ( MT_LED ),
bEnableOPUS64 ( false ),
bJitterBufferOK ( true ),
bNuteMeInPersonalMix ( bNMuteMeInPersonalMix ),
Expand Down
8 changes: 6 additions & 2 deletions src/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ class CClient : public QObject
EGUIDesign GetGUIDesign() const { return eGUIDesign; }
void SetGUIDesign ( const EGUIDesign eNGD ) { eGUIDesign = eNGD; }

EMeterStyle GetMeterStyle() const { return eMeterStyle; }
void SetMeterStyle ( const EMeterStyle eNMT ) { eMeterStyle = eNMT; }

EAudioQuality GetAudioQuality() const { return eAudioQuality; }
void SetAudioQuality ( const EAudioQuality eNAudioQuality );

Expand Down Expand Up @@ -343,8 +346,9 @@ class CClient : public QObject
int iMonoBlockSizeSam;
int iStereoBlockSizeSam;

EGUIDesign eGUIDesign;
bool bEnableOPUS64;
EGUIDesign eGUIDesign;
EMeterStyle eMeterStyle;
bool bEnableOPUS64;

bool bJitterBufferOK;
bool bNuteMeInPersonalMix;
Expand Down
46 changes: 42 additions & 4 deletions src/clientdlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ CClientDlg::CClientDlg ( CClient* pNCliP,
// init GUI design
SetGUIDesign ( pClient->GetGUIDesign() );

// MeterStyle init
SetMeterStyle ( pClient->GetMeterStyle() );

// set the settings pointer to the mixer board (must be done early)
MainMixerBoard->SetSettingsPointer ( pSettings );
MainMixerBoard->SetNumMixerPanelRows ( pSettings->iNumMixerPanelRows );
Expand Down Expand Up @@ -491,6 +494,8 @@ CClientDlg::CClientDlg ( CClient* pNCliP,

QObject::connect ( &ClientSettingsDlg, &CClientSettingsDlg::GUIDesignChanged, this, &CClientDlg::OnGUIDesignChanged );

QObject::connect ( &ClientSettingsDlg, &CClientSettingsDlg::MeterStyleChanged, this, &CClientDlg::OnMeterStyleChanged );

QObject::connect ( &ClientSettingsDlg, &CClientSettingsDlg::AudioChannelsChanged, this, &CClientDlg::OnAudioChannelsChanged );

QObject::connect ( &ClientSettingsDlg,
Expand Down Expand Up @@ -1338,8 +1343,6 @@ void CClientDlg::SetGUIDesign ( const EGUIDesign eNewDesign )
"font: bold;" );
#endif

lbrInputLevelL->SetLevelMeterType ( CLevelMeter::MT_LED );
lbrInputLevelR->SetLevelMeterType ( CLevelMeter::MT_LED );
ledBuffers->SetType ( CMultiColorLED::MT_LED );
ledDelay->SetType ( CMultiColorLED::MT_LED );
break;
Expand All @@ -1354,8 +1357,6 @@ void CClientDlg::SetGUIDesign ( const EGUIDesign eNewDesign )
rbtReverbSelR->setStyleSheet ( "" );
#endif

lbrInputLevelL->SetLevelMeterType ( CLevelMeter::MT_BAR );
lbrInputLevelR->SetLevelMeterType ( CLevelMeter::MT_BAR );
ledBuffers->SetType ( CMultiColorLED::MT_INDICATOR );
ledDelay->SetType ( CMultiColorLED::MT_INDICATOR );
break;
Expand All @@ -1365,6 +1366,41 @@ void CClientDlg::SetGUIDesign ( const EGUIDesign eNewDesign )
MainMixerBoard->SetGUIDesign ( eNewDesign );
}

void CClientDlg::SetMeterStyle ( const EMeterStyle eNewMeterStyle )
{
// apply MeterStyle to current window
switch ( eNewMeterStyle )
{
case MT_LED:
lbrInputLevelL->SetLevelMeterType ( CLevelMeter::MT_LED );
lbrInputLevelR->SetLevelMeterType ( CLevelMeter::MT_LED );
break;

case MT_SLIM_LED:
lbrInputLevelL->SetLevelMeterType ( CLevelMeter::MT_SLIM_LED );
lbrInputLevelR->SetLevelMeterType ( CLevelMeter::MT_SLIM_LED );
break;

case MT_BAR:
lbrInputLevelL->SetLevelMeterType ( CLevelMeter::MT_BAR );
lbrInputLevelR->SetLevelMeterType ( CLevelMeter::MT_BAR );
break;

case MT_SLIM_BAR:
lbrInputLevelL->SetLevelMeterType ( CLevelMeter::MT_BAR );
lbrInputLevelR->SetLevelMeterType ( CLevelMeter::MT_BAR );
break;

case MT_SMALL_LED:
lbrInputLevelL->SetLevelMeterType ( CLevelMeter::MT_SLIM_LED );
lbrInputLevelR->SetLevelMeterType ( CLevelMeter::MT_SLIM_LED );
break;
}

// also apply MeterStyle to child GUI controls
MainMixerBoard->SetMeterStyle ( eNewMeterStyle );
}

void CClientDlg::OnRecorderStateReceived ( const ERecorderState newRecorderState )
{
MainMixerBoard->SetRecorderState ( newRecorderState );
Expand All @@ -1377,6 +1413,8 @@ void CClientDlg::OnGUIDesignChanged()
SetMixerBoardDeco ( MainMixerBoard->GetRecorderState(), pClient->GetGUIDesign() );
}

void CClientDlg::OnMeterStyleChanged() { SetMeterStyle ( pClient->GetMeterStyle() ); }

void CClientDlg::SetMixerBoardDeco ( const ERecorderState newRecorderState, const EGUIDesign eNewDesign )
{
// return if no change
Expand Down
2 changes: 2 additions & 0 deletions src/clientdlg.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ class CClientDlg : public CBaseDlg, private Ui_CClientDlgBase

protected:
void SetGUIDesign ( const EGUIDesign eNewDesign );
void SetMeterStyle ( const EMeterStyle eNewMeterStyle );
void SetMyWindowTitle ( const int iNumClients );
void ShowConnectionSetupDialog();
void ShowGeneralSettings ( int iTab );
Expand Down Expand Up @@ -224,6 +225,7 @@ public slots:
void OnConnectDlgAccepted();
void OnDisconnected() { Disconnect(); }
void OnGUIDesignChanged();
void OnMeterStyleChanged();
void OnRecorderStateReceived ( ERecorderState eRecorderState );
void SetMixerBoardDeco ( const ERecorderState newRecorderState, const EGUIDesign eNewDesign );
void OnAudioChannelsChanged() { UpdateRevSelection(); }
Expand Down
31 changes: 31 additions & 0 deletions src/clientsettingsdlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,16 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, CClientSettings* pNSet

cbxSkin->setAccessibleName ( tr ( "Skin combo box" ) );

// MeterStyle
lblMeterStyle->setWhatsThis ( "<b>" + tr ( "Meter Style" ) + ":</b> " +
tr ( "Select the meter style to be used for the level meters. The "
"Narrow Bar and Small LEDs options only apply to the mixerboard. When "
"Narrow Bar is selected, the input meters are set to Bar. When "
"Small LEDs is selected, the input meters are set to Round LEDs. "
"The remaining options apply to the mixerboard and input meters." ) );

cbxMeterStyle->setAccessibleName ( tr ( "Meter Style combo box" ) );

// Interface Language
lblLanguage->setWhatsThis ( "<b>" + tr ( "Language" ) + ":</b> " + tr ( "Select the language to be used for the user interface." ) );

Expand Down Expand Up @@ -404,6 +414,15 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, CClientSettings* pNSet
cbxSkin->addItem ( tr ( "Compact" ) ); // GD_SLIMFADER
cbxSkin->setCurrentIndex ( static_cast<int> ( pClient->GetGUIDesign() ) );

// MeterStyle combo box
cbxMeterStyle->clear();
cbxMeterStyle->addItem ( tr ( "LEDs" ) ); // MT_LED
cbxMeterStyle->addItem ( tr ( "Bar" ) ); // MT_BAR
cbxMeterStyle->addItem ( tr ( "Narrow Bar" ) ); // MT_SLIM_BAR
cbxMeterStyle->addItem ( tr ( "Round LEDs" ) ); // MT_SLIM_LED
cbxMeterStyle->addItem ( tr ( "Small LEDs" ) ); // MT_SMALL_LED
cbxMeterStyle->setCurrentIndex ( static_cast<int> ( pClient->GetMeterStyle() ) );

// language combo box (corrects the setting if language not found)
cbxLanguage->Init ( pSettings->strLanguage );

Expand Down Expand Up @@ -624,6 +643,11 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, CClientSettings* pNSet
this,
&CClientSettingsDlg::OnGUIDesignActivated );

QObject::connect ( cbxMeterStyle,
static_cast<void ( QComboBox::* ) ( int )> ( &QComboBox::activated ),
this,
&CClientSettingsDlg::OnMeterStyleActivated );

QObject::connect ( cbxCentralServerAddress->lineEdit(),
&QLineEdit::editingFinished,
this,
Expand Down Expand Up @@ -917,6 +941,13 @@ void CClientSettingsDlg::OnGUIDesignActivated ( int iDesignIdx )
UpdateDisplay();
}

void CClientSettingsDlg::OnMeterStyleActivated ( int iMeterStyleIdx )
{
pClient->SetMeterStyle ( static_cast<EMeterStyle> ( iMeterStyleIdx ) );
emit MeterStyleChanged();
UpdateDisplay();
}

void CClientSettingsDlg::OnAutoJitBufStateChanged ( int value )
{
pClient->SetDoAutoSockBufSize ( value == Qt::Checked );
Expand Down
2 changes: 2 additions & 0 deletions src/clientsettingsdlg.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ public slots:
void OnAudioChannelsActivated ( int iChanIdx );
void OnAudioQualityActivated ( int iQualityIdx );
void OnGUIDesignActivated ( int iDesignIdx );
void OnMeterStyleActivated ( int iMeterStyleIdx );
void OnDriverSetupClicked();
void OnLanguageChanged ( QString strLanguage ) { pSettings->strLanguage = strLanguage; }
void OnAliasTextChanged ( const QString& strNewName );
Expand All @@ -108,6 +109,7 @@ public slots:

signals:
void GUIDesignChanged();
void MeterStyleChanged();
void AudioChannelsChanged();
void CustomCentralServerAddrChanged();
void NumMixerPanelRowsChanged ( int value );
Expand Down
Loading