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

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

#include "yahooeditaccountbase.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqtabwidget.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqlineedit.h>
#include <ntqcheckbox.h>
#include <ntqspinbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    tabWidget11 = new TQTabWidget( this, "tabWidget11" );
    tabWidget11->setMinimumSize( TQSize( 460, 0 ) );

    tab = new TQWidget( tabWidget11, "tab" );
    tabLayout = new TQVBoxLayout( tab, 11, 6, "tabLayout"); 

    mAccountInfo = new TQGroupBox( tab, "mAccountInfo" );
    mAccountInfo->setColumnLayout(0, TQt::Vertical );
    mAccountInfo->layout()->setSpacing( 6 );
    mAccountInfo->layout()->setMargin( 11 );
    mAccountInfoLayout = new TQVBoxLayout( mAccountInfo->layout() );
    mAccountInfoLayout->setAlignment( TQt::AlignTop );

    layout81 = new TQHBoxLayout( 0, 0, 6, "layout81"); 

    label1 = new TQLabel( mAccountInfo, "label1" );
    layout81->addWidget( label1 );

    mScreenName = new TQLineEdit( mAccountInfo, "mScreenName" );
    layout81->addWidget( mScreenName );
    mAccountInfoLayout->addLayout( layout81 );

    mAutoConnect = new TQCheckBox( mAccountInfo, "mAutoConnect" );
    mAccountInfoLayout->addWidget( mAutoConnect );

    mGlobalIdentity = new TQCheckBox( mAccountInfo, "mGlobalIdentity" );
    mAccountInfoLayout->addWidget( mGlobalIdentity );
    tabLayout->addWidget( mAccountInfo );

    groupBox5 = new TQGroupBox( tab, "groupBox5" );
    groupBox5->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)1, 0, 0, groupBox5->sizePolicy().hasHeightForWidth() ) );
    groupBox5->setColumnLayout(0, TQt::Vertical );
    groupBox5->layout()->setSpacing( 6 );
    groupBox5->layout()->setMargin( 11 );
    groupBox5Layout = new TQHBoxLayout( groupBox5->layout() );
    groupBox5Layout->setAlignment( TQt::AlignTop );

    textLabel6 = new TQLabel( groupBox5, "textLabel6" );
    textLabel6->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)1, 0, 0, textLabel6->sizePolicy().hasHeightForWidth() ) );
    textLabel6->setMinimumSize( TQSize( 0, 0 ) );
    textLabel6->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) );
    groupBox5Layout->addWidget( textLabel6 );

    buttonRegister = new TQPushButton( groupBox5, "buttonRegister" );
    buttonRegister->setEnabled( true );
    groupBox5Layout->addWidget( buttonRegister );
    tabLayout->addWidget( groupBox5 );
    spacer6 = new TQSpacerItem( 20, 81, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    tabLayout->addItem( spacer6 );
    tabWidget11->insertTab( tab, TQString::fromLatin1("") );

    TabPage = new TQWidget( tabWidget11, "TabPage" );
    TabPageLayout = new TQGridLayout( TabPage, 1, 1, 11, 6, "TabPageLayout"); 
    spacer4 = new TQSpacerItem( 20, 110, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    TabPageLayout->addItem( spacer4, 2, 0 );

    groupBox73 = new TQGroupBox( TabPage, "groupBox73" );
    groupBox73->setColumnLayout(0, TQt::Vertical );
    groupBox73->layout()->setSpacing( 6 );
    groupBox73->layout()->setMargin( 11 );
    groupBox73Layout = new TQVBoxLayout( groupBox73->layout() );
    groupBox73Layout->setAlignment( TQt::AlignTop );

    optionOverrideServer = new TQCheckBox( groupBox73, "optionOverrideServer" );
    optionOverrideServer->setChecked( false );
    groupBox73Layout->addWidget( optionOverrideServer );

    layout58 = new TQHBoxLayout( 0, 0, 6, "layout58"); 

    lblServer = new TQLabel( groupBox73, "lblServer" );
    lblServer->setEnabled( false );
    layout58->addWidget( lblServer );

    editServerAddress = new TQLineEdit( groupBox73, "editServerAddress" );
    editServerAddress->setEnabled( false );
    layout58->addWidget( editServerAddress );

    lblPort = new TQLabel( groupBox73, "lblPort" );
    lblPort->setEnabled( false );
    layout58->addWidget( lblPort );

    sbxServerPort = new TQSpinBox( groupBox73, "sbxServerPort" );
    sbxServerPort->setEnabled( false );
    sbxServerPort->setMaxValue( 65534 );
    sbxServerPort->setMinValue( 1 );
    sbxServerPort->setValue( 5050 );
    layout58->addWidget( sbxServerPort );
    groupBox73Layout->addLayout( layout58 );

    TabPageLayout->addWidget( groupBox73, 0, 0 );

    groupBox4 = new TQGroupBox( TabPage, "groupBox4" );
    groupBox4->setColumnLayout(0, TQt::Vertical );
    groupBox4->layout()->setSpacing( 6 );
    groupBox4->layout()->setMargin( 11 );
    groupBox4Layout = new TQGridLayout( groupBox4->layout() );
    groupBox4Layout->setAlignment( TQt::AlignTop );

    editPictureUrl = new TQLineEdit( groupBox4, "editPictureUrl" );

    groupBox4Layout->addWidget( editPictureUrl, 1, 0 );

    buttonSelectPicture = new TQPushButton( groupBox4, "buttonSelectPicture" );

    groupBox4Layout->addWidget( buttonSelectPicture, 1, 1 );

    m_Picture = new TQLabel( groupBox4, "m_Picture" );
    m_Picture->setMinimumSize( TQSize( 96, 96 ) );
    m_Picture->setMaximumSize( TQSize( 96, 96 ) );
    m_Picture->setFrameShape( TQLabel::GroupBoxPanel );
    m_Picture->setMargin( 0 );
    m_Picture->setScaledContents( true );

    groupBox4Layout->addMultiCellWidget( m_Picture, 0, 1, 2, 2 );

    optionSendBuddyIcon = new TQCheckBox( groupBox4, "optionSendBuddyIcon" );

    groupBox4Layout->addMultiCellWidget( optionSendBuddyIcon, 0, 0, 0, 1 );

    TabPageLayout->addWidget( groupBox4, 1, 0 );
    tabWidget11->insertTab( TabPage, TQString::fromLatin1("") );
    YahooEditAccountBaseLayout->addWidget( tabWidget11 );

    labelStatusMessage = new TQLabel( this, "labelStatusMessage" );
    labelStatusMessage->setAlignment( int( TQLabel::AlignCenter ) );
    YahooEditAccountBaseLayout->addWidget( labelStatusMessage );
    languageChange();
    resize( TQSize(462, 344).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( optionOverrideServer, TQ_SIGNAL( toggled(bool) ), lblPort, TQ_SLOT( setEnabled(bool) ) );
    connect( optionOverrideServer, TQ_SIGNAL( toggled(bool) ), lblServer, TQ_SLOT( setEnabled(bool) ) );
    connect( optionOverrideServer, TQ_SIGNAL( toggled(bool) ), editServerAddress, TQ_SLOT( setEnabled(bool) ) );
    connect( optionOverrideServer, TQ_SIGNAL( toggled(bool) ), sbxServerPort, TQ_SLOT( setEnabled(bool) ) );
    connect( optionSendBuddyIcon, TQ_SIGNAL( toggled(bool) ), editPictureUrl, TQ_SLOT( setEnabled(bool) ) );

    // tab order
    setTabOrder( tabWidget11, mScreenName );
    setTabOrder( mScreenName, mAutoConnect );
    setTabOrder( mAutoConnect, buttonRegister );

    // buddies
    label1->setBuddy( mScreenName );
    lblPort->setBuddy( sbxServerPort );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void YahooEditAccountBase::languageChange()
{
    setCaption( tr2i18n( "Account Preferences - Yahoo" ) );
    mAccountInfo->setTitle( tr2i18n( "Account Information" ) );
    label1->setText( tr2i18n( "&Yahoo username:" ) );
    TQToolTip::add( label1, tr2i18n( "The account name of your Yahoo account." ) );
    TQWhatsThis::add( label1, tr2i18n( "The account name of your Yahoo account.  This should be in the form of an alphanumeric string (no spaces)." ) );
    TQToolTip::add( mScreenName, tr2i18n( "The account name of your Yahoo account." ) );
    TQWhatsThis::add( mScreenName, tr2i18n( "The account name of your Yahoo account.  This should be in the form of an alphanumeric string (no spaces)." ) );
    mAutoConnect->setText( tr2i18n( "E&xclude from connect all" ) );
    TQWhatsThis::add( mAutoConnect, tr2i18n( "Check to disable automatic connection.  If checked, you may connect to this account manually using the icon in the bottom of the main Kopete window" ) );
    mGlobalIdentity->setText( tr2i18n( "Exclude from &Global Identity" ) );
    groupBox5->setTitle( tr2i18n( "Registration" ) );
    textLabel6->setText( tr2i18n( "To connect to the Yahoo network, you will need a Yahoo account.<br><br>If you do not currently have a Yahoo account, please click the button to create one." ) );
    buttonRegister->setText( tr2i18n( "Register &New Account" ) );
    TQToolTip::add( buttonRegister, tr2i18n( "Register a new account on this network." ) );
    TQWhatsThis::add( buttonRegister, tr2i18n( "Register a new account on this network." ) );
    tabWidget11->changeTab( tab, tr2i18n( "&Basic Setup" ) );
    groupBox73->setTitle( tr2i18n( "Connection Preferences" ) );
    optionOverrideServer->setText( tr2i18n( "O&verride default server information" ) );
    lblServer->setText( tr2i18n( "Ser&ver:" ) );
    TQToolTip::add( lblServer, tr2i18n( "The IP address or hostmask of the Yahoo server you wish to connect to." ) );
    TQWhatsThis::add( lblServer, tr2i18n( "The IP address or hostmask of the Yahoo server you wish to connect to.  Normally you will want the default (scs.msg.yahoo.com)." ) );
    editServerAddress->setText( tr2i18n( "scs.msg.yahoo.com" ) );
    TQToolTip::add( editServerAddress, tr2i18n( "The IP address or hostmask of the Yahoo server you wish to connect to." ) );
    TQWhatsThis::add( editServerAddress, tr2i18n( "The IP address or hostmask of the Yahoo server you wish to connect to.  Normally you will want the default (scs.msg.yahoo.com)." ) );
    lblPort->setText( tr2i18n( "P&ort:" ) );
    TQToolTip::add( lblPort, tr2i18n( "The port on the Yahoo server that you would like to connect to." ) );
    TQWhatsThis::add( lblPort, tr2i18n( "The port on the Yahoo server that you would like to connect to.  Normally this is 5050, but Yahoo also allows port 80 in case you are behind a firewall." ) );
    TQToolTip::add( sbxServerPort, tr2i18n( "The port on the Yahoo server that you would like to connect  to." ) );
    TQWhatsThis::add( sbxServerPort, tr2i18n( "The port on the Yahoo server that you would like to connect to.  Normally this is 5050, but Yahoo also allows port 80 in case you are behind a firewall." ) );
    groupBox4->setTitle( tr2i18n( "Buddy Icon" ) );
    buttonSelectPicture->setText( tr2i18n( "Select Picture..." ) );
    m_Picture->setText( TQString::null );
    optionSendBuddyIcon->setText( tr2i18n( "Se&nd buddy icon to other users" ) );
    tabWidget11->changeTab( TabPage, tr2i18n( "Accoun&t Preferences" ) );
    labelStatusMessage->setText( TQString::null );
}

void YahooEditAccountBase::slotSelectPicture()
{
    tqWarning( "YahooEditAccountBase::slotSelectPicture(): Not implemented yet" );
}

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

TQMetaObject *YahooEditAccountBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_YahooEditAccountBase( "YahooEditAccountBase", &YahooEditAccountBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* YahooEditAccountBase::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 TQUMethod slot_1 = {"slotSelectPicture", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected },
	{ "slotSelectPicture()", &slot_1, TQMetaData::Private }
    };
    metaObj = TQMetaObject::new_metaobject(
	"YahooEditAccountBase", parentObject,
	slot_tbl, 2,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_YahooEditAccountBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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