2013-01-23 11:41:13 +01:00
|
|
|
/******************************************************************************\
|
2015-02-04 19:17:23 +01:00
|
|
|
* Copyright (c) 2004-2015
|
2013-01-23 11:41:13 +01:00
|
|
|
*
|
|
|
|
* Author(s):
|
|
|
|
* Volker Fischer
|
|
|
|
*
|
|
|
|
******************************************************************************
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify it under
|
|
|
|
* the terms of the GNU General Public License as published by the Free Software
|
|
|
|
* Foundation; either version 2 of the License, or (at your option) any later
|
|
|
|
* version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
|
|
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
|
|
* details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along with
|
|
|
|
* this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*
|
|
|
|
\******************************************************************************/
|
|
|
|
|
|
|
|
#if !defined ( MIXERBOARD_H__FD6B49E1606C2AC__INCLUDED_ )
|
|
|
|
#define MIXERBOARD_H__FD6B49E1606C2AC__INCLUDED_
|
|
|
|
|
|
|
|
#include <QFrame>
|
|
|
|
#include <QGroupBox>
|
|
|
|
#include <QLabel>
|
|
|
|
#include <QCheckBox>
|
|
|
|
#include <QLayout>
|
|
|
|
#include <QString>
|
|
|
|
#include <QSlider>
|
|
|
|
#include <QSizePolicy>
|
|
|
|
#include <QHostAddress>
|
|
|
|
#include "global.h"
|
|
|
|
#include "util.h"
|
|
|
|
|
|
|
|
|
|
|
|
/* Classes ********************************************************************/
|
|
|
|
class CChannelFader : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
CChannelFader ( QWidget* pNW, QHBoxLayout* pParentLayout );
|
|
|
|
|
2013-02-27 22:28:38 +01:00
|
|
|
void SetText ( const CChannelInfo& ChanInfo );
|
|
|
|
QString GetReceivedName() { return strReceivedName; }
|
2015-01-30 21:53:43 +01:00
|
|
|
void SetChannelInfos ( const CChannelInfo& cChanInfo );
|
2013-01-23 11:41:13 +01:00
|
|
|
void Show() { pFrame->show(); }
|
|
|
|
void Hide() { pFrame->hide(); }
|
2015-01-23 22:38:24 +01:00
|
|
|
bool IsVisible() { return plblLabel->isVisible(); }
|
2013-09-10 18:24:55 +02:00
|
|
|
bool IsSolo() { return pcbSolo->isChecked(); }
|
2013-01-23 11:41:13 +01:00
|
|
|
void SetGUIDesign ( const EGUIDesign eNewDesign );
|
|
|
|
|
2013-09-10 18:24:55 +02:00
|
|
|
void UpdateSoloState ( const bool bNewOtherSoloState );
|
2013-02-27 22:28:38 +01:00
|
|
|
void SetFaderLevel ( const int iLevel );
|
2014-01-19 11:51:31 +01:00
|
|
|
void SetFaderIsSolo ( const bool bIsSolo );
|
2013-02-24 10:03:57 +01:00
|
|
|
int GetFaderLevel() { return pFader->value(); }
|
2013-02-27 22:28:38 +01:00
|
|
|
void Reset();
|
2013-01-23 11:41:13 +01:00
|
|
|
|
|
|
|
protected:
|
2013-02-27 22:28:38 +01:00
|
|
|
double CalcFaderGain ( const int value );
|
|
|
|
void SetMute ( const bool bState );
|
|
|
|
QString GenFaderText ( const CChannelInfo& ChanInfo );
|
|
|
|
void SendFaderLevelToServer ( const int iLevel );
|
2015-01-31 09:58:19 +01:00
|
|
|
void SetupFaderTag ( const ESkillLevel eSkillLevel );
|
2013-01-23 11:41:13 +01:00
|
|
|
|
|
|
|
QFrame* pFrame;
|
2015-01-31 09:58:19 +01:00
|
|
|
QGroupBox* pLabelInstBox;
|
2013-01-23 11:41:13 +01:00
|
|
|
QSlider* pFader;
|
|
|
|
QCheckBox* pcbMute;
|
|
|
|
QCheckBox* pcbSolo;
|
2015-01-23 22:38:24 +01:00
|
|
|
QLabel* plblLabel;
|
|
|
|
QLabel* plblInstrument;
|
|
|
|
QLabel* plblCountryFlag;
|
2013-01-23 11:41:13 +01:00
|
|
|
|
2013-02-27 22:28:38 +01:00
|
|
|
QString strReceivedName;
|
|
|
|
|
2013-02-10 09:44:01 +01:00
|
|
|
bool bOtherChannelIsSolo;
|
2013-01-23 11:41:13 +01:00
|
|
|
|
|
|
|
public slots:
|
2013-02-27 22:28:38 +01:00
|
|
|
void OnLevelValueChanged ( int value ) { SendFaderLevelToServer ( value ); }
|
2013-01-23 11:41:13 +01:00
|
|
|
void OnMuteStateChanged ( int value );
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void gainValueChanged ( double value );
|
|
|
|
void soloStateChanged ( int value );
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class CAudioMixerBoard : public QGroupBox
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
CAudioMixerBoard ( QWidget* parent = 0, Qt::WindowFlags f = 0 );
|
|
|
|
|
|
|
|
void HideAll();
|
2013-02-11 16:21:53 +01:00
|
|
|
void ApplyNewConClientList ( CVector<CChannelInfo>& vecChanInfo );
|
2013-01-23 11:41:13 +01:00
|
|
|
void SetServerName ( const QString& strNewServerName );
|
|
|
|
void SetGUIDesign ( const EGUIDesign eNewDesign );
|
|
|
|
|
2013-02-28 21:54:47 +01:00
|
|
|
// settings
|
|
|
|
CVector<QString> vecStoredFaderTags;
|
|
|
|
CVector<int> vecStoredFaderLevels;
|
2014-01-19 16:02:25 +01:00
|
|
|
CVector<int> vecStoredFaderIsSolo;
|
2013-02-28 21:54:47 +01:00
|
|
|
|
2013-01-23 11:41:13 +01:00
|
|
|
protected:
|
2014-01-19 11:51:31 +01:00
|
|
|
bool GetStoredFaderSettings ( const CChannelInfo& ChanInfo,
|
|
|
|
int& iStoredFaderLevel,
|
|
|
|
bool& bStoredFaderIsSolo );
|
|
|
|
void StoreFaderSettings ( CChannelFader* pChanFader );
|
2013-09-10 18:24:55 +02:00
|
|
|
void UpdateSoloStates();
|
2013-02-24 10:03:57 +01:00
|
|
|
|
2013-02-23 21:15:22 +01:00
|
|
|
void OnGainValueChanged ( const int iChannelIdx, const double dValue );
|
2013-01-23 11:41:13 +01:00
|
|
|
|
|
|
|
CVector<CChannelFader*> vecpChanFader;
|
|
|
|
QHBoxLayout* pMainLayout;
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
// CODE TAG: MAX_NUM_CHANNELS_TAG
|
|
|
|
// make sure we have MAX_NUM_CHANNELS connections!!!
|
2013-02-23 21:15:22 +01:00
|
|
|
void OnGainValueChangedCh0 ( double dValue ) { OnGainValueChanged ( 0, dValue ); }
|
|
|
|
void OnGainValueChangedCh1 ( double dValue ) { OnGainValueChanged ( 1, dValue ); }
|
|
|
|
void OnGainValueChangedCh2 ( double dValue ) { OnGainValueChanged ( 2, dValue ); }
|
|
|
|
void OnGainValueChangedCh3 ( double dValue ) { OnGainValueChanged ( 3, dValue ); }
|
|
|
|
void OnGainValueChangedCh4 ( double dValue ) { OnGainValueChanged ( 4, dValue ); }
|
|
|
|
void OnGainValueChangedCh5 ( double dValue ) { OnGainValueChanged ( 5, dValue ); }
|
|
|
|
void OnGainValueChangedCh6 ( double dValue ) { OnGainValueChanged ( 6, dValue ); }
|
|
|
|
void OnGainValueChangedCh7 ( double dValue ) { OnGainValueChanged ( 7, dValue ); }
|
|
|
|
void OnGainValueChangedCh8 ( double dValue ) { OnGainValueChanged ( 8, dValue ); }
|
|
|
|
void OnGainValueChangedCh9 ( double dValue ) { OnGainValueChanged ( 9, dValue ); }
|
|
|
|
void OnGainValueChangedCh10 ( double dValue ) { OnGainValueChanged ( 10, dValue ); }
|
|
|
|
void OnGainValueChangedCh11 ( double dValue ) { OnGainValueChanged ( 11, dValue ); }
|
2013-09-08 22:15:21 +02:00
|
|
|
void OnGainValueChangedCh12 ( double dValue ) { OnGainValueChanged ( 12, dValue ); }
|
|
|
|
void OnGainValueChangedCh13 ( double dValue ) { OnGainValueChanged ( 13, dValue ); }
|
|
|
|
void OnGainValueChangedCh14 ( double dValue ) { OnGainValueChanged ( 14, dValue ); }
|
|
|
|
void OnGainValueChangedCh15 ( double dValue ) { OnGainValueChanged ( 15, dValue ); }
|
|
|
|
void OnGainValueChangedCh16 ( double dValue ) { OnGainValueChanged ( 16, dValue ); }
|
|
|
|
void OnGainValueChangedCh17 ( double dValue ) { OnGainValueChanged ( 17, dValue ); }
|
|
|
|
void OnGainValueChangedCh18 ( double dValue ) { OnGainValueChanged ( 18, dValue ); }
|
|
|
|
void OnGainValueChangedCh19 ( double dValue ) { OnGainValueChanged ( 19, dValue ); }
|
2013-01-23 11:41:13 +01:00
|
|
|
|
2013-09-10 18:24:55 +02:00
|
|
|
void OnChSoloStateChanged() { UpdateSoloStates(); }
|
2013-01-23 11:41:13 +01:00
|
|
|
|
|
|
|
signals:
|
|
|
|
void ChangeChanGain ( int iId, double dGain );
|
|
|
|
void NumClientsChanged ( int iNewNumClients );
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // MIXERBOARD_H__FD6B49E1606C2AC__INCLUDED_
|