fix for Mac issue with mixer fading layout problem
This commit is contained in:
parent
d4a6ea617f
commit
354b6309bd
2 changed files with 19 additions and 24 deletions
|
@ -31,12 +31,15 @@
|
|||
CChannelFader::CChannelFader ( QWidget* pNW,
|
||||
QHBoxLayout* pParentLayout )
|
||||
{
|
||||
// create new GUI control objects and store pointers to them
|
||||
pMainGrid = new QVBoxLayout();
|
||||
pFader = new QSlider ( Qt::Vertical, pNW );
|
||||
pcbMute = new QCheckBox ( "Mute", pNW );
|
||||
pcbSolo = new QCheckBox ( "Solo", pNW );
|
||||
pLabel = new QLabel ( "", pNW );
|
||||
// create new GUI control objects and store pointers to them (note that
|
||||
// QWidget takes the ownership of the pMainGrid so that this only has
|
||||
// to be created locally in this constructor)
|
||||
pFrame = new QFrame ( pNW );
|
||||
QVBoxLayout* pMainGrid = new QVBoxLayout ( pFrame );
|
||||
pFader = new QSlider ( Qt::Vertical, pFrame );
|
||||
pcbMute = new QCheckBox ( "Mute", pFrame );
|
||||
pcbSolo = new QCheckBox ( "Solo", pFrame );
|
||||
pLabel = new QLabel ( "", pFrame );
|
||||
|
||||
// setup slider
|
||||
pFader->setPageStep ( 1 );
|
||||
|
@ -61,8 +64,8 @@ CChannelFader::CChannelFader ( QWidget* pNW,
|
|||
pMainGrid->addWidget( pcbSolo, 0, Qt::AlignLeft );
|
||||
pMainGrid->addWidget( pLabel, 0, Qt::AlignHCenter );
|
||||
|
||||
// add fader layout to audio mixer board layout
|
||||
pParentLayout->addLayout ( pMainGrid );
|
||||
// add fader frame to audio mixer board layout
|
||||
pParentLayout->addWidget( pFrame );
|
||||
|
||||
// reset current fader
|
||||
Reset();
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#if !defined ( MIXERBOARD_H__FD6B49E1606C2AC__INCLUDED_ )
|
||||
#define MIXERBOARD_H__FD6B49E1606C2AC__INCLUDED_
|
||||
|
||||
#include <qframe.h>
|
||||
#include <qgroupbox.h>
|
||||
#include <qlabel.h>
|
||||
#include <qcheckbox.h>
|
||||
|
@ -49,19 +50,10 @@ class CChannelFader : public QObject
|
|||
|
||||
public:
|
||||
CChannelFader ( QWidget* pNW, QHBoxLayout* pParentLayout );
|
||||
~CChannelFader()
|
||||
{
|
||||
pLabel->close();
|
||||
pcbMute->close();
|
||||
pcbSolo->close();
|
||||
pFader->close();
|
||||
|
||||
// TODO get rid of pMainGrid
|
||||
}
|
||||
|
||||
void SetText ( const QString sText );
|
||||
void Show() { pLabel->show(); pcbMute->show(); pcbSolo->show(); pFader->show(); }
|
||||
void Hide() { pLabel->hide(); pcbMute->hide(); pcbSolo->hide(); pFader->hide(); }
|
||||
void Show() { pFrame->show(); }
|
||||
void Hide() { pFrame->hide(); }
|
||||
bool IsVisible() { return pLabel->isVisible(); }
|
||||
void SetGUIDesign ( const EGUIDesign eNewDesign );
|
||||
|
||||
|
@ -74,11 +66,11 @@ protected:
|
|||
double CalcFaderGain ( const int value );
|
||||
void SetMute ( const bool bState );
|
||||
|
||||
QVBoxLayout* pMainGrid;
|
||||
QSlider* pFader;
|
||||
QCheckBox* pcbMute;
|
||||
QCheckBox* pcbSolo;
|
||||
QLabel* pLabel;
|
||||
QFrame* pFrame;
|
||||
QSlider* pFader;
|
||||
QCheckBox* pcbMute;
|
||||
QCheckBox* pcbSolo;
|
||||
QLabel* pLabel;
|
||||
|
||||
bool bOtherChannelIsSolo;
|
||||
|
||||
|
|
Loading…
Reference in a new issue