/****************************************************************************
** Form implementation generated from reading ui file 'CdboDefaultOptBase.ui'
**
** Created: Mon Apr 29 02:10:01 2002
**      by:  The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "CdboDefaultOptBase.h"
#include "CdboDefaultOptBase.moc"

#include <qvariant.h>
#include <qbuttongroup.h>
#include <qcheckbox.h>
#include <qframe.h>
#include <qgroupbox.h>
#include <qlabel.h>
#include <qpushbutton.h>
#include <qradiobutton.h>
#include <qspinbox.h>
#include <qtabwidget.h>
#include <qwidget.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <kcolorbutton.h>

/* 
 *  Constructs a CdboDefaultOptBase which is a child of 'parent', with the 
 *  name 'name'.' 
 */
CdboDefaultOptBase::CdboDefaultOptBase( QWidget* parent,  const char* name )
    : KCModule( parent, name )
{
    if ( !name )
	setName( "CdboDefaultOptBase" );
    resize( 550, 511 ); 
    setMinimumSize( QSize( 550, 510 ) );
    setCaption( trUtf8( "CD Bake Oven Defaults" ) );
    CdboDefaultOptBaseLayout = new QVBoxLayout( this, 0, 6, "CdboDefaultOptBaseLayout"); 

    TabWidget3 = new QTabWidget( this, "TabWidget3" );

    tab = new QWidget( TabWidget3, "tab" );
    tabLayout = new QVBoxLayout( tab, 8, 5, "tabLayout"); 

    GroupBox1 = new QGroupBox( tab, "GroupBox1" );
    GroupBox1->setMaximumSize( QSize( 5170, 200 ) );
    GroupBox1->setTitle( trUtf8( "General Options" ) );
    GroupBox1->setColumnLayout(0, Qt::Vertical );
    GroupBox1->layout()->setSpacing( 6 );
    GroupBox1->layout()->setMargin( 11 );
    GroupBox1Layout = new QGridLayout( GroupBox1->layout() );
    GroupBox1Layout->setAlignment( Qt::AlignTop );

    doOnStartChk = new QCheckBox( GroupBox1, "doOnStartChk" );
    doOnStartChk->setText( trUtf8( "Run 'welcome dialog' on start" ) );
    QToolTip::add( doOnStartChk, trUtf8( "Start with 'Welcome Dialog\"." ) );

    GroupBox1Layout->addMultiCellWidget( doOnStartChk, 0, 0, 0, 3 );

    scanSysChk = new QCheckBox( GroupBox1, "scanSysChk" );
    scanSysChk->setText( trUtf8( "Scan system settings on start only" ) );
    scanSysChk->setChecked( TRUE );
    QToolTip::add( scanSysChk, trUtf8( "Scan setting on start only,<br>this improves settings dialog performance, but prevents cdbo from detecting system changes. May reflect on performance." ) );

    GroupBox1Layout->addMultiCellWidget( scanSysChk, 1, 1, 0, 3 );

    showWarningsChk = new QCheckBox( GroupBox1, "showWarningsChk" );
    showWarningsChk->setText( trUtf8( "Show all warnings" ) );
    showWarningsChk->setChecked( TRUE );

    GroupBox1Layout->addMultiCellWidget( showWarningsChk, 2, 2, 4, 5 );

    saveCompilationChk = new QCheckBox( GroupBox1, "saveCompilationChk" );
    saveCompilationChk->setEnabled( TRUE );
    saveCompilationChk->setText( trUtf8( "Propose to save 'Compilation list'" ) );
    saveCompilationChk->setChecked( TRUE );
    QToolTip::add( saveCompilationChk, trUtf8( "Keep this checked if you want me to remind you to save list <b></b>of files added to New CD List." ) );

    GroupBox1Layout->addMultiCellWidget( saveCompilationChk, 2, 2, 0, 3 );

    scanScsiChk = new QCheckBox( GroupBox1, "scanScsiChk" );
    scanScsiChk->setText( trUtf8( "Do scanbus automatically" ) );
    scanScsiChk->setChecked( FALSE );
    QToolTip::add( scanScsiChk, trUtf8( "Scan all SCSI devices on all SCSI busses on each<br>'Settings Dialog' invocation. May reflect on performance." ) );

    GroupBox1Layout->addMultiCellWidget( scanScsiChk, 1, 1, 4, 5 );

    scanDevicesChk = new QCheckBox( GroupBox1, "scanDevicesChk" );
    scanDevicesChk->setText( trUtf8( "Scan devices automatically" ) );
    scanDevicesChk->setChecked( TRUE );
    QToolTip::add( scanDevicesChk, trUtf8( "Automaticaly detect usable devices<br>on each 'Settings Dialog' invocation." ) );

    GroupBox1Layout->addMultiCellWidget( scanDevicesChk, 0, 0, 4, 5 );

    TextLabel1 = new QLabel( GroupBox1, "TextLabel1" );
    TextLabel1->setText( trUtf8( "Maximum recording speed:" ) );

    GroupBox1Layout->addWidget( TextLabel1, 5, 0 );

    Line3 = new QFrame( GroupBox1, "Line3" );
    Line3->setProperty( "frameShape", (int)QFrame::HLine );
    Line3->setFrameShadow( QFrame::Sunken );
    Line3->setFrameShape( QFrame::HLine );

    GroupBox1Layout->addMultiCellWidget( Line3, 4, 4, 0, 5 );

    maxSpeedSpn = new QSpinBox( GroupBox1, "maxSpeedSpn" );
    maxSpeedSpn->setMinValue( 1 );
    maxSpeedSpn->setSuffix( "x" );

    GroupBox1Layout->addWidget( maxSpeedSpn, 5, 1 );

    comTimeOutSpn = new QSpinBox( GroupBox1, "comTimeOutSpn" );
    comTimeOutSpn->setMaximumSize( QSize( 60, 32767 ) );
    comTimeOutSpn->setWrapping( FALSE );
    comTimeOutSpn->setButtonSymbols( QSpinBox::UpDownArrows );
    comTimeOutSpn->setMaxValue( 600 );
    comTimeOutSpn->setMinValue( 30 );
    comTimeOutSpn->setLineStep( 15 );
    comTimeOutSpn->setValue( 75 );
    comTimeOutSpn->setSuffix( trUtf8( " sec" ) );
    QToolTip::add( comTimeOutSpn, trUtf8( "Set maximum number of seconds <b></b>to wait for a command responce." ) );

    GroupBox1Layout->addWidget( comTimeOutSpn, 5, 5 );

    TextLabel1_2 = new QLabel( GroupBox1, "TextLabel1_2" );
    TextLabel1_2->setText( trUtf8( "Command timeout:" ) );

    GroupBox1Layout->addMultiCellWidget( TextLabel1_2, 5, 5, 3, 4 );
    QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    GroupBox1Layout->addItem( spacer, 5, 2 );
    tabLayout->addWidget( GroupBox1 );

    ButtonGroup2 = new QButtonGroup( tab, "ButtonGroup2" );
    ButtonGroup2->setTitle( trUtf8( "Working Directory" ) );
    QWhatsThis::add( ButtonGroup2, trUtf8( "Working directory, used for storing temporary (image) files, etc. Very important!" ) );
    ButtonGroup2->setColumnLayout(0, Qt::Vertical );
    ButtonGroup2->layout()->setSpacing( 6 );
    ButtonGroup2->layout()->setMargin( 11 );
    ButtonGroup2Layout = new QGridLayout( ButtonGroup2->layout() );
    ButtonGroup2Layout->setAlignment( Qt::AlignTop );
    QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    ButtonGroup2Layout->addItem( spacer_2, 0, 1 );

    minTmpSizeSpn = new QSpinBox( ButtonGroup2, "minTmpSizeSpn" );
    minTmpSizeSpn->setMaxValue( 9999 );
    minTmpSizeSpn->setMinValue( 0 );
    minTmpSizeSpn->setLineStep( 25 );
    minTmpSizeSpn->setValue( 650 );
    minTmpSizeSpn->setSuffix( trUtf8( " MB" ) );

    ButtonGroup2Layout->addMultiCellWidget( minTmpSizeSpn, 0, 0, 3, 4 );

    minLbl = new QLabel( ButtonGroup2, "minLbl" );
    minLbl->setText( trUtf8( "Minimum size:" ) );

    ButtonGroup2Layout->addWidget( minLbl, 0, 2 );

    checkSizeChk = new QCheckBox( ButtonGroup2, "checkSizeChk" );
    checkSizeChk->setText( trUtf8( "Check size when necessery" ) );
    checkSizeChk->setChecked( TRUE );

    ButtonGroup2Layout->addWidget( checkSizeChk, 0, 0 );
    QSpacerItem* spacer_3 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
    ButtonGroup2Layout->addItem( spacer_3, 1, 2 );

    tmpBrowseBtn = new QPushButton( ButtonGroup2, "tmpBrowseBtn" );
    tmpBrowseBtn->setText( trUtf8( "..." ) );
    QToolTip::add( tmpBrowseBtn, trUtf8( "Open file dialog." ) );

    ButtonGroup2Layout->addWidget( tmpBrowseBtn, 2, 4 );

    tmpLbl = new QLabel( ButtonGroup2, "tmpLbl" );
    tmpLbl->setFrameShape( QLabel::Box );
    tmpLbl->setFrameShadow( QLabel::Raised );
    tmpLbl->setText( trUtf8( "" ) );
    QToolTip::add( tmpLbl, trUtf8( "Specify working directory used to store disc image in." ) );

    ButtonGroup2Layout->addMultiCellWidget( tmpLbl, 2, 2, 0, 3 );
    tabLayout->addWidget( ButtonGroup2 );

    ButtonGroup16_2_2 = new QButtonGroup( tab, "ButtonGroup16_2_2" );
    ButtonGroup16_2_2->setTitle( trUtf8( "Output Level" ) );
    QWhatsThis::add( ButtonGroup16_2_2, trUtf8( "Set the level of output." ) );
    ButtonGroup16_2_2->setColumnLayout(0, Qt::Vertical );
    ButtonGroup16_2_2->layout()->setSpacing( 6 );
    ButtonGroup16_2_2->layout()->setMargin( 11 );
    ButtonGroup16_2_2Layout = new QGridLayout( ButtonGroup16_2_2->layout() );
    ButtonGroup16_2_2Layout->setAlignment( Qt::AlignTop );

    stdOutRBtn = new QRadioButton( ButtonGroup16_2_2, "stdOutRBtn" );
    stdOutRBtn->setText( trUtf8( "Standart output" ) );
    stdOutRBtn->setChecked( TRUE );
    QToolTip::add( stdOutRBtn, trUtf8( "Show standard process output." ) );

    ButtonGroup16_2_2Layout->addMultiCellWidget( stdOutRBtn, 0, 0, 0, 1 );
    QSpacerItem* spacer_4 = new QSpacerItem( 20, 16, QSizePolicy::Minimum, QSizePolicy::Maximum );
    ButtonGroup16_2_2Layout->addItem( spacer_4, 1, 3 );

    outputLevelSpn = new QSpinBox( ButtonGroup16_2_2, "outputLevelSpn" );
    outputLevelSpn->setEnabled( FALSE );
    outputLevelSpn->setMaxValue( 3 );
    QToolTip::add( outputLevelSpn, trUtf8( "Incrementing level of output slows down the process and may be the reason for a buffer underrun. <b></b>Use level more than 1 only if nessesery!" ) );

    ButtonGroup16_2_2Layout->addWidget( outputLevelSpn, 3, 0 );

    outputLbl = new QLabel( ButtonGroup16_2_2, "outputLbl" );
    outputLbl->setEnabled( FALSE );
    outputLbl->setText( trUtf8( "Level of commands output" ) );
    QToolTip::add( outputLbl, trUtf8( "Incrementing level of output slows down the process and may be the reason for a buffer underrun. <b></b>Use level more than 1 only if nessesery!" ) );

    ButtonGroup16_2_2Layout->addMultiCellWidget( outputLbl, 3, 3, 1, 4 );
    QSpacerItem* spacer_5 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    ButtonGroup16_2_2Layout->addMultiCell( spacer_5, 3, 3, 5, 7 );

    debugChk = new QCheckBox( ButtonGroup16_2_2, "debugChk" );
    debugChk->setEnabled( FALSE );
    debugChk->setText( trUtf8( "&Show debug info" ) );
    QToolTip::add( debugChk, trUtf8( "This option slows down the process and may be the reason for a buffer underrun. Use<b></b> only if needed." ) );

    ButtonGroup16_2_2Layout->addWidget( debugChk, 3, 8 );

    Line3_2_2_2_2_2 = new QFrame( ButtonGroup16_2_2, "Line3_2_2_2_2_2" );
    Line3_2_2_2_2_2->setProperty( "frameShape", (int)QFrame::HLine );
    Line3_2_2_2_2_2->setFrameShadow( QFrame::Sunken );
    Line3_2_2_2_2_2->setFrameShape( QFrame::HLine );

    ButtonGroup16_2_2Layout->addMultiCellWidget( Line3_2_2_2_2_2, 2, 2, 0, 8 );

    custoutRBtn = new QRadioButton( ButtonGroup16_2_2, "custoutRBtn" );
    custoutRBtn->setEnabled( TRUE );
    custoutRBtn->setText( trUtf8( "Custom output" ) );
    QToolTip::add( custoutRBtn, trUtf8( "Customize level of process output.<b></b> Note that some processes support this settings more than the others. Use this option only if you must." ) );

    ButtonGroup16_2_2Layout->addMultiCellWidget( custoutRBtn, 0, 0, 7, 8 );
    QSpacerItem* spacer_6 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    ButtonGroup16_2_2Layout->addItem( spacer_6, 0, 6 );

    quiteOutRBtn = new QRadioButton( ButtonGroup16_2_2, "quiteOutRBtn" );
    quiteOutRBtn->setText( trUtf8( "Quite output" ) );
    QToolTip::add( quiteOutRBtn, trUtf8( "Show only minimum output." ) );

    ButtonGroup16_2_2Layout->addMultiCellWidget( quiteOutRBtn, 0, 0, 4, 5 );
    QSpacerItem* spacer_7 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    ButtonGroup16_2_2Layout->addItem( spacer_7, 0, 2 );
    tabLayout->addWidget( ButtonGroup16_2_2 );
    QSpacerItem* spacer_8 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
    tabLayout->addItem( spacer_8 );
    TabWidget3->insertTab( tab, trUtf8( "&Global Options" ) );

    tab_2 = new QWidget( TabWidget3, "tab_2" );
    tabLayout_2 = new QVBoxLayout( tab_2, 11, 6, "tabLayout_2"); 

    GroupBox19 = new QGroupBox( tab_2, "GroupBox19" );
    GroupBox19->setEnabled( FALSE );
    GroupBox19->setTitle( trUtf8( "Configuration Lifespan" ) );
    GroupBox19->setColumnLayout(0, Qt::Vertical );
    GroupBox19->layout()->setSpacing( 6 );
    GroupBox19->layout()->setMargin( 11 );
    GroupBox19Layout = new QHBoxLayout( GroupBox19->layout() );
    GroupBox19Layout->setAlignment( Qt::AlignTop );

    resetAllConfigChk = new QCheckBox( GroupBox19, "resetAllConfigChk" );
    resetAllConfigChk->setText( trUtf8( "Reset on operation completion" ) );
    QToolTip::add( resetAllConfigChk, trUtf8( "This is usefull if you create <b></b>very customized CDs. After each successfull operation, 'Recording' and 'New CD' Settings will be reset to defaults." ) );
    GroupBox19Layout->addWidget( resetAllConfigChk );

    saveWithListChk = new QCheckBox( GroupBox19, "saveWithListChk" );
    saveWithListChk->setText( trUtf8( "Save settings with compilation list" ) );
    QToolTip::add( saveWithListChk, trUtf8( "This is usefull if you perform rutine <b></b>backup operations, etc. New CD properties (such as labels) will be saved with the files list." ) );
    GroupBox19Layout->addWidget( saveWithListChk );
    tabLayout_2->addWidget( GroupBox19 );
    QSpacerItem* spacer_9 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
    tabLayout_2->addItem( spacer_9 );
    TabWidget3->insertTab( tab_2, trUtf8( "Specialized Options" ) );

    tab_3 = new QWidget( TabWidget3, "tab_3" );
    tabLayout_3 = new QVBoxLayout( tab_3, 11, 6, "tabLayout_3"); 

    GroupBox2 = new QGroupBox( tab_3, "GroupBox2" );
    GroupBox2->setTitle( trUtf8( "Progress Bar Colors" ) );
    GroupBox2->setColumnLayout(0, Qt::Vertical );
    GroupBox2->layout()->setSpacing( 6 );
    GroupBox2->layout()->setMargin( 11 );
    GroupBox2Layout = new QGridLayout( GroupBox2->layout() );
    GroupBox2Layout->setAlignment( Qt::AlignTop );

    TextLabel2 = new QLabel( GroupBox2, "TextLabel2" );
    TextLabel2->setText( trUtf8( "Percent done:" ) );

    GroupBox2Layout->addWidget( TextLabel2, 0, 0 );

    TextLabel3 = new QLabel( GroupBox2, "TextLabel3" );
    TextLabel3->setText( trUtf8( "Percent left:" ) );

    GroupBox2Layout->addWidget( TextLabel3, 1, 0 );
    QSpacerItem* spacer_10 = new QSpacerItem( 20, 20, QSizePolicy::MinimumExpanding, QSizePolicy::Minimum );
    GroupBox2Layout->addItem( spacer_10, 1, 2 );

    colorLeftBtn = new KColorButton( GroupBox2, "colorLeftBtn" );
    colorLeftBtn->setMinimumSize( QSize( 150, 0 ) );
    colorLeftBtn->setText( trUtf8( "" ) );
    QToolTip::add( colorLeftBtn, trUtf8( "Oposite from the above." ) );

    GroupBox2Layout->addWidget( colorLeftBtn, 1, 1 );

    colorDoneBtn = new KColorButton( GroupBox2, "colorDoneBtn" );
    colorDoneBtn->setMaximumSize( QSize( 180, 32767 ) );
    colorDoneBtn->setText( trUtf8( "" ) );
    QToolTip::add( colorDoneBtn, trUtf8( "This color will be used to paint <b></b>done part of a process." ) );

    GroupBox2Layout->addWidget( colorDoneBtn, 0, 1 );
    QSpacerItem* spacer_11 = new QSpacerItem( 20, 20, QSizePolicy::MinimumExpanding, QSizePolicy::Minimum );
    GroupBox2Layout->addItem( spacer_11, 0, 2 );
    tabLayout_3->addWidget( GroupBox2 );
    QSpacerItem* spacer_12 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
    tabLayout_3->addItem( spacer_12 );
    TabWidget3->insertTab( tab_3, trUtf8( "C&olors" ) );
    CdboDefaultOptBaseLayout->addWidget( TabWidget3 );

    // signals and slots connections
    connect( GroupBox2, SIGNAL( destroyed(QObject*) ), this, SLOT( GroupBox2_destroyed(QObject*) ) );
    connect( doOnStartChk, SIGNAL( clicked() ), this, SLOT( slotChanged() ) );
    connect( scanSysChk, SIGNAL( clicked() ), this, SLOT( slotChanged() ) );
    connect( saveCompilationChk, SIGNAL( clicked() ), this, SLOT( slotChanged() ) );
    connect( scanDevicesChk, SIGNAL( clicked() ), this, SLOT( slotChanged() ) );
    connect( scanScsiChk, SIGNAL( clicked() ), this, SLOT( slotChanged() ) );
    connect( showWarningsChk, SIGNAL( clicked() ), this, SLOT( showWarningsSlot() ) );
    connect( showWarningsChk, SIGNAL( clicked() ), this, SLOT( slotChanged() ) );
    connect( maxSpeedSpn, SIGNAL( valueChanged(int) ), this, SLOT( slotChanged() ) );
    connect( comTimeOutSpn, SIGNAL( valueChanged(int) ), this, SLOT( slotChanged() ) );
    connect( checkSizeChk, SIGNAL( clicked() ), this, SLOT( slotChanged() ) );
    connect( checkSizeChk, SIGNAL( clicked() ), this, SLOT( chekSizeSlot() ) );
    connect( minTmpSizeSpn, SIGNAL( valueChanged(int) ), this, SLOT( slotChanged() ) );
    connect( tmpBrowseBtn, SIGNAL( clicked() ), this, SLOT( tmpBrowseSlot() ) );
    connect( tmpBrowseBtn, SIGNAL( clicked() ), this, SLOT( slotChanged() ) );
    connect( quiteOutRBtn, SIGNAL( clicked() ), this, SLOT( quiteOutSlot() ) );
    connect( quiteOutRBtn, SIGNAL( clicked() ), this, SLOT( slotChanged() ) );
    connect( colorDoneBtn, SIGNAL( clicked() ), this, SLOT( slotChanged() ) );
    connect( colorLeftBtn, SIGNAL( clicked() ), this, SLOT( slotChanged() ) );
    connect( stdOutRBtn, SIGNAL( clicked() ), this, SLOT( slotChanged() ) );
    connect( stdOutRBtn, SIGNAL( clicked() ), this, SLOT( stdOutSlot() ) );
    connect( custoutRBtn, SIGNAL( clicked() ), this, SLOT( slotChanged() ) );
    connect( custoutRBtn, SIGNAL( clicked() ), this, SLOT( customOutSlot() ) );
    connect( resetAllConfigChk, SIGNAL( clicked() ), this, SLOT( slotChanged() ) );
    connect( saveWithListChk, SIGNAL( clicked() ), this, SLOT( slotChanged() ) );
    connect( outputLevelSpn, SIGNAL( valueChanged(int) ), this, SLOT( slotChanged() ) );
    connect( debugChk, SIGNAL( clicked() ), this, SLOT( slotChanged() ) );
}

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

