#include <kdialog.h>
#include <tdelocale.h>

/****************************************************************************
** Form implementation generated from reading ui file 'base_k3baudiorippingoptionwidget.ui'
**
** Created by: The TQt user interface compiler (TQt 3.5.0)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "base_k3baudiorippingoptionwidget.h"

#include <ntqvariant.h>
#include <kcombobox.h>
#include <kurlrequester.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqtoolbutton.h>
#include <ntqcheckbox.h>
#include <ntqlabel.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a base_K3bAudioRippingOptionWidget as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
base_K3bAudioRippingOptionWidget::base_K3bAudioRippingOptionWidget( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "Form1" );
    Form1Layout = new TQGridLayout( this, 1, 1, 11, 6, "Form1Layout"); 

    groupBox2 = new TQGroupBox( this, "groupBox2" );
    groupBox2->setColumnLayout(0, TQt::Vertical );
    groupBox2->layout()->setSpacing( 6 );
    groupBox2->layout()->setMargin( 11 );
    groupBox2Layout = new TQHBoxLayout( groupBox2->layout() );
    groupBox2Layout->setAlignment( TQt::AlignTop );

    m_comboFileType = new KComboBox( false, groupBox2, "m_comboFileType" );
    m_comboFileType->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 1, 0, m_comboFileType->sizePolicy().hasHeightForWidth() ) );
    groupBox2Layout->addWidget( m_comboFileType );

    m_buttonConfigurePlugin = new TQToolButton( groupBox2, "m_buttonConfigurePlugin" );
    groupBox2Layout->addWidget( m_buttonConfigurePlugin );

    Form1Layout->addWidget( groupBox2, 0, 0 );

    groupBox3 = new TQGroupBox( this, "groupBox3" );
    groupBox3->setColumnLayout(0, TQt::Vertical );
    groupBox3->layout()->setSpacing( 6 );
    groupBox3->layout()->setMargin( 11 );
    groupBox3Layout = new TQVBoxLayout( groupBox3->layout() );
    groupBox3Layout->setAlignment( TQt::AlignTop );

    m_checkCreatePlaylist = new TQCheckBox( groupBox3, "m_checkCreatePlaylist" );
    groupBox3Layout->addWidget( m_checkCreatePlaylist );

    layout6 = new TQHBoxLayout( 0, 0, 6, "layout6"); 
    spacer1_2 = new TQSpacerItem( 20, 16, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout6->addItem( spacer1_2 );

    m_checkPlaylistRelative = new TQCheckBox( groupBox3, "m_checkPlaylistRelative" );
    m_checkPlaylistRelative->setEnabled( false );
    layout6->addWidget( m_checkPlaylistRelative );
    groupBox3Layout->addLayout( layout6 );

    m_checkSingleFile = new TQCheckBox( groupBox3, "m_checkSingleFile" );
    groupBox3Layout->addWidget( m_checkSingleFile );

    layout6_2 = new TQHBoxLayout( 0, 0, 6, "layout6_2"); 
    spacer1_2_2 = new TQSpacerItem( 20, 16, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout6_2->addItem( spacer1_2_2 );

    m_checkWriteCueFile = new TQCheckBox( groupBox3, "m_checkWriteCueFile" );
    m_checkWriteCueFile->setEnabled( false );
    layout6_2->addWidget( m_checkWriteCueFile );
    groupBox3Layout->addLayout( layout6_2 );

    Form1Layout->addMultiCellWidget( groupBox3, 0, 1, 1, 1 );

    groupBox1 = new TQGroupBox( this, "groupBox1" );
    groupBox1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 1, groupBox1->sizePolicy().hasHeightForWidth() ) );
    groupBox1->setColumnLayout(0, TQt::Vertical );
    groupBox1->layout()->setSpacing( 6 );
    groupBox1->layout()->setMargin( 11 );
    groupBox1Layout = new TQGridLayout( groupBox1->layout() );
    groupBox1Layout->setAlignment( TQt::AlignTop );

    textLabel1 = new TQLabel( groupBox1, "textLabel1" );

    groupBox1Layout->addWidget( textLabel1, 1, 0 );

    m_editBaseDir = new KURLRequester( groupBox1, "m_editBaseDir" );

    groupBox1Layout->addMultiCellWidget( m_editBaseDir, 0, 0, 0, 1 );

    m_labelFreeSpace = new TQLabel( groupBox1, "m_labelFreeSpace" );
    m_labelFreeSpace->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );

    groupBox1Layout->addWidget( m_labelFreeSpace, 1, 1 );

    textLabel1_2 = new TQLabel( groupBox1, "textLabel1_2" );

    groupBox1Layout->addWidget( textLabel1_2, 2, 0 );

    m_labelNeededSpace = new TQLabel( groupBox1, "m_labelNeededSpace" );
    m_labelNeededSpace->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );

    groupBox1Layout->addWidget( m_labelNeededSpace, 2, 1 );

    Form1Layout->addWidget( groupBox1, 1, 0 );
    languageChange();
    resize( TQSize(436, 182).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( m_checkCreatePlaylist, TQ_SIGNAL( toggled(bool) ), m_checkPlaylistRelative, TQ_SLOT( setEnabled(bool) ) );
    connect( m_checkSingleFile, TQ_SIGNAL( toggled(bool) ), m_checkWriteCueFile, TQ_SLOT( setEnabled(bool) ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void base_K3bAudioRippingOptionWidget::languageChange()
{
    groupBox2->setTitle( tr2i18n( "Filetype" ) );
    m_buttonConfigurePlugin->setText( tr2i18n( "..." ) );
    TQToolTip::add( m_buttonConfigurePlugin, tr2i18n( "Configure Plugin" ) );
    groupBox3->setTitle( tr2i18n( "Options" ) );
    m_checkCreatePlaylist->setText( tr2i18n( "Create m&3u playlist" ) );
    TQToolTip::add( m_checkCreatePlaylist, tr2i18n( "Create playlist for the ripped files" ) );
    TQWhatsThis::add( m_checkCreatePlaylist, tr2i18n( "<p>If this option is checked K3b will create a playlist of the ripped files\n"
"which can be used with programs like xmms or noatun.\n"
"<p>You may use the special strings to give the playlist a unique filename." ) );
    m_checkPlaylistRelative->setText( tr2i18n( "&Use relative paths" ) );
    TQToolTip::add( m_checkPlaylistRelative, tr2i18n( "Use relative paths instead of absolute" ) );
    TQWhatsThis::add( m_checkPlaylistRelative, tr2i18n( "<p>If this option is checked, the entries in the playlist will be relative to its location.\n"
"<p>Example: If your playlist is located in <em>/home/myself/music</em> and\n"
"your audio files are in <em>/home/myself/music/cool</em>; then the entries in the\n"
"playlist will look something like: <em>cool/track1.ogg</em>." ) );
    m_checkSingleFile->setText( tr2i18n( "Create si&ngle file" ) );
    TQToolTip::add( m_checkSingleFile, tr2i18n( "Rip all tracks to a single file" ) );
    TQWhatsThis::add( m_checkSingleFile, tr2i18n( "<p>If this option is checked K3b will create only one\n"
"audio file no matter how many tracks are ripped. This\n"
"file will contain all tracks one after the other.\n"
"<p>This might be useful to rip a live album or a radio play.\n"
"<p><b>Caution:</b> The file will have the name of the first track." ) );
    m_checkWriteCueFile->setText( tr2i18n( "Write &cue file" ) );
    TQToolTip::add( m_checkWriteCueFile, tr2i18n( "Write a cuefile" ) );
    TQWhatsThis::add( m_checkWriteCueFile, tr2i18n( "<p>If this option is checked K3b will create a CDRWIN cue file which allows to easily write a copy of the audio CD on other systems." ) );
    groupBox1->setTitle( tr2i18n( "Target Folder" ) );
    textLabel1->setText( tr2i18n( "Free space in directory:" ) );
    m_labelFreeSpace->setText( tr2i18n( "-" ) );
    textLabel1_2->setText( tr2i18n( "Space needed:" ) );
    m_labelNeededSpace->setText( tr2i18n( "-" ) );
}

/****************************************************************************
** base_K3bAudioRippingOptionWidget meta object code from reading C++ file 'base_k3baudiorippingoptionwidget.h'
**
** Created by: The TQt Meta Object Compiler version 26 (TQt 3.5.0)
** WARNING! All changes made in this file will be lost!
*****************************************************************************/

