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

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

#include "gwaccountpreferences.h"

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

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

    tabWidget11 = new TQTabWidget( this, "tabWidget11" );

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

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

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

    textLabel1 = new TQLabel( groupBox55, "textLabel1" );
    layout1->addWidget( textLabel1 );

    m_userId = new TQLineEdit( groupBox55, "m_userId" );
    layout1->addWidget( m_userId );
    groupBox55Layout->addLayout( layout1 );

    m_password = new Kopete::UI::PasswordWidget( groupBox55, "m_password" );
    groupBox55Layout->addWidget( m_password );

    m_autoConnect = new TQCheckBox( groupBox55, "m_autoConnect" );
    groupBox55Layout->addWidget( m_autoConnect );

    line1 = new TQFrame( groupBox55, "line1" );
    line1->setFrameShape( TQFrame::HLine );
    line1->setFrameShadow( TQFrame::Sunken );
    line1->setFrameShape( TQFrame::HLine );
    groupBox55Layout->addWidget( line1 );

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

    labelServer = new TQLabel( groupBox55, "labelServer" );
    labelServer->setEnabled( true );
    labelServer->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, labelServer->sizePolicy().hasHeightForWidth() ) );
    layout66->addWidget( labelServer );

    m_server = new TQLineEdit( groupBox55, "m_server" );
    m_server->setEnabled( true );
    layout66->addWidget( m_server );

    labelPort = new TQLabel( groupBox55, "labelPort" );
    labelPort->setEnabled( true );
    labelPort->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, labelPort->sizePolicy().hasHeightForWidth() ) );
    layout66->addWidget( labelPort );

    m_port = new TQSpinBox( groupBox55, "m_port" );
    m_port->setEnabled( true );
    m_port->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, m_port->sizePolicy().hasHeightForWidth() ) );
    m_port->setButtonSymbols( TQSpinBox::UpDownArrows );
    m_port->setMaxValue( 65535 );
    m_port->setMinValue( 1 );
    m_port->setValue( 8300 );
    layout66->addWidget( m_port );
    groupBox55Layout->addLayout( layout66 );
    tabLayout->addWidget( groupBox55 );
    tabWidget11->insertTab( tab, TQString::fromLatin1("") );

    TabPage = new TQWidget( tabWidget11, "TabPage" );
    TabPageLayout = new TQVBoxLayout( TabPage, 11, 6, "TabPageLayout"); 

    m_alwaysAccept = new TQCheckBox( TabPage, "m_alwaysAccept" );
    TabPageLayout->addWidget( m_alwaysAccept );
    spacer7 = new TQSpacerItem( 20, 91, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    TabPageLayout->addItem( spacer7 );
    tabWidget11->insertTab( TabPage, TQString::fromLatin1("") );
    GroupWiseAccountPreferencesLayout->addWidget( tabWidget11 );

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

    // buddies
    textLabel1->setBuddy( m_userId );
    labelServer->setBuddy( m_server );
    labelPort->setBuddy( m_port );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void GroupWiseAccountPreferences::languageChange()
{
    setCaption( tr2i18n( "Account Preferences - Groupwise" ) );
    groupBox55->setTitle( tr2i18n( "Account Information" ) );
    textLabel1->setText( tr2i18n( "&User ID:" ) );
    TQToolTip::add( textLabel1, tr2i18n( "The account name of your account." ) );
    TQWhatsThis::add( textLabel1, tr2i18n( "The account name of your account." ) );
    TQToolTip::add( m_userId, tr2i18n( "The account name of your account." ) );
    TQWhatsThis::add( m_userId, tr2i18n( "The account name of your account." ) );
    m_autoConnect->setText( tr2i18n( "E&xclude from connect all" ) );
    TQWhatsThis::add( m_autoConnect, 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" ) );
    labelServer->setText( tr2i18n( "Ser&ver:" ) );
    TQToolTip::add( labelServer, tr2i18n( "The IP address or hostname of the server you would like to connect to." ) );
    TQWhatsThis::add( labelServer, tr2i18n( "The IP address or hostname of the server you would like to connect to (for example im.yourcorp.com)." ) );
    m_server->setText( TQString::null );
    TQToolTip::add( m_server, tr2i18n( "The IP address or hostname of the server you would like to connect to." ) );
    TQWhatsThis::add( m_server, tr2i18n( "The IP address or hostname of the server you would like to connect to (for example im.yourcorp.com)." ) );
    labelPort->setText( tr2i18n( "Po&rt:" ) );
    TQToolTip::add( labelPort, tr2i18n( "The port on the server that you would like to connect to." ) );
    TQWhatsThis::add( labelPort, tr2i18n( "The port on the server that you would like to connect to (default is 5222)." ) );
    TQToolTip::add( m_port, tr2i18n( "The port on the server that you would like to connect to." ) );
    TQWhatsThis::add( m_port, tr2i18n( "The port on the server that you would like to connect to (default is 5222)." ) );
    tabWidget11->changeTab( tab, tr2i18n( "B&asic Setup" ) );
    m_alwaysAccept->setText( tr2i18n( "A&lways accept invitations" ) );
    tabWidget11->changeTab( TabPage, tr2i18n( "Advanced &Options" ) );
    labelStatusMessage->setText( TQString::null );
}

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

TQMetaObject *GroupWiseAccountPreferences::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_GroupWiseAccountPreferences( "GroupWiseAccountPreferences", &GroupWiseAccountPreferences::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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