From e4b01fa39511ac3931e37679992185366ef14a54 Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Sat, 13 Jun 2020 08:31:28 +0200 Subject: [PATCH] prepare for pull request: #356 --- src/audiomixerboard.cpp | 12 ++++++------ src/audiomixerboard.h | 5 +++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/audiomixerboard.cpp b/src/audiomixerboard.cpp index 127711e6..5753cbab 100644 --- a/src/audiomixerboard.cpp +++ b/src/audiomixerboard.cpp @@ -314,7 +314,7 @@ void CChannelFader::Reset() plblInstrument->setToolTip ( "" ); plblCountryFlag->setVisible ( false ); plblCountryFlag->setToolTip ( "" ); - strReceivedName = ""; + cReceivedChanInfo = CChannelInfo(); SetupFaderTag ( SL_NOT_SET ); // set a defined tool tip time out @@ -438,15 +438,15 @@ void CChannelFader::SetChannelLevel ( const uint16_t iLevel ) void CChannelFader::SetChannelInfos ( const CChannelInfo& cChanInfo ) { + // store received channel info + cReceivedChanInfo = cChanInfo; + // init properties for the tool tip int iTTInstrument = CInstPictures::GetNotUsedInstrument(); QLocale::Country eTTCountry = QLocale::AnyCountry; // Label text -------------------------------------------------------------- - // store original received name - strReceivedName = cChanInfo.strName; - // break text at predefined position const int iBreakPos = MAX_LEN_FADER_TAG / 2; @@ -521,9 +521,9 @@ void CChannelFader::SetChannelInfos ( const CChannelInfo& cChanInfo ) QString strToolTip = ""; // alias/name - if ( !strReceivedName.isEmpty() ) + if ( !cChanInfo.strName.isEmpty() ) { - strToolTip += "

" + tr ( "Alias/Name" ) + "

" + strReceivedName; + strToolTip += "

" + tr ( "Alias/Name" ) + "

" + cChanInfo.strName; } // instrument diff --git a/src/audiomixerboard.h b/src/audiomixerboard.h index 1e955ccd..09aeffad 100644 --- a/src/audiomixerboard.h +++ b/src/audiomixerboard.h @@ -49,7 +49,8 @@ class CChannelFader : public QObject public: CChannelFader ( QWidget* pNW ); - QString GetReceivedName() { return strReceivedName; } + QString GetReceivedName() { return cReceivedChanInfo.strName; } + int GetReceivedInstrument() { return cReceivedChanInfo.iInstrument; } void SetChannelInfos ( const CChannelInfo& cChanInfo ); void Show() { pFrame->show(); } void Hide() { pFrame->hide(); } @@ -101,7 +102,7 @@ protected: QLabel* plblInstrument; QLabel* plblCountryFlag; - QString strReceivedName; + CChannelInfo cReceivedChanInfo; bool bOtherChannelIsSolo; bool bIsMyOwnFader;