/****************************************************************************
** Form implementation generated from reading ui file 'MixerDialog.ui'
**
** Created: Wed Oct 2 11:33:42 2002
**      by:  The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "MixerDialogData.h"

#include <qvariant.h>
#include <qbuttongroup.h>
#include <qframe.h>
#include <qlabel.h>
#include <qpushbutton.h>
#include <qslider.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <qimage.h>
#include <qpixmap.h>

#include "widgets/LEDButton.h"
static const char* const image0_data[] = { 
"22 22 2 1",
". c None",
"# c #a4c610",
"........######........",
".....###########......",
"....##############....",
"...################...",
"..######......######..",
"..#####........#####..",
".#####.......#..#####.",
".####.......###..####.",
"####.......#####..####",
"####......#####...####",
"####....#######...####",
"####....######....####",
"####...########...####",
".####.##########..####",
".####..####.#########.",
".#####..##...########.",
"..#####.......#######.",
"..######......######..",
"...###################",
"....##################",
"......###########.###.",
"........######.....#.."};


/* 
 *  Constructs a MixerDialogData which is a child of 'parent', with the 
 *  name 'name' and widget flags set to 'f'.
 *
 *  The dialog will by default be modeless, unless you set 'modal' to
 *  TRUE to construct a modal dialog.
 */