void CdboDefaultOptBase::cdboDetectSlot()
{
    qWarning( "CdboDefaultOptBase::cdboDetectSlot(): Not implemented yet!" );
}

void CdboDefaultOptBase::chekSizeSlot()
{
    qWarning( "CdboDefaultOptBase::chekSizeSlot(): Not implemented yet!" );
}

void CdboDefaultOptBase::customOutSlot()
{
    qWarning( "CdboDefaultOptBase::customOutSlot(): Not implemented yet!" );
}

void CdboDefaultOptBase::GroupBox2_destroyed( QObject * )
{
    qWarning( "CdboDefaultOptBase::GroupBox2_destroyed( QObject * ): Not implemented yet!" );
}

void CdboDefaultOptBase::kdeDetectSlot()
{
    qWarning( "CdboDefaultOptBase::kdeDetectSlot(): Not implemented yet!" );
}

void CdboDefaultOptBase::quiteOutSlot()
{
    qWarning( "CdboDefaultOptBase::quiteOutSlot(): Not implemented yet!" );
}

void CdboDefaultOptBase::showWarningsSlot()
{
    qWarning( "CdboDefaultOptBase::showWarningsSlot(): Not implemented yet!" );
}

void CdboDefaultOptBase::slotChanged()
{
    emit changed(true);
}

void CdboDefaultOptBase::stdOutSlot()
{
    qWarning( "CdboDefaultOptBase::stdOutSlot(): Not implemented yet!" );
}

void CdboDefaultOptBase::tmpBrowseSlot()
{
    qWarning( "CdboDefaultOptBase::tmpBrowseSlot(): Not implemented yet!" );
}

