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

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

#include "main_widget.h"

#include <ntqvariant.h>
#include <kdialog.h>
#include <kpushbutton.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqlineedit.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a MainWidget as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
MainWidget::MainWidget( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "MainWidget" );
    MainWidgetLayout = new TQGridLayout( this, 1, 1, KDialog::marginHint(), KDialog::spacingHint(), "MainWidgetLayout"); 

    btnChangeFace = new KPushButton( this, "btnChangeFace" );
    btnChangeFace->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, btnChangeFace->sizePolicy().hasHeightForWidth() ) );
    btnChangeFace->setMinimumSize( TQSize( 74, 74 ) );
    btnChangeFace->setMaximumSize( TQSize( 74, 74 ) );
    btnChangeFace->setAcceptDrops( true );

    MainWidgetLayout->addWidget( btnChangeFace, 0, 0 );

    grpUserInformation = new TQGroupBox( this, "grpUserInformation" );
    grpUserInformation->setColumnLayout(0, TQt::Vertical );
    grpUserInformation->layout()->setSpacing( KDialog::spacingHint() );
    grpUserInformation->layout()->setMargin( KDialog::marginHint() );
    grpUserInformationLayout = new TQGridLayout( grpUserInformation->layout() );
    grpUserInformationLayout->setAlignment( TQt::AlignTop );

    lblOrganisation = new TQLabel( grpUserInformation, "lblOrganisation" );

    grpUserInformationLayout->addWidget( lblOrganisation, 1, 0 );

    leRealname = new TQLineEdit( grpUserInformation, "leRealname" );

    grpUserInformationLayout->addWidget( leRealname, 0, 1 );

    lblRealName = new TQLabel( grpUserInformation, "lblRealName" );

    grpUserInformationLayout->addWidget( lblRealName, 0, 0 );

    leOrganization = new TQLineEdit( grpUserInformation, "leOrganization" );

    grpUserInformationLayout->addWidget( leOrganization, 1, 1 );

    lblEmail = new TQLabel( grpUserInformation, "lblEmail" );

    grpUserInformationLayout->addWidget( lblEmail, 2, 0 );

    leEmail = new TQLineEdit( grpUserInformation, "leEmail" );

    grpUserInformationLayout->addWidget( leEmail, 2, 1 );

    textLabel3 = new TQLabel( grpUserInformation, "textLabel3" );

    grpUserInformationLayout->addWidget( textLabel3, 3, 0 );

    leSMTP = new TQLineEdit( grpUserInformation, "leSMTP" );

    grpUserInformationLayout->addWidget( leSMTP, 3, 1 );

    lblUIDTell = new TQLabel( grpUserInformation, "lblUIDTell" );

    grpUserInformationLayout->addWidget( lblUIDTell, 5, 0 );

    lblUID = new TQLabel( grpUserInformation, "lblUID" );

    grpUserInformationLayout->addWidget( lblUID, 5, 1 );

    MainWidgetLayout->addMultiCellWidget( grpUserInformation, 1, 1, 0, 3 );
    spacer3 = new TQSpacerItem( 20, 16, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    MainWidgetLayout->addItem( spacer3, 4, 2 );

    layout1 = new TQVBoxLayout( 0, 0, KDialog::spacingHint(), "layout1"); 

    lblUsername = new TQLabel( this, "lblUsername" );
    TQFont lblUsername_font(  lblUsername->font() );
    lblUsername_font.setFamily( "Bitstream Charter" );
    lblUsername_font.setPointSize( 14 );
    lblUsername->setFont( lblUsername_font ); 
    lblUsername->setAlignment( int( TQLabel::AlignVCenter ) );
    layout1->addWidget( lblUsername );

    lblClickButtonInfo = new TQLabel( this, "lblClickButtonInfo" );
    lblClickButtonInfo->setAlignment( int( TQLabel::AlignVCenter ) );
    layout1->addWidget( lblClickButtonInfo );

    MainWidgetLayout->addMultiCellLayout( layout1, 0, 0, 1, 3 );

    btnChangePassword = new KPushButton( this, "btnChangePassword" );

    MainWidgetLayout->addMultiCellWidget( btnChangePassword, 3, 3, 0, 1 );
    spacer2 = new TQSpacerItem( 111, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    MainWidgetLayout->addItem( spacer2, 3, 3 );

    kcfg_EchoMode = new TQButtonGroup( this, "kcfg_EchoMode" );
    kcfg_EchoMode->setFlat( false );
    kcfg_EchoMode->setCheckable( false );
    kcfg_EchoMode->setChecked( false );
    kcfg_EchoMode->setProperty( "selectedId", 0 );
    kcfg_EchoMode->setColumnLayout(0, TQt::Vertical );
    kcfg_EchoMode->layout()->setSpacing( KDialog::spacingHint() );
    kcfg_EchoMode->layout()->setMargin( KDialog::marginHint() );
    kcfg_EchoModeLayout = new TQGridLayout( kcfg_EchoMode->layout() );
    kcfg_EchoModeLayout->setAlignment( TQt::AlignTop );

    rdbOneStar = new TQRadioButton( kcfg_EchoMode, "rdbOneStar" );

    kcfg_EchoModeLayout->addWidget( rdbOneStar, 0, 0 );

    rdbThreeStars = new TQRadioButton( kcfg_EchoMode, "rdbThreeStars" );

    kcfg_EchoModeLayout->addWidget( rdbThreeStars, 1, 0 );

    rdbShowPassword = new TQRadioButton( kcfg_EchoMode, "rdbShowPassword" );

    kcfg_EchoModeLayout->addWidget( rdbShowPassword, 2, 0 );

    MainWidgetLayout->addMultiCellWidget( kcfg_EchoMode, 2, 2, 0, 3 );
    languageChange();
    resize( TQSize(518, 561).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( btnChangeFace, leRealname );
    setTabOrder( leRealname, leOrganization );
    setTabOrder( leOrganization, leEmail );
    setTabOrder( leEmail, leSMTP );
    setTabOrder( leSMTP, rdbOneStar );
    setTabOrder( rdbOneStar, rdbThreeStars );
    setTabOrder( rdbThreeStars, rdbShowPassword );
    setTabOrder( rdbShowPassword, btnChangePassword );

    // buddies
    lblOrganisation->setBuddy( leOrganization );
    lblRealName->setBuddy( leRealname );
    lblEmail->setBuddy( leEmail );
    textLabel3->setBuddy( leSMTP );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void MainWidget::languageChange()
{
    setCaption( tr2i18n( "KCMUserAccount" ) );
    btnChangeFace->setText( TQString::null );
    grpUserInformation->setTitle( tr2i18n( "User Information" ) );
    lblOrganisation->setText( tr2i18n( "&Organization:" ) );
    lblRealName->setText( tr2i18n( "&Name:" ) );
    lblEmail->setText( tr2i18n( "&Email address:" ) );
    textLabel3->setText( tr2i18n( "&SMTP server:" ) );
    lblUIDTell->setText( tr2i18n( "User ID:" ) );
    lblUID->setText( TQString::null );
    lblUsername->setText( TQString::null );
    lblClickButtonInfo->setText( tr2i18n( "<i>(Click the button to change your image)</i>" ) );
    btnChangePassword->setText( tr2i18n( "Change Password..." ) );
    kcfg_EchoMode->setTitle( tr2i18n( "At Password Prompt" ) );
    rdbOneStar->setText( tr2i18n( "Show one star for each letter" ) );
    rdbThreeStars->setText( tr2i18n( "Show three stars for each letter" ) );
    rdbShowPassword->setText( tr2i18n( "Show nothing" ) );
}

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

TQMetaObject *MainWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_MainWidget( "MainWidget", &MainWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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