MixerDialogData::MixerDialogData( QWidget* parent,  const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    QPixmap image0( ( const char** ) image0_data );
    if ( !name )
	setName( "MixerDialogData" );
    resize( 445, 215 ); 
    setCaption( trUtf8( "Software mixer" ) );

    Voice3PanFrame = new QFrame( this, "Voice3PanFrame" );
    Voice3PanFrame->setGeometry( QRect( 280, 140, 80, 30 ) ); 
    Voice3PanFrame->setFrameShape( QFrame::StyledPanel );
    Voice3PanFrame->setFrameShadow( QFrame::Raised );

    voice3panSld = new QSlider( Voice3PanFrame, "voice3panSld" );
    voice3panSld->setGeometry( QRect( 15, 7, 56, 14 ) ); 
    voice3panSld->setMaxValue( 255 );
    voice3panSld->setLineStep( 16 );
    voice3panSld->setOrientation( QSlider::Horizontal );
    voice3panSld->setTickmarks( QSlider::Right );

    Voice1Frame = new QFrame( this, "Voice1Frame" );
    Voice1Frame->setGeometry( QRect( 120, 0, 80, 140 ) ); 
    Voice1Frame->setFrameShape( QFrame::StyledPanel );
    Voice1Frame->setFrameShadow( QFrame::Raised );

    TextLabel1 = new QLabel( Voice1Frame, "TextLabel1" );
    TextLabel1->setGeometry( QRect( 15, 5, 50, 16 ) ); 
    TextLabel1->setText( trUtf8( "Voice 1" ) );

    voice1volSld = new QSlider( Voice1Frame, "voice1volSld" );
    voice1volSld->setGeometry( QRect( 25, 30, 30, 90 ) ); 
    voice1volSld->setMaxValue( 256 );
    voice1volSld->setLineStep( 32 );
    voice1volSld->setPageStep( 16 );
    voice1volSld->setOrientation( QSlider::Vertical );
    voice1volSld->setTickmarks( QSlider::Both );

    voice4soloBtn = new QPushButton( this, "voice4soloBtn" );
    voice4soloBtn->setGeometry( QRect( 360, 190, 80, 21 ) ); 
    voice4soloBtn->setText( trUtf8( "Solo" ) );
    voice4soloBtn->setToggleButton( TRUE );
    voice4soloBtn->setAutoDefault( FALSE );

    voice2muteBtn = new QPushButton( this, "voice2muteBtn" );
    voice2muteBtn->setGeometry( QRect( 200, 170, 80, 21 ) ); 
    voice2muteBtn->setText( trUtf8( "Mute" ) );
    voice2muteBtn->setToggleButton( TRUE );
    voice2muteBtn->setAutoDefault( FALSE );

    mixerGrp = new QButtonGroup( this, "mixerGrp" );
    mixerGrp->setGeometry( QRect( 5, 5, 115, 100 ) ); 
    mixerGrp->setTitle( trUtf8( "Mixing mode" ) );

    fullPanningBtn = new LEDButton( mixerGrp, "fullPanningBtn" );
    fullPanningBtn->setGeometry( QRect( 8, 66, 100, 20 ) ); 

    highQualityBtn = new LEDButton( mixerGrp, "highQualityBtn" );
    highQualityBtn->setGeometry( QRect( 8, 46, 100, 20 ) ); 

    mixerOffBtn = new LEDButton( mixerGrp, "mixerOffBtn" );
    mixerOffBtn->setGeometry( QRect( 8, 26, 100, 20 ) ); 

    voice2soloBtn = new QPushButton( this, "voice2soloBtn" );
    voice2soloBtn->setGeometry( QRect( 200, 190, 80, 21 ) ); 
    voice2soloBtn->setText( trUtf8( "Solo" ) );
    voice2soloBtn->setToggleButton( TRUE );
    voice2soloBtn->setAutoDefault( FALSE );

    Voice2PanFrame = new QFrame( this, "Voice2PanFrame" );
    Voice2PanFrame->setGeometry( QRect( 200, 140, 80, 30 ) ); 
    Voice2PanFrame->setFrameShape( QFrame::StyledPanel );
    Voice2PanFrame->setFrameShadow( QFrame::Raised );

    voice2panSld = new QSlider( Voice2PanFrame, "voice2panSld" );
    voice2panSld->setGeometry( QRect( 15, 7, 56, 14 ) ); 
    voice2panSld->setMaxValue( 255 );
    voice2panSld->setLineStep( 16 );
    voice2panSld->setOrientation( QSlider::Horizontal );
    voice2panSld->setTickmarks( QSlider::Right );

    Voice3Frame = new QFrame( this, "Voice3Frame" );
    Voice3Frame->setGeometry( QRect( 280, 0, 80, 140 ) ); 
    Voice3Frame->setFrameShape( QFrame::StyledPanel );
    Voice3Frame->setFrameShadow( QFrame::Raised );

    TextLabel3 = new QLabel( Voice3Frame, "TextLabel3" );
    TextLabel3->setGeometry( QRect( 15, 5, 50, 16 ) ); 
    TextLabel3->setText( trUtf8( "Voice 3" ) );

    voice3volSld = new QSlider( Voice3Frame, "voice3volSld" );
    voice3volSld->setGeometry( QRect( 25, 30, 30, 90 ) ); 
    voice3volSld->setMaxValue( 256 );
    voice3volSld->setLineStep( 32 );
    voice3volSld->setPageStep( 16 );
    voice3volSld->setOrientation( QSlider::Vertical );
    voice3volSld->setTickmarks( QSlider::Both );

    voice1muteBtn = new QPushButton( this, "voice1muteBtn" );
    voice1muteBtn->setGeometry( QRect( 120, 170, 80, 21 ) ); 
    voice1muteBtn->setText( trUtf8( "Mute" ) );
    voice1muteBtn->setToggleButton( TRUE );
    voice1muteBtn->setAutoDefault( FALSE );

    effectsGrp = new QButtonGroup( this, "effectsGrp" );
    effectsGrp->setGeometry( QRect( 5, 110, 115, 100 ) ); 
    effectsGrp->setFrameShape( QButtonGroup::Box );
    effectsGrp->setTitle( trUtf8( "Stereo effects" ) );

    effectsOffBtn = new LEDButton( effectsGrp, "effectsOffBtn" );
    effectsOffBtn->setGeometry( QRect( 8, 26, 100, 20 ) ); 

    surroundBtn = new LEDButton( effectsGrp, "surroundBtn" );
    surroundBtn->setGeometry( QRect( 8, 46, 100, 20 ) ); 

    centeredPanningBtn = new LEDButton( effectsGrp, "centeredPanningBtn" );
    centeredPanningBtn->setGeometry( QRect( 8, 66, 100, 20 ) ); 

    voice3soloBtn = new QPushButton( this, "voice3soloBtn" );
    voice3soloBtn->setGeometry( QRect( 280, 190, 80, 21 ) ); 
    voice3soloBtn->setText( trUtf8( "Solo" ) );
    voice3soloBtn->setToggleButton( TRUE );
    voice3soloBtn->setAutoDefault( FALSE );

    voice3muteBtn = new QPushButton( this, "voice3muteBtn" );
    voice3muteBtn->setGeometry( QRect( 280, 170, 80, 21 ) ); 
    voice3muteBtn->setText( trUtf8( "Mute" ) );
    voice3muteBtn->setToggleButton( TRUE );
    voice3muteBtn->setAutoDefault( FALSE );

    Voice4Frame = new QFrame( this, "Voice4Frame" );
    Voice4Frame->setGeometry( QRect( 360, 0, 80, 140 ) ); 
    Voice4Frame->setFrameShape( QFrame::StyledPanel );
    Voice4Frame->setFrameShadow( QFrame::Raised );

    voice4volSld = new QSlider( Voice4Frame, "voice4volSld" );
    voice4volSld->setGeometry( QRect( 25, 30, 30, 90 ) ); 
    voice4volSld->setMaxValue( 256 );
    voice4volSld->setLineStep( 32 );
    voice4volSld->setPageStep( 16 );
    voice4volSld->setOrientation( QSlider::Vertical );
    voice4volSld->setTickmarks( QSlider::Both );

    TextLabel4 = new QLabel( Voice4Frame, "TextLabel4" );
    TextLabel4->setGeometry( QRect( 15, 5, 55, 16 ) ); 
    TextLabel4->setText( trUtf8( "[Voice 4]" ) );

    Voice2Frame = new QFrame( this, "Voice2Frame" );
    Voice2Frame->setGeometry( QRect( 200, 0, 80, 140 ) ); 
    Voice2Frame->setFrameShape( QFrame::StyledPanel );
    Voice2Frame->setFrameShadow( QFrame::Raised );

    voice2volSld = new QSlider( Voice2Frame, "voice2volSld" );
    voice2volSld->setGeometry( QRect( 25, 30, 30, 90 ) ); 
    voice2volSld->setMaxValue( 256 );
    voice2volSld->setLineStep( 32 );
    voice2volSld->setPageStep( 16 );
    voice2volSld->setOrientation( QSlider::Vertical );
    voice2volSld->setTickmarks( QSlider::Both );

    TextLabel2 = new QLabel( Voice2Frame, "TextLabel2" );
    TextLabel2->setGeometry( QRect( 15, 5, 50, 16 ) ); 
    TextLabel2->setText( trUtf8( "Voice 2" ) );

    voice1soloBtn = new QPushButton( this, "voice1soloBtn" );
    voice1soloBtn->setGeometry( QRect( 120, 190, 80, 21 ) ); 
    voice1soloBtn->setText( trUtf8( "Solo" ) );
    voice1soloBtn->setToggleButton( TRUE );
    voice1soloBtn->setAutoDefault( FALSE );

    Voice4PanFrame = new QFrame( this, "Voice4PanFrame" );
    Voice4PanFrame->setGeometry( QRect( 360, 140, 80, 30 ) ); 
    Voice4PanFrame->setFrameShape( QFrame::StyledPanel );
    Voice4PanFrame->setFrameShadow( QFrame::Raised );

    voice4panSld = new QSlider( Voice4PanFrame, "voice4panSld" );
    voice4panSld->setGeometry( QRect( 15, 7, 56, 14 ) ); 
    voice4panSld->setMaxValue( 255 );
    voice4panSld->setLineStep( 16 );
    voice4panSld->setOrientation( QSlider::Horizontal );
    voice4panSld->setTickmarks( QSlider::Right );

    voice4muteBtn = new QPushButton( this, "voice4muteBtn" );
    voice4muteBtn->setGeometry( QRect( 360, 170, 80, 21 ) ); 
    voice4muteBtn->setText( trUtf8( "Mute" ) );
    voice4muteBtn->setToggleButton( TRUE );
    voice4muteBtn->setAutoDefault( FALSE );

    Voice1PanFrame = new QFrame( this, "Voice1PanFrame" );
    Voice1PanFrame->setGeometry( QRect( 120, 140, 80, 30 ) ); 
    Voice1PanFrame->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, 0, 0, Voice1PanFrame->sizePolicy().hasHeightForWidth() ) );
    Voice1PanFrame->setFrameShape( QFrame::StyledPanel );
    Voice1PanFrame->setFrameShadow( QFrame::Raised );

    voice1panSld = new QSlider( Voice1PanFrame, "voice1panSld" );
    voice1panSld->setGeometry( QRect( 10, 7, 56, 14 ) ); 
    voice1panSld->setMaxValue( 255 );
    voice1panSld->setLineStep( 16 );
    voice1panSld->setOrientation( QSlider::Horizontal );
    voice1panSld->setTickmarks( QSlider::Right );

    // signals and slots connections
    connect( voice1volSld, SIGNAL( valueChanged(int) ), this, SLOT( setVoice1Volume(int) ) );
    connect( voice2volSld, SIGNAL( valueChanged(int) ), this, SLOT( setVoice2Volume(int) ) );
    connect( voice3volSld, SIGNAL( valueChanged(int) ), this, SLOT( setVoice3Volume(int) ) );
    connect( voice4volSld, SIGNAL( valueChanged(int) ), this, SLOT( setVoice4Volume(int) ) );
    connect( voice1panSld, SIGNAL( valueChanged(int) ), this, SLOT( setVoice1Pan(int) ) );
    connect( voice2panSld, SIGNAL( valueChanged(int) ), this, SLOT( setVoice2Pan(int) ) );
    connect( voice3panSld, SIGNAL( valueChanged(int) ), this, SLOT( setVoice3Pan(int) ) );
    connect( voice4panSld, SIGNAL( valueChanged(int) ), this, SLOT( setVoice4Pan(int) ) );
    connect( mixerOffBtn, SIGNAL( clicked() ), this, SLOT( setMixerOff() ) );
    connect( highQualityBtn, SIGNAL( clicked() ), this, SLOT( setHighQuality() ) );
    connect( fullPanningBtn, SIGNAL( clicked() ), this, SLOT( setFullPanning() ) );
    connect( effectsOffBtn, SIGNAL( clicked() ), this, SLOT( setEffectsOff() ) );
    connect( surroundBtn, SIGNAL( clicked() ), this, SLOT( setStereoSurround() ) );
    connect( centeredPanningBtn, SIGNAL( clicked() ), this, SLOT( setCenteredPanning() ) );
    connect( voice1muteBtn, SIGNAL( toggled(bool) ), this, SLOT( muteVoice1(bool) ) );
    connect( voice2muteBtn, SIGNAL( toggled(bool) ), this, SLOT( muteVoice2(bool) ) );
    connect( voice3muteBtn, SIGNAL( toggled(bool) ), this, SLOT( muteVoice3(bool) ) );
    connect( voice4muteBtn, SIGNAL( toggled(bool) ), this, SLOT( muteVoice4(bool) ) );
    connect( voice4soloBtn, SIGNAL( toggled(bool) ), this, SLOT( soloVoice4(bool) ) );
    connect( voice3soloBtn, SIGNAL( toggled(bool) ), this, SLOT( soloVoice3(bool) ) );
    connect( voice2soloBtn, SIGNAL( toggled(bool) ), this, SLOT( soloVoice2(bool) ) );
    connect( voice1soloBtn, SIGNAL( toggled(bool) ), this, SLOT( soloVoice1(bool) ) );

    // tab order
    setTabOrder( voice1volSld, voice2volSld );
    setTabOrder( voice2volSld, voice3volSld );
    setTabOrder( voice3volSld, voice4volSld );
    setTabOrder( voice4volSld, voice1panSld );
    setTabOrder( voice1panSld, voice2panSld );
    setTabOrder( voice2panSld, voice3panSld );
    setTabOrder( voice3panSld, voice4panSld );
    setTabOrder( voice4panSld, voice1muteBtn );
    setTabOrder( voice1muteBtn, voice2muteBtn );
    setTabOrder( voice2muteBtn, voice3muteBtn );
    setTabOrder( voice3muteBtn, voice4muteBtn );
    setTabOrder( voice4muteBtn, voice1soloBtn );
    setTabOrder( voice1soloBtn, voice2soloBtn );
    setTabOrder( voice2soloBtn, voice3soloBtn );
    setTabOrder( voice3soloBtn, voice4soloBtn );
}

