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

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

#include "gwcontactpropswidget.h"

#include <ntqvariant.h>
#include <tdelistview.h>
#include <ntqlabel.h>
#include <ntqframe.h>
#include <ntqlineedit.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    m_userId = new TQLabel( this, "m_userId" );
    m_userId->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 3, 0, m_userId->sizePolicy().hasHeightForWidth() ) );
    GroupWiseContactPropsWidgetLayout->addWidget( m_userId );

    line4 = new TQFrame( this, "line4" );
    line4->setFrameShape( TQFrame::HLine );
    line4->setFrameShadow( TQFrame::Sunken );
    line4->setFrameShape( TQFrame::HLine );
    GroupWiseContactPropsWidgetLayout->addWidget( line4 );

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

    m_lastName = new TQLineEdit( this, "m_lastName" );
    m_lastName->setReadOnly( true );

    layout15->addWidget( m_lastName, 4, 1 );

    textLabel14 = new TQLabel( this, "textLabel14" );

    layout15->addWidget( textLabel14, 0, 0 );

    m_displayName = new TQLineEdit( this, "m_displayName" );
    m_displayName->setReadOnly( false );

    layout15->addWidget( m_displayName, 2, 1 );

    m_status = new TQLabel( this, "m_status" );

    layout15->addMultiCellWidget( m_status, 0, 1, 1, 1 );

    textLabel10 = new TQLabel( this, "textLabel10" );

    layout15->addWidget( textLabel10, 3, 0 );

    lbl_displayName = new TQLabel( this, "lbl_displayName" );

    layout15->addMultiCellWidget( lbl_displayName, 1, 2, 0, 0 );

    m_firstName = new TQLineEdit( this, "m_firstName" );
    m_firstName->setReadOnly( true );

    layout15->addWidget( m_firstName, 3, 1 );

    textLabel11 = new TQLabel( this, "textLabel11" );

    layout15->addWidget( textLabel11, 4, 0 );
    GroupWiseContactPropsWidgetLayout->addLayout( layout15 );

    line1_2 = new TQFrame( this, "line1_2" );
    line1_2->setFrameShape( TQFrame::HLine );
    line1_2->setFrameShadow( TQFrame::Sunken );
    line1_2->setFrameShape( TQFrame::HLine );
    GroupWiseContactPropsWidgetLayout->addWidget( line1_2 );

    textLabel15 = new TQLabel( this, "textLabel15" );
    GroupWiseContactPropsWidgetLayout->addWidget( textLabel15 );

    m_propsView = new TDEListView( this, "m_propsView" );
    m_propsView->addColumn( tr2i18n( "Property" ) );
    m_propsView->addColumn( tr2i18n( "Value" ) );
    m_propsView->setAllColumnsShowFocus( true );
    m_propsView->setResizeMode( TDEListView::AllColumns );
    m_propsView->setFullWidth( true );
    m_propsView->setItemsMovable( false );
    GroupWiseContactPropsWidgetLayout->addWidget( m_propsView );
    languageChange();
    resize( TQSize(373, 444).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // buddies
    lbl_displayName->setBuddy( m_displayName );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void GroupWiseContactPropsWidget::languageChange()
{
    m_userId->setText( tr2i18n( "USER_ID" ) );
    m_lastName->setText( TQString::null );
    TQToolTip::add( m_lastName, tr2i18n( "Change the display name used for this contact" ) );
    textLabel14->setText( tr2i18n( "Status:" ) );
    m_displayName->setText( TQString::null );
    TQToolTip::add( m_displayName, tr2i18n( "Change the display name used for this contact" ) );
    m_status->setText( tr2i18n( "USER_STATUS" ) );
    textLabel10->setText( tr2i18n( "First name:" ) );
    lbl_displayName->setText( tr2i18n( "&Display name:" ) );
    m_firstName->setText( TQString::null );
    TQToolTip::add( m_firstName, tr2i18n( "Change the display name used for this contact" ) );
    textLabel11->setText( tr2i18n( "Last name:" ) );
    textLabel15->setText( tr2i18n( "Additional properties:" ) );
    m_propsView->header()->setLabel( 0, tr2i18n( "Property" ) );
    m_propsView->header()->setLabel( 1, tr2i18n( "Value" ) );
}

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

TQMetaObject *GroupWiseContactPropsWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_GroupWiseContactPropsWidget( "GroupWiseContactPropsWidget", &GroupWiseContactPropsWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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