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

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

#include "podcastsettingsbase.h"

#include <ntqvariant.h>
#include <kurlrequester.h>
#include <klineedit.h>
#include <kpushbutton.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqcheckbox.h>
#include <ntqlabel.h>
#include <ntqspinbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    buttonGroup1 = new TQButtonGroup( this, "buttonGroup1" );
    buttonGroup1->setLineWidth( 1 );
    buttonGroup1->setMargin( 6 );
    buttonGroup1->setColumnLayout(0, TQt::Vertical );
    buttonGroup1->layout()->setSpacing( 6 );
    buttonGroup1->layout()->setMargin( 11 );
    buttonGroup1Layout = new TQVBoxLayout( buttonGroup1->layout() );
    buttonGroup1Layout->setAlignment( TQt::AlignTop );

    m_streamRadio = new TQRadioButton( buttonGroup1, "m_streamRadio" );
    buttonGroup1Layout->addWidget( m_streamRadio );

    m_downloadRadio = new TQRadioButton( buttonGroup1, "m_downloadRadio" );
    buttonGroup1Layout->addWidget( m_downloadRadio );

    m_addToMediaDeviceCheck = new TQCheckBox( buttonGroup1, "m_addToMediaDeviceCheck" );
    buttonGroup1Layout->addWidget( m_addToMediaDeviceCheck );

    Form1Layout->addMultiCellWidget( buttonGroup1, 3, 3, 0, 5 );

    m_purgeCheck = new TQCheckBox( this, "m_purgeCheck" );

    Form1Layout->addMultiCellWidget( m_purgeCheck, 4, 4, 0, 2 );
    spacer16 = new TQSpacerItem( 111, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    Form1Layout->addItem( spacer16, 4, 3 );

    m_purgeCountLabel = new TQLabel( this, "m_purgeCountLabel" );

    Form1Layout->addWidget( m_purgeCountLabel, 4, 4 );

    m_purgeCountSpinBox = new TQSpinBox( this, "m_purgeCountSpinBox" );
    m_purgeCountSpinBox->setMinValue( 1 );

    Form1Layout->addWidget( m_purgeCountSpinBox, 4, 5 );

    m_autoFetchCheck = new TQCheckBox( this, "m_autoFetchCheck" );

    Form1Layout->addMultiCellWidget( m_autoFetchCheck, 2, 2, 0, 5 );

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

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

    m_saveLocation = new KURLRequester( this, "m_saveLocation" );

    Form1Layout->addMultiCellWidget( m_saveLocation, 1, 1, 2, 5 );
    spacer17 = new TQSpacerItem( 20, 5, TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding );
    Form1Layout->addItem( spacer17, 5, 3 );
    languageChange();
    resize( TQSize(499, 213).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( m_purgeCheck, TQ_SIGNAL( toggled(bool) ), m_purgeCountSpinBox, TQ_SLOT( setEnabled(bool) ) );
    connect( m_purgeCheck, TQ_SIGNAL( toggled(bool) ), m_purgeCountLabel, TQ_SLOT( setEnabled(bool) ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void PodcastSettingsDialogBase::languageChange()
{
    setCaption( tr2i18n( "Podcast Configuration" ) );
    buttonGroup1->setTitle( tr2i18n( "Media Download" ) );
    m_streamRadio->setText( tr2i18n( "Stream or download on re&quest" ) );
    TQToolTip::add( m_streamRadio, tr2i18n( "Media must be explicitly downloaded, otherwise the podcast will be played from the remote server." ) );
    TQWhatsThis::add( m_streamRadio, tr2i18n( "Media must be explicitly downloaded, otherwise the podcast will be played from the remote server." ) );
    m_downloadRadio->setText( tr2i18n( "Download when a&vailable" ) );
    TQToolTip::add( m_downloadRadio, tr2i18n( "Download media as soon as it becomes available" ) );
    TQWhatsThis::add( m_downloadRadio, tr2i18n( "Download media as soon as it becomes available" ) );
    m_addToMediaDeviceCheck->setText( tr2i18n( "Add to media device &transfer queue" ) );
    TQToolTip::add( m_addToMediaDeviceCheck, tr2i18n( "When checked, Amarok will automatically add newly downloaded podcast shows to the media device transfer queue" ) );
    TQWhatsThis::add( m_addToMediaDeviceCheck, tr2i18n( "When checked, Amarok will automatically add newly downloaded podcast shows to the media device transfer queue" ) );
    m_purgeCheck->setText( tr2i18n( "Limit &number of episodes" ) );
    TQToolTip::add( m_purgeCheck, tr2i18n( "If checked, Amarok will throw away old podcast episodes" ) );
    TQWhatsThis::add( m_purgeCheck, tr2i18n( "If checked, Amarok will throw away old podcast episodes" ) );
    m_purgeCountLabel->setText( tr2i18n( "Keep maximum of:" ) );
    m_purgeCountSpinBox->setSuffix( tr2i18n( " Items" ) );
    TQToolTip::add( m_purgeCountSpinBox, tr2i18n( "The maximum number of podcast items to store" ) );
    TQWhatsThis::add( m_purgeCountSpinBox, tr2i18n( "The maximum number of podcast items to store" ) );
    m_autoFetchCheck->setText( tr2i18n( "Automatically scan for updates" ) );
    TQToolTip::add( m_autoFetchCheck, tr2i18n( "When checked, Amarok will automatically scan the podcast for updates" ) );
    TQWhatsThis::add( m_autoFetchCheck, tr2i18n( "When checked, Amarok will automatically scan the podcast for updates" ) );
    textLabel1->setText( tr2i18n( "Save location:" ) );
}

/****************************************************************************
** PodcastSettingsDialogBase meta object code from reading C++ file 'podcastsettingsbase.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 "podcastsettingsbase.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 *PodcastSettingsDialogBase::className() const
{
    return "PodcastSettingsDialogBase";
}

TQMetaObject *PodcastSettingsDialogBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_PodcastSettingsDialogBase( "PodcastSettingsDialogBase", &PodcastSettingsDialogBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* PodcastSettingsDialogBase::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(
	"PodcastSettingsDialogBase", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_PodcastSettingsDialogBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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