/*  
 *  Destroys the object and frees any allocated resources
 */
MixerDialogData::~MixerDialogData()
{
    // no need to delete child widgets, Qt does it all for us
}

void MixerDialogData::muteVoice1( bool )
{
    qWarning( "MixerDialogData::muteVoice1( bool ): Not implemented yet!" );
}

void MixerDialogData::muteVoice2( bool )
{
    qWarning( "MixerDialogData::muteVoice2( bool ): Not implemented yet!" );
}

void MixerDialogData::muteVoice3( bool )
{
    qWarning( "MixerDialogData::muteVoice3( bool ): Not implemented yet!" );
}

void MixerDialogData::muteVoice4( bool )
{
    qWarning( "MixerDialogData::muteVoice4( bool ): Not implemented yet!" );
}

void MixerDialogData::setCenteredPanning()
{
    qWarning( "MixerDialogData::setCenteredPanning(): Not implemented yet!" );
}

void MixerDialogData::setEffectsOff()
{
    qWarning( "MixerDialogData::setEffectsOff(): Not implemented yet!" );
}

void MixerDialogData::setFullPanning()
{
    qWarning( "MixerDialogData::setFullPanning(): Not implemented yet!" );
}

void MixerDialogData::setHighQuality()
{
    qWarning( "MixerDialogData::setHighQuality(): Not implemented yet!" );
}

