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

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

#include "teammembersdlgs.h"

#include <ntqvariant.h>
#include <kpushbutton.h>
#include <klineedit.h>
#include <tdelistview.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqgroupbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

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

    TeamMembersDlgSLayout->addWidget( textLabel1, 0, 0 );

    mailingListEdit = new KLineEdit( this, "mailingListEdit" );

    TeamMembersDlgSLayout->addWidget( mailingListEdit, 0, 1 );

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

    TeamMembersDlgSLayout->addWidget( textLabel1_2, 1, 0 );

    yourselfLabel = new TQLabel( this, "yourselfLabel" );
    TQFont yourselfLabel_font(  yourselfLabel->font() );
    yourselfLabel_font.setBold( true );
    yourselfLabel->setFont( yourselfLabel_font ); 
    yourselfLabel->setAlignment( int( TQLabel::AlignVCenter ) );

    TeamMembersDlgSLayout->addWidget( yourselfLabel, 1, 1 );

    groupBox1 = new TQGroupBox( this, "groupBox1" );
    groupBox1->setColumnLayout(0, TQt::Vertical );
    groupBox1->layout()->setSpacing( 6 );
    groupBox1->layout()->setMargin( 11 );
    groupBox1Layout = new TQGridLayout( groupBox1->layout() );
    groupBox1Layout->setAlignment( TQt::AlignTop );

    addMemberButton = new KPushButton( groupBox1, "addMemberButton" );

    groupBox1Layout->addWidget( addMemberButton, 1, 0 );

    editMemberButton = new KPushButton( groupBox1, "editMemberButton" );

    groupBox1Layout->addWidget( editMemberButton, 1, 1 );

    membersListView = new TDEListView( groupBox1, "membersListView" );
    membersListView->addColumn( tr2i18n( "Name" ) );
    membersListView->addColumn( tr2i18n( "Nickname" ) );
    membersListView->addColumn( tr2i18n( "Email" ) );
    membersListView->addColumn( tr2i18n( "Role" ) );
    membersListView->addColumn( tr2i18n( "Task" ) );
    membersListView->addColumn( tr2i18n( "Subproject" ) );

    groupBox1Layout->addMultiCellWidget( membersListView, 0, 0, 0, 4 );

    deleteMemberButton = new KPushButton( groupBox1, "deleteMemberButton" );

    groupBox1Layout->addWidget( deleteMemberButton, 1, 2 );
    spacer1 = new TQSpacerItem( 100, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    groupBox1Layout->addItem( spacer1, 1, 3 );

    setToYourselfButton = new KPushButton( groupBox1, "setToYourselfButton" );

    groupBox1Layout->addWidget( setToYourselfButton, 1, 4 );

    TeamMembersDlgSLayout->addMultiCellWidget( groupBox1, 2, 2, 0, 1 );
    languageChange();
    resize( TQSize(579, 492).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( addMemberButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotAddMember() ) );
    connect( deleteMemberButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotDeleteMember() ) );
    connect( editMemberButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotEditMember() ) );
    connect( membersListView, TQ_SIGNAL( doubleClicked(TQListViewItem*) ), this, TQ_SLOT( slotEditMember() ) );
    connect( setToYourselfButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotSetToYourself() ) );

    // tab order
    setTabOrder( mailingListEdit, membersListView );
    setTabOrder( membersListView, addMemberButton );
    setTabOrder( addMemberButton, editMemberButton );
    setTabOrder( editMemberButton, deleteMemberButton );
    setTabOrder( deleteMemberButton, setToYourselfButton );

    // buddies
    textLabel1->setBuddy( mailingListEdit );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void TeamMembersDlgS::languageChange()
{
    textLabel1->setText( tr2i18n( "&Mailing list:" ) );
    textLabel1_2->setText( tr2i18n( "You are:" ) );
    yourselfLabel->setText( tr2i18n( "Please select your identity from the member list." ) );
    groupBox1->setTitle( tr2i18n( "&Team Members" ) );
    addMemberButton->setText( tr2i18n( "&Add..." ) );
    editMemberButton->setText( tr2i18n( "&Edit..." ) );
    membersListView->header()->setLabel( 0, tr2i18n( "Name" ) );
    membersListView->header()->setLabel( 1, tr2i18n( "Nickname" ) );
    membersListView->header()->setLabel( 2, tr2i18n( "Email" ) );
    membersListView->header()->setLabel( 3, tr2i18n( "Role" ) );
    membersListView->header()->setLabel( 4, tr2i18n( "Task" ) );
    membersListView->header()->setLabel( 5, tr2i18n( "Subproject" ) );
    deleteMemberButton->setText( tr2i18n( "&Delete" ) );
    setToYourselfButton->setText( tr2i18n( "Set to &Yourself" ) );
}

void TeamMembersDlgS::slotAddMember()
{
    tqWarning( "TeamMembersDlgS::slotAddMember(): Not implemented yet" );
}

void TeamMembersDlgS::slotEditMember()
{
    tqWarning( "TeamMembersDlgS::slotEditMember(): Not implemented yet" );
}

void TeamMembersDlgS::slotDeleteMember()
{
    tqWarning( "TeamMembersDlgS::slotDeleteMember(): Not implemented yet" );
}

void TeamMembersDlgS::slotSetToYourself()
{
    tqWarning( "TeamMembersDlgS::slotSetToYourself(): Not implemented yet" );
}

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

TQMetaObject *TeamMembersDlgS::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_TeamMembersDlgS( "TeamMembersDlgS", &TeamMembersDlgS::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* TeamMembersDlgS::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 = {"slotAddMember", 0, 0 };
    static const TQUMethod slot_1 = {"slotEditMember", 0, 0 };
    static const TQUMethod slot_2 = {"slotDeleteMember", 0, 0 };
    static const TQUMethod slot_3 = {"slotSetToYourself", 0, 0 };
    static const TQUMethod slot_4 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "slotAddMember()", &slot_0, TQMetaData::Public },
	{ "slotEditMember()", &slot_1, TQMetaData::Public },
	{ "slotDeleteMember()", &slot_2, TQMetaData::Public },
	{ "slotSetToYourself()", &slot_3, TQMetaData::Public },
	{ "languageChange()", &slot_4, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"TeamMembersDlgS", parentObject,
	slot_tbl, 5,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_TeamMembersDlgS.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool TeamMembersDlgS::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: slotAddMember(); break;
    case 1: slotEditMember(); break;
    case 2: slotDeleteMember(); break;
    case 3: slotSetToYourself(); break;
    case 4: languageChange(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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