/****************************************************************************
** Form implementation generated from reading ui file 'EmuDialog.ui'
**
** Created: Tue Oct 10 04:07:11 2000
**      by:  The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "EmuDialogData.h"

#include <qbuttongroup.h>
#include <qcheckbox.h>
#include <qradiobutton.h>
#include <qlayout.h>
#include <qvariant.h>
#include <qtooltip.h>
#include <qwhatsthis.h>

/* 
 *  Constructs a EmuDialogData 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.
 */
EmuDialogData::EmuDialogData( QWidget* parent,  const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "EmuDialogData" );
    resize( 211, 319 ); 
    setCaption( tr( "Emulator config"  ) );

    emuGrp = new QButtonGroup( this, "emuGrp" );
    emuGrp->setGeometry( QRect( 10, 10, 190, 110 ) ); 
    emuGrp->setTitle( tr( "General settings"  ) );
    emuGrp->setFrameShadow( QButtonGroup::Sunken );
    emuGrp->setFrameShape( QButtonGroup::Box );

    forceSS = new QCheckBox( emuGrp, "forceSS" );
    forceSS->setGeometry( QRect( 10, 80, 147, 19 ) ); 
    forceSS->setText( tr( "Force song speed"  ) );

    mos8580 = new QCheckBox( emuGrp, "mos8580" );
    mos8580->setGeometry( QRect( 10, 60, 147, 19 ) ); 
    mos8580->setText( tr( "MOS 8580 waveforms"  ) );

    measVol = new QCheckBox( emuGrp, "measVol" );
    measVol->setGeometry( QRect( 10, 40, 147, 19 ) ); 
    measVol->setText( tr( "Measured Volume"  ) );

    SIDfilter = new QCheckBox( emuGrp, "SIDfilter" );
    SIDfilter->setGeometry( QRect( 10, 20, 147, 19 ) ); 
    SIDfilter->setText( tr( "SID filter"  ) );

    mpuGrp = new QButtonGroup( this, "mpuGrp" );
    mpuGrp->setGeometry( QRect( 10, 130, 190, 90 ) ); 
    mpuGrp->setTitle( tr( "MPU memory mode"  ) );
    mpuGrp->setFrameShadow( QButtonGroup::Sunken );
    mpuGrp->setFrameShape( QButtonGroup::Box );
    mpuGrp->setExclusive( TRUE );

    psidEnv = new QRadioButton( mpuGrp, "psidEnv" );
    psidEnv->setGeometry( QRect( 10, 60, 137, 19 ) ); 
    psidEnv->setText( tr( "PlaySID environment"  ) );

    transROM = new QRadioButton( mpuGrp, "transROM" );
    transROM->setGeometry( QRect( 10, 40, 137, 19 ) ); 
    transROM->setText( tr( "Transparent ROM"  ) );

    fullBS = new QRadioButton( mpuGrp, "fullBS" );
    fullBS->setGeometry( QRect( 10, 20, 137, 19 ) ); 
    fullBS->setText( tr( "Full bank-switching"  ) );

    clockGrp = new QButtonGroup( this, "clockGrp" );
    clockGrp->setGeometry( QRect( 10, 230, 190, 70 ) ); 
    clockGrp->setTitle( tr( "C64 clock speed"  ) );
    clockGrp->setExclusive( TRUE );

    clockPAL = new QRadioButton( clockGrp, "clockPAL" );
    clockPAL->setGeometry( QRect( 10, 20, 79, 19 ) ); 
    clockPAL->setText( tr( "PAL"  ) );

    clockNTSC = new QRadioButton( clockGrp, "clockNTSC" );
    clockNTSC->setGeometry( QRect( 10, 40, 79, 19 ) ); 
    clockNTSC->setText( tr( "NTSC"  ) );

    // signals and slots connections
    connect( emuGrp, SIGNAL( clicked(int) ), this, SLOT( newEMUsetting(int) ) );
    connect( mpuGrp, SIGNAL( clicked(int) ), this, SLOT( newMPUsetting(int) ) );
    connect( clockGrp, SIGNAL( clicked(int) ), this, SLOT( newCLKsetting(int) ) );

    // tab order
    setTabOrder( SIDfilter, measVol );
    setTabOrder( measVol, mos8580 );
    setTabOrder( mos8580, forceSS );
    setTabOrder( forceSS, fullBS );
    setTabOrder( fullBS, transROM );
    setTabOrder( transROM, psidEnv );
    setTabOrder( psidEnv, clockPAL );
    setTabOrder( clockPAL, clockNTSC );
}

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

void EmuDialogData::newCLKsetting(int)
{
    qWarning( "EmuDialogData::newCLKsetting(int): Not implemented yet!" );
}

void EmuDialogData::newEMUsetting(int)
{
    qWarning( "EmuDialogData::newEMUsetting(int): Not implemented yet!" );
}

void EmuDialogData::newMPUsetting(int)
{
    qWarning( "EmuDialogData::newMPUsetting(int): Not implemented yet!" );
}