void MixerDialogData::setMixerOff()
{
    qWarning( "MixerDialogData::setMixerOff(): Not implemented yet!" );
}

void MixerDialogData::setStereoSurround()
{
    qWarning( "MixerDialogData::setStereoSurround(): Not implemented yet!" );
}

void MixerDialogData::setVoice1Pan( int )
{
    qWarning( "MixerDialogData::setVoice1Pan( int ): Not implemented yet!" );
}

void MixerDialogData::setVoice1Volume( int )
{
    qWarning( "MixerDialogData::setVoice1Volume( int ): Not implemented yet!" );
}

void MixerDialogData::setVoice2Pan( int )
{
    qWarning( "MixerDialogData::setVoice2Pan( int ): Not implemented yet!" );
}

void MixerDialogData::setVoice2Volume( int )
{
    qWarning( "MixerDialogData::setVoice2Volume( int ): Not implemented yet!" );
}

void MixerDialogData::setVoice3Pan( int )
{
    qWarning( "MixerDialogData::setVoice3Pan( int ): Not implemented yet!" );
}

void MixerDialogData::setVoice3Volume( int )
{
    qWarning( "MixerDialogData::setVoice3Volume( int ): Not implemented yet!" );
}

void MixerDialogData::setVoice4Pan( int )
{
    qWarning( "MixerDialogData::setVoice4Pan( int ): Not implemented yet!" );
}

void MixerDialogData::setVoice4Volume( int )
{
    qWarning( "MixerDialogData::setVoice4Volume( int ): Not implemented yet!" );
}

void MixerDialogData::soloVoice1( bool )
{
    qWarning( "MixerDialogData::soloVoice1( bool ): Not implemented yet!" );
}

void MixerDialogData::soloVoice2( bool )
{
    qWarning( "MixerDialogData::soloVoice2( bool ): Not implemented yet!" );
}

void MixerDialogData::soloVoice3( bool )
{
    qWarning( "MixerDialogData::soloVoice3( bool ): Not implemented yet!" );
}

void MixerDialogData::soloVoice4( bool )
{
    qWarning( "MixerDialogData::soloVoice4( bool ): Not implemented yet!" );
}