#undef TQT_NO_COMPAT
#include "base_k3baudiorippingoptionwidget.h"
#include <ntqmetaobject.h>
#include <ntqapplication.h>

#include <private/qucomextra_p.h>
#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26)
#error "This file was generated using the moc from 3.5.0. It"
#error "cannot be used with the include files from this version of TQt."
#error "(The moc has changed too much.)"
#endif

const char *base_K3bAudioRippingOptionWidget::className() const
{
    return "base_K3bAudioRippingOptionWidget";
}

TQMetaObject *base_K3bAudioRippingOptionWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_base_K3bAudioRippingOptionWidget( "base_K3bAudioRippingOptionWidget", &base_K3bAudioRippingOptionWidget::staticMetaObject );

#ifndef TQT_NO_TRANSLATION
TQString base_K3bAudioRippingOptionWidget::tr( const char *s, const char *c )
{
    if ( tqApp )
	return tqApp->translate( "base_K3bAudioRippingOptionWidget", s, c, TQApplication::DefaultCodec );
    else
	return TQString::fromLatin1( s );
}
#ifndef TQT_NO_TRANSLATION_UTF8
TQString base_K3bAudioRippingOptionWidget::trUtf8( const char *s, const char *c )
{
    if ( tqApp )
	return tqApp->translate( "base_K3bAudioRippingOptionWidget", s, c, TQApplication::UnicodeUTF8 );
    else
	return TQString::fromUtf8( s );
}
#endif // TQT_NO_TRANSLATION_UTF8

#endif // TQT_NO_TRANSLATION

TQMetaObject* base_K3bAudioRippingOptionWidget::staticMetaObject()
{
    if ( metaObj ) {
	return metaObj;
}
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->lock();
    if ( metaObj ) {
	if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
	return metaObj;
    }
#endif // TQT_THREAD_SUPPORT
    TQMetaObject* parentObject = TQWidget::staticMetaObject();
    static const TQUMethod slot_0 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"base_K3bAudioRippingOptionWidget", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_base_K3bAudioRippingOptionWidget.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

void* base_K3bAudioRippingOptionWidget::tqt_cast( const char* clname )
{
    if ( !qstrcmp( clname, "base_K3bAudioRippingOptionWidget" ) )
	return this;
    return TQWidget::tqt_cast( clname );
}

bool base_K3bAudioRippingOptionWidget::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: languageChange(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

bool base_K3bAudioRippingOptionWidget::tqt_emit( int _id, TQUObject* _o )
{
    return TQWidget::tqt_emit(_id,_o);
}
#ifndef TQT_NO_PROPERTIES

bool base_K3bAudioRippingOptionWidget::tqt_property( int id, int f, TQVariant* v)
{
    return TQWidget::tqt_property( id, f, v);
}

bool base_K3bAudioRippingOptionWidget::tqt_static_property( TQObject* , int , int , TQVariant* ){ return false; }
#endif // TQT_NO_PROPERTIES
