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

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

#include "Options8.h"

#include <ntqvariant.h>
#include <kactivelabel.h>
#include <klineedit.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqgroupbox.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "Options8.ui.h"

/*
 *  Constructs a Options8 as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
Options8::Options8( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "Options8" );
    setMinimumSize( TQSize( 1, 1 ) );
    Options8Layout = new TQVBoxLayout( this, 0, 12, "Options8Layout"); 

    layout2 = new TQHBoxLayout( 0, 0, 12, "layout2"); 

    infoPixmap_2 = new TQLabel( this, "infoPixmap_2" );
    infoPixmap_2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)1, 0, 0, infoPixmap_2->sizePolicy().hasHeightForWidth() ) );
    infoPixmap_2->setAlignment( int( TQLabel::AlignVCenter ) );
    layout2->addWidget( infoPixmap_2 );

    kActiveLabel3 = new KActiveLabel( this, "kActiveLabel3" );
    kActiveLabel3->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)4, 0, 0, kActiveLabel3->sizePolicy().hasHeightForWidth() ) );
    kActiveLabel3->setMinimumSize( TQSize( 0, 0 ) );
    layout2->addWidget( kActiveLabel3 );
    Options8Layout->addLayout( layout2 );

    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 );

    kActiveLabel1 = new KActiveLabel( groupBox3, "kActiveLabel1" );
    kActiveLabel1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, kActiveLabel1->sizePolicy().hasHeightForWidth() ) );
    groupBox3Layout->addWidget( kActiveLabel1 );

    layout3 = new TQGridLayout( 0, 1, 1, 0, 6, "layout3"); 

    kcfg_ScrobblerUsername = new KLineEdit( groupBox3, "kcfg_ScrobblerUsername" );
    kcfg_ScrobblerUsername->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, kcfg_ScrobblerUsername->sizePolicy().hasHeightForWidth() ) );

    layout3->addWidget( kcfg_ScrobblerUsername, 0, 1 );

    labelPassword = new TQLabel( groupBox3, "labelPassword" );
    labelPassword->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, labelPassword->sizePolicy().hasHeightForWidth() ) );

    layout3->addWidget( labelPassword, 1, 0 );

    labelUsername = new TQLabel( groupBox3, "labelUsername" );
    labelUsername->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, labelUsername->sizePolicy().hasHeightForWidth() ) );

    layout3->addWidget( labelUsername, 0, 0 );

    kcfg_ScrobblerPassword = new KLineEdit( groupBox3, "kcfg_ScrobblerPassword" );
    kcfg_ScrobblerPassword->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, kcfg_ScrobblerPassword->sizePolicy().hasHeightForWidth() ) );
    kcfg_ScrobblerPassword->setEchoMode( KLineEdit::Password );

    layout3->addWidget( kcfg_ScrobblerPassword, 1, 1 );
    groupBox3Layout->addLayout( layout3 );
    Options8Layout->addWidget( groupBox3 );

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

    textLabel1 = new TQLabel( groupBox2, "textLabel1" );
    textLabel1->setTextFormat( TQLabel::RichText );
    groupBox2Layout->addWidget( textLabel1 );

    kcfg_SubmitPlayedSongs = new TQCheckBox( groupBox2, "kcfg_SubmitPlayedSongs" );
    kcfg_SubmitPlayedSongs->setEnabled( false );
    kcfg_SubmitPlayedSongs->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, kcfg_SubmitPlayedSongs->sizePolicy().hasHeightForWidth() ) );
    groupBox2Layout->addWidget( kcfg_SubmitPlayedSongs );

    kcfg_RetrieveSimilarArtists = new TQCheckBox( groupBox2, "kcfg_RetrieveSimilarArtists" );
    kcfg_RetrieveSimilarArtists->setEnabled( true );
    groupBox2Layout->addWidget( kcfg_RetrieveSimilarArtists );
    Options8Layout->addWidget( groupBox2 );

    kActiveLabel2 = new KActiveLabel( this, "kActiveLabel2" );
    kActiveLabel2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, kActiveLabel2->sizePolicy().hasHeightForWidth() ) );
    Options8Layout->addWidget( kActiveLabel2 );
    spacer4 = new TQSpacerItem( 20, 30, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    Options8Layout->addItem( spacer4 );
    languageChange();
    resize( TQSize(425, 418).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( kcfg_ScrobblerUsername, TQ_SIGNAL( textChanged(const TQString&) ), this, TQ_SLOT( updateServices(const TQString&) ) );

    // buddies
    labelPassword->setBuddy( kcfg_ScrobblerPassword );
    labelUsername->setBuddy( kcfg_ScrobblerUsername );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void Options8::languageChange()
{
    infoPixmap_2->setText( TQString::null );
    kActiveLabel3->setText( tr2i18n( "Amarok can send the name of every song you play to last.fm. The system automatically matches you to people with similar musical tastes, and creates personalized recommendations. To learn more about last.fm, <A href='http://www.last.fm'>visit the homepage</A>." ) );
    groupBox3->setTitle( tr2i18n( "last.fm Profile" ) );
    kActiveLabel1->setText( tr2i18n( "<P>To use last.fm with Amarok, you need a <A href='http://www.last.fm:80/signup.php'>last.fm profile</A>." ) );
    labelPassword->setText( tr2i18n( "&Password:" ) );
    labelUsername->setText( tr2i18n( "&Username:" ) );
    groupBox2->setTitle( tr2i18n( "last.fm Services" ) );
    textLabel1->setText( tr2i18n( "Once registered, Amarok can tell the last.fm service about your listening habits; your profile can then provide statistics and recommendations. A profile is not required to retrieve similar-artists for display in the Context Browser." ) );
    kcfg_SubmitPlayedSongs->setText( tr2i18n( "Improve m&y profile by submitting the tracks I play" ) );
    kcfg_RetrieveSimilarArtists->setText( tr2i18n( "&Retrieve similar artists" ) );
    kActiveLabel2->setText( tr2i18n( "Why not join the <A href='http://www.last.fm:80/group/Amarok+Users'>Amarok last.fm group</A> and share your musical tastes with other Amarok users?" ) );
}

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

TQMetaObject *Options8::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_Options8( "Options8", &Options8::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* Options8::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 TQUParameter param_slot_1[] = {
	{ "s", &static_QUType_TQString, 0, TQUParameter::In }
    };
    static const TQUMethod slot_1 = {"updateServices", 1, param_slot_1 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected },
	{ "updateServices(const TQString&)", &slot_1, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"Options8", parentObject,
	slot_tbl, 2,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_Options8.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool Options8::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: languageChange(); break;
    case 1: updateServices((const TQString&)static_QUType_TQString.get(_o+1)); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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