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

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

#include "gwcontactsearch.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqlineedit.h>
#include <ntqcombobox.h>
#include <ntqframe.h>
#include <ntqheader.h>
#include <ntqlistview.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

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

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

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

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

    layout13->addWidget( textLabel3, 2, 0 );

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

    layout13->addWidget( textLabel4, 3, 0 );

    m_userId = new TQLineEdit( this, "m_userId" );

    layout13->addWidget( m_userId, 2, 2 );

    m_firstName = new TQLineEdit( this, "m_firstName" );

    layout13->addWidget( m_firstName, 0, 2 );

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

    layout13->addWidget( textLabel5, 4, 0 );

    m_userIdOperation = new TQComboBox( false, this, "m_userIdOperation" );

    layout13->addWidget( m_userIdOperation, 2, 1 );

    m_firstNameOperation = new TQComboBox( false, this, "m_firstNameOperation" );

    layout13->addWidget( m_firstNameOperation, 0, 1 );

    m_dept = new TQLineEdit( this, "m_dept" );

    layout13->addWidget( m_dept, 4, 2 );

    m_lastNameOperation = new TQComboBox( false, this, "m_lastNameOperation" );

    layout13->addWidget( m_lastNameOperation, 1, 1 );

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

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

    m_clear = new TQPushButton( this, "m_clear" );

    layout13->addWidget( m_clear, 1, 3 );

    m_deptOperation = new TQComboBox( false, this, "m_deptOperation" );

    layout13->addWidget( m_deptOperation, 4, 1 );

    m_title = new TQLineEdit( this, "m_title" );

    layout13->addWidget( m_title, 3, 2 );

    m_lastName = new TQLineEdit( this, "m_lastName" );

    layout13->addWidget( m_lastName, 1, 2 );

    m_search = new TQPushButton( this, "m_search" );
    m_search->setDefault( true );

    layout13->addWidget( m_search, 0, 3 );

    m_titleOperation = new TQComboBox( false, this, "m_titleOperation" );

    layout13->addWidget( m_titleOperation, 3, 1 );
    GroupWiseContactSearchWidgetLayout->addLayout( layout13 );

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

    textLabel9 = new TQLabel( this, "textLabel9" );
    GroupWiseContactSearchWidgetLayout->addWidget( textLabel9 );

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

    m_results = new TQListView( this, "m_results" );
    m_results->addColumn( tr2i18n( "Status" ) );
    m_results->addColumn( tr2i18n( "First Name" ) );
    m_results->addColumn( tr2i18n( "Last Name" ) );
    m_results->addColumn( tr2i18n( "User ID" ) );
    m_results->setResizePolicy( TQListView::AutoOneFit );
    m_results->setResizeMode( TQListView::AllColumns );
    layout12->addWidget( m_results );

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

    m_details = new TQPushButton( this, "m_details" );
    m_details->setEnabled( true );
    layout8->addWidget( m_details );
    spacer6 = new TQSpacerItem( 20, 141, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    layout8->addItem( spacer6 );
    layout12->addLayout( layout8 );
    GroupWiseContactSearchWidgetLayout->addLayout( layout12 );

    m_matchCount = new TQLabel( this, "m_matchCount" );
    GroupWiseContactSearchWidgetLayout->addWidget( m_matchCount );
    languageChange();
    resize( TQSize(435, 410).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( m_firstName, m_lastNameOperation );
    setTabOrder( m_lastNameOperation, m_lastName );
    setTabOrder( m_lastName, m_userIdOperation );
    setTabOrder( m_userIdOperation, m_userId );
    setTabOrder( m_userId, m_titleOperation );
    setTabOrder( m_titleOperation, m_title );
    setTabOrder( m_title, m_deptOperation );
    setTabOrder( m_deptOperation, m_dept );
    setTabOrder( m_dept, m_search );
    setTabOrder( m_search, m_clear );
    setTabOrder( m_clear, m_results );
    setTabOrder( m_results, m_details );
    setTabOrder( m_details, m_firstNameOperation );

    // buddies
    textLabel1->setBuddy( m_firstName );
    textLabel3->setBuddy( m_userId );
    textLabel4->setBuddy( m_title );
    textLabel5->setBuddy( m_dept );
    textLabel2->setBuddy( m_lastName );
    textLabel9->setBuddy( m_results );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void GroupWiseContactSearchWidget::languageChange()
{
    setCaption( tr2i18n( "Search GroupWise Messenger" ) );
    textLabel1->setText( tr2i18n( "&First name" ) );
    textLabel3->setText( tr2i18n( "&User ID" ) );
    textLabel4->setText( tr2i18n( "&Title" ) );
    textLabel5->setText( tr2i18n( "&Department" ) );
    m_userIdOperation->clear();
    m_userIdOperation->insertItem( tr2i18n( "contains" ) );
    m_userIdOperation->insertItem( tr2i18n( "begins with" ) );
    m_userIdOperation->insertItem( tr2i18n( "equals" ) );
    m_firstNameOperation->clear();
    m_firstNameOperation->insertItem( tr2i18n( "contains" ) );
    m_firstNameOperation->insertItem( tr2i18n( "begins with" ) );
    m_firstNameOperation->insertItem( tr2i18n( "equals" ) );
    m_lastNameOperation->clear();
    m_lastNameOperation->insertItem( tr2i18n( "contains" ) );
    m_lastNameOperation->insertItem( tr2i18n( "begins with" ) );
    m_lastNameOperation->insertItem( tr2i18n( "equals" ) );
    textLabel2->setText( tr2i18n( "Last &name" ) );
    m_clear->setText( tr2i18n( "Cl&ear" ) );
    m_deptOperation->clear();
    m_deptOperation->insertItem( tr2i18n( "contains" ) );
    m_deptOperation->insertItem( tr2i18n( "begins with" ) );
    m_deptOperation->insertItem( tr2i18n( "equals" ) );
    m_search->setText( tr2i18n( "&Search" ) );
    m_titleOperation->clear();
    m_titleOperation->insertItem( tr2i18n( "contains" ) );
    m_titleOperation->insertItem( tr2i18n( "begins with" ) );
    m_titleOperation->insertItem( tr2i18n( "equals" ) );
    textLabel9->setText( tr2i18n( "&Results:" ) );
    m_results->header()->setLabel( 0, tr2i18n( "Status" ) );
    m_results->header()->setLabel( 1, tr2i18n( "First Name" ) );
    m_results->header()->setLabel( 2, tr2i18n( "Last Name" ) );
    m_results->header()->setLabel( 3, tr2i18n( "User ID" ) );
    m_details->setText( tr2i18n( "Detai&ls" ) );
    m_matchCount->setText( tr2i18n( "0 matching users found" ) );
}

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

TQMetaObject *GroupWiseContactSearchWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_GroupWiseContactSearchWidget( "GroupWiseContactSearchWidget", &GroupWiseContactSearchWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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