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

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

#include "dlgbrowse.h"

#include <ntqvariant.h>
#include <kpushbutton.h>
#include <ntqsplitter.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqtable.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a dlgBrowse as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The qdialog will by default be modeless, unless you set 'modal' to
 *  true to construct a modal qdialog.
 */
dlgBrowse::dlgBrowse( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "dlgBrowse" );
    dlgBrowseLayout = new TQGridLayout( this, 1, 1, 11, 6, "dlgBrowseLayout"); 

    splitter1 = new TQSplitter( this, "splitter1" );
    splitter1->setOrientation( TQSplitter::Horizontal );

    dynamicForm = new TQGroupBox( splitter1, "dynamicForm" );
    dynamicForm->setColumnLayout(0, TQt::Vertical );
    dynamicForm->layout()->setSpacing( 6 );
    dynamicForm->layout()->setMargin( 11 );
    dynamicFormLayout = new TQVBoxLayout( dynamicForm->layout() );
    dynamicFormLayout->setAlignment( TQt::AlignTop );

    lblWait = new TQLabel( dynamicForm, "lblWait" );
    lblWait->setLineWidth( 1 );
    lblWait->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) );
    dynamicFormLayout->addWidget( lblWait );

    tblResults = new TQTable( splitter1, "tblResults" );
    tblResults->setNumCols( tblResults->numCols() + 1 );
    tblResults->horizontalHeader()->setLabel( tblResults->numCols() - 1, tr2i18n( "JID" ) );
    tblResults->setNumCols( tblResults->numCols() + 1 );
    tblResults->horizontalHeader()->setLabel( tblResults->numCols() - 1, tr2i18n( "First Name" ) );
    tblResults->setNumCols( tblResults->numCols() + 1 );
    tblResults->horizontalHeader()->setLabel( tblResults->numCols() - 1, tr2i18n( "Last Name" ) );
    tblResults->setNumCols( tblResults->numCols() + 1 );
    tblResults->horizontalHeader()->setLabel( tblResults->numCols() - 1, tr2i18n( "Nick" ) );
    tblResults->setNumCols( tblResults->numCols() + 1 );
    tblResults->horizontalHeader()->setLabel( tblResults->numCols() - 1, tr2i18n( "Email" ) );
    tblResults->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, tblResults->sizePolicy().hasHeightForWidth() ) );
    tblResults->setResizePolicy( TQTable::AutoOneFit );
    tblResults->setNumRows( 0 );
    tblResults->setNumCols( 5 );
    tblResults->setReadOnly( true );
    tblResults->setSelectionMode( TQTable::NoSelection );
    tblResults->setFocusStyle( TQTable::FollowStyle );

    dlgBrowseLayout->addWidget( splitter1, 0, 0 );

    buttonsLayout = new TQHBoxLayout( 0, 0, 6, "buttonsLayout"); 
    buttonsSpacer = new TQSpacerItem( 51, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    buttonsLayout->addItem( buttonsSpacer );

    btnSearch = new KPushButton( this, "btnSearch" );
    btnSearch->setEnabled( false );
    btnSearch->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, btnSearch->sizePolicy().hasHeightForWidth() ) );
    btnSearch->setDefault( true );
    buttonsLayout->addWidget( btnSearch );

    btnClose = new KPushButton( this, "btnClose" );
    btnClose->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, btnClose->sizePolicy().hasHeightForWidth() ) );
    btnClose->setAutoDefault( true );
    btnClose->setDefault( false );
    buttonsLayout->addWidget( btnClose );

    dlgBrowseLayout->addLayout( buttonsLayout, 1, 0 );
    languageChange();
    resize( TQSize(818, 381).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( btnClose, TQ_SIGNAL( clicked() ), this, TQ_SLOT( close() ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void dlgBrowse::languageChange()
{
    setCaption( tr2i18n( "Jabber Search" ) );
    dynamicForm->setTitle( tr2i18n( "Search For" ) );
    lblWait->setText( tr2i18n( "Please wait while retrieving search form..." ) );
    tblResults->horizontalHeader()->setLabel( 0, tr2i18n( "JID" ) );
    tblResults->horizontalHeader()->setLabel( 1, tr2i18n( "First Name" ) );
    tblResults->horizontalHeader()->setLabel( 2, tr2i18n( "Last Name" ) );
    tblResults->horizontalHeader()->setLabel( 3, tr2i18n( "Nick" ) );
    tblResults->horizontalHeader()->setLabel( 4, tr2i18n( "Email" ) );
    btnSearch->setText( tr2i18n( "&Search" ) );
    btnClose->setText( tr2i18n( "&Close" ) );
}

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

TQMetaObject *dlgBrowse::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_dlgBrowse( "dlgBrowse", &dlgBrowse::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* dlgBrowse::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 = TQDialog::staticMetaObject();
    static const TQUMethod slot_0 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"dlgBrowse", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_dlgBrowse.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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