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

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

#include "gaduadd.h"

#include <ntqvariant.h>
#include <krestrictedline.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqlineedit.h>
#include <ntqcheckbox.h>
#include <ntqheader.h>
#include <ntqlistview.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include <ntqimage.h>
#include <ntqpixmap.h>


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

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

    TextLabel1 = new TQLabel( this, "TextLabel1" );
    TextLabel1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) );
    TextLabel1->setTextFormat( TQLabel::AutoText );
    TextLabel1->setScaledContents( false );
    TextLabel1->setAlignment( int( TQLabel::AlignVCenter ) );
    layout39->addWidget( TextLabel1 );

    addEdit_ = new KRestrictedLine( this, "addEdit_" );
    layout39->addWidget( addEdit_ );

    GaduAddUILayout->addLayout( layout39, 0, 0 );

    textLabel2 = new TQLabel( this, "textLabel2" );
    textLabel2->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );

    GaduAddUILayout->addWidget( textLabel2, 1, 0 );

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

    layout8 = new TQVBoxLayout( 0, 0, 6, "layout8"); 

    textLabel1 = new TQLabel( this, "textLabel1" );
    textLabel1->setEnabled( true );
    layout8->addWidget( textLabel1 );

    TextLabel1_2 = new TQLabel( this, "TextLabel1_2" );
    TextLabel1_2->setEnabled( true );
    layout8->addWidget( TextLabel1_2 );

    TextLabel1_2_2 = new TQLabel( this, "TextLabel1_2_2" );
    TextLabel1_2_2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)1, 0, 0, TextLabel1_2_2->sizePolicy().hasHeightForWidth() ) );
    layout8->addWidget( TextLabel1_2_2 );

    TextLabel1_4 = new TQLabel( this, "TextLabel1_4" );
    TextLabel1_4->setEnabled( true );
    TextLabel1_4->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)5, 0, 0, TextLabel1_4->sizePolicy().hasHeightForWidth() ) );
    layout8->addWidget( TextLabel1_4 );

    TextLabel1_4_2 = new TQLabel( this, "TextLabel1_4_2" );
    TextLabel1_4_2->setEnabled( true );
    TextLabel1_4_2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)5, 0, 0, TextLabel1_4_2->sizePolicy().hasHeightForWidth() ) );
    layout8->addWidget( TextLabel1_4_2 );
    layout10->addLayout( layout8 );

    layout9 = new TQVBoxLayout( 0, 0, 6, "layout9"); 

    fornameEdit_ = new TQLineEdit( this, "fornameEdit_" );
    fornameEdit_->setEnabled( true );
    layout9->addWidget( fornameEdit_ );

    snameEdit_ = new TQLineEdit( this, "snameEdit_" );
    snameEdit_->setEnabled( true );
    layout9->addWidget( snameEdit_ );

    nickEdit_ = new TQLineEdit( this, "nickEdit_" );
    layout9->addWidget( nickEdit_ );

    emailEdit_ = new TQLineEdit( this, "emailEdit_" );
    emailEdit_->setEnabled( true );
    layout9->addWidget( emailEdit_ );

    telephoneEdit_ = new TQLineEdit( this, "telephoneEdit_" );
    telephoneEdit_->setEnabled( true );
    layout9->addWidget( telephoneEdit_ );
    layout10->addLayout( layout9 );

    GaduAddUILayout->addLayout( layout10, 2, 0 );

    notAFriend_ = new TQCheckBox( this, "notAFriend_" );
    notAFriend_->setEnabled( false );

    GaduAddUILayout->addWidget( notAFriend_, 4, 0 );

    groups = new TQListView( this, "groups" );
    groups->addColumn( tr2i18n( "Group" ) );
    groups->header()->setClickEnabled( false, groups->header()->count() - 1 );
    groups->header()->setResizeEnabled( false, groups->header()->count() - 1 );

    GaduAddUILayout->addWidget( groups, 3, 0 );
    languageChange();
    resize( TQSize(394, 340).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // buddies
    TextLabel1->setBuddy( addEdit_ );
    textLabel1->setBuddy( fornameEdit_ );
    TextLabel1_2->setBuddy( snameEdit_ );
    TextLabel1_2_2->setBuddy( nickEdit_ );
    TextLabel1_4->setBuddy( emailEdit_ );
    TextLabel1_4_2->setBuddy( emailEdit_ );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void GaduAddUI::languageChange()
{
    TextLabel1->setText( tr2i18n( "Gadu-Gadu &UIN:" ) );
    TQToolTip::add( TextLabel1, tr2i18n( "The user ID of the Gadu-Gadu account you would like to add." ) );
    TQWhatsThis::add( TextLabel1, tr2i18n( "The user ID of the Gadu-Gadu account you would like to add.  This should be in the form of a number (no decimals, no spaces).  This field is mandatory." ) );
    TQToolTip::add( addEdit_, tr2i18n( "The user ID of the Gadu-Gadu account you would like to add." ) );
    TQWhatsThis::add( addEdit_, tr2i18n( "The user ID of the Gadu-Gadu account you would like to add.  This should be in the form of a number (no decimals, no spaces).  This field is mandatory." ) );
    textLabel2->setText( tr2i18n( "<i>(for example: 1234567)</i>" ) );
    textLabel1->setText( tr2i18n( "&Forename:" ) );
    TQToolTip::add( textLabel1, tr2i18n( "The forename of the contact you wish to add." ) );
    TQWhatsThis::add( textLabel1, tr2i18n( "The forename (first name) of the contact you wish to add.  Optionally this may include a middle name." ) );
    TextLabel1_2->setText( tr2i18n( "&Surname:" ) );
    TQToolTip::add( TextLabel1_2, tr2i18n( "The surname of the contact you wish to add." ) );
    TQWhatsThis::add( TextLabel1_2, tr2i18n( "The surname (last name) of the contact you wish to add." ) );
    TextLabel1_2_2->setText( tr2i18n( "N&ickname:" ) );
    TQToolTip::add( TextLabel1_2_2, tr2i18n( "A nickname for the contact you wish to add." ) );
    TQWhatsThis::add( TextLabel1_2_2, tr2i18n( "A nickname for the contact you wish to add." ) );
    TextLabel1_4->setText( tr2i18n( "&Email address:" ) );
    TQToolTip::add( TextLabel1_4, tr2i18n( "E-Mail address for this contact." ) );
    TQWhatsThis::add( TextLabel1_4, tr2i18n( "E-Mail address for this contact." ) );
    TextLabel1_4_2->setText( tr2i18n( "&Telephone number:" ) );
    TQToolTip::add( TextLabel1_4_2, tr2i18n( "E-Mail address for this contact." ) );
    TQWhatsThis::add( TextLabel1_4_2, tr2i18n( "E-Mail address for this contact." ) );
    TQToolTip::add( fornameEdit_, tr2i18n( "The forename of the contact you wish to add." ) );
    TQWhatsThis::add( fornameEdit_, tr2i18n( "The forename (first name) of the contact you wish to add.  Optionally this may include a middle name." ) );
    TQToolTip::add( snameEdit_, tr2i18n( "The surname of the contact you wish to add." ) );
    TQWhatsThis::add( snameEdit_, tr2i18n( "The surname (last name) of the contact you wish to add." ) );
    TQToolTip::add( nickEdit_, tr2i18n( "A nickname for the contact you wish to add." ) );
    TQWhatsThis::add( nickEdit_, tr2i18n( "A nickname for the contact you wish to add." ) );
    TQToolTip::add( emailEdit_, tr2i18n( "E-Mail address for this contact." ) );
    TQWhatsThis::add( emailEdit_, tr2i18n( "E-Mail address for this contact." ) );
    TQToolTip::add( telephoneEdit_, tr2i18n( "E-Mail address for this contact." ) );
    TQWhatsThis::add( telephoneEdit_, tr2i18n( "E-Mail address for this contact." ) );
    notAFriend_->setText( tr2i18n( "Offline to contact when you set \"&Just for friends\"" ) );
    TQToolTip::add( notAFriend_, tr2i18n( "Check if you want to exclude this contact from the \"Just for friends\" status mode." ) );
    TQWhatsThis::add( notAFriend_, tr2i18n( "Check if you want to exclude this contact from the \"Just for friends\" status mode." ) );
    groups->header()->setLabel( 0, tr2i18n( "Group" ) );
    groups->clear();
    TQListViewItem * item = new TQListViewItem( groups, 0 );

    item = new TQListViewItem( groups, item );

}

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

TQMetaObject *GaduAddUI::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_GaduAddUI( "GaduAddUI", &GaduAddUI::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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