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

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

#include "dlgchatroomslist.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqlineedit.h>
#include <ntqtable.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include <ntqimage.h>
#include <ntqpixmap.h>


/*
 *  Constructs a dlgChatRoomsList which is a child of 'parent', with the
 *  name 'name'.' 
 */
dlgChatRoomsList::dlgChatRoomsList( TQWidget* parent,  const char* name )
    : KDialog( parent, name )
{
    if ( !name )
	setName( "dlgChatRoomsList" );
    dlgChatRoomsListLayout = new TQVBoxLayout( this, 11, 6, "dlgChatRoomsListLayout"); 

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

    lblServer = new TQLabel( this, "lblServer" );
    layout4->addWidget( lblServer );

    leServer = new TQLineEdit( this, "leServer" );
    layout4->addWidget( leServer );

    pbQuery = new TQPushButton( this, "pbQuery" );
    layout4->addWidget( pbQuery );
    dlgChatRoomsListLayout->addLayout( layout4 );

    tblChatRoomsList = new TQTable( this, "tblChatRoomsList" );
    tblChatRoomsList->setNumCols( tblChatRoomsList->numCols() + 1 );
    tblChatRoomsList->horizontalHeader()->setLabel( tblChatRoomsList->numCols() - 1, tr2i18n( "Chatroom Name" ) );
    tblChatRoomsList->setNumCols( tblChatRoomsList->numCols() + 1 );
    tblChatRoomsList->horizontalHeader()->setLabel( tblChatRoomsList->numCols() - 1, tr2i18n( "Chatroom Description" ) );
    tblChatRoomsList->setFocusPolicy( TQTable::ClickFocus );
    tblChatRoomsList->setNumRows( 0 );
    tblChatRoomsList->setNumCols( 2 );
    tblChatRoomsList->setRowMovingEnabled( true );
    tblChatRoomsList->setColumnMovingEnabled( true );
    tblChatRoomsList->setReadOnly( true );
    tblChatRoomsList->setSelectionMode( TQTable::SingleRow );
    tblChatRoomsList->setFocusStyle( TQTable::FollowStyle );
    dlgChatRoomsListLayout->addWidget( tblChatRoomsList );

    layout5 = new TQHBoxLayout( 0, 0, 6, "layout5"); 
    spacer2 = new TQSpacerItem( 121, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout5->addItem( spacer2 );

    pbJoin = new TQPushButton( this, "pbJoin" );
    layout5->addWidget( pbJoin );

    pbClose = new TQPushButton( this, "pbClose" );
    layout5->addWidget( pbClose );
    dlgChatRoomsListLayout->addLayout( layout5 );
    languageChange();
    resize( TQSize(467, 298).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( pbClose, TQ_SIGNAL( clicked() ), this, TQ_SLOT( close() ) );
    connect( pbJoin, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotJoin() ) );
    connect( pbQuery, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotQuery() ) );
    connect( tblChatRoomsList, TQ_SIGNAL( clicked(int,int,int,const TQPoint&) ), this, TQ_SLOT( slotClick(int,int,int,const TQPoint&) ) );
    connect( tblChatRoomsList, TQ_SIGNAL( doubleClicked(int,int,int,const TQPoint&) ), this, TQ_SLOT( slotDoubleClick(int,int,int,const TQPoint&) ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void dlgChatRoomsList::languageChange()
{
    setCaption( tr2i18n( "List Chatrooms" ) );
    lblServer->setText( tr2i18n( "Server" ) );
    pbQuery->setText( tr2i18n( "&Query" ) );
    tblChatRoomsList->horizontalHeader()->setLabel( 0, tr2i18n( "Chatroom Name" ) );
    tblChatRoomsList->horizontalHeader()->setLabel( 1, tr2i18n( "Chatroom Description" ) );
    pbJoin->setText( tr2i18n( "&Join" ) );
    pbClose->setText( tr2i18n( "Clos&e" ) );
}

void dlgChatRoomsList::slotQuery()
{
    tqWarning( "dlgChatRoomsList::slotQuery(): Not implemented yet" );
}

void dlgChatRoomsList::slotJoin()
{
    tqWarning( "dlgChatRoomsList::slotJoin(): Not implemented yet" );
}

void dlgChatRoomsList::slotClick(int,int,int,const TQPoint&)
{
    tqWarning( "dlgChatRoomsList::slotClick(int,int,int,const TQPoint&): Not implemented yet" );
}

void dlgChatRoomsList::slotDoubleClick(int,int,int,const TQPoint&)
{
    tqWarning( "dlgChatRoomsList::slotDoubleClick(int,int,int,const TQPoint&): Not implemented yet" );
}

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

TQMetaObject *dlgChatRoomsList::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_dlgChatRoomsList( "dlgChatRoomsList", &dlgChatRoomsList::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* dlgChatRoomsList::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 = KDialog::staticMetaObject();
    static const TQUMethod slot_0 = {"slotQuery", 0, 0 };
    static const TQUMethod slot_1 = {"slotJoin", 0, 0 };
    static const TQUParameter param_slot_2[] = {
	{ "row", &static_QUType_int, 0, TQUParameter::In },
	{ "col", &static_QUType_int, 0, TQUParameter::In },
	{ "button", &static_QUType_int, 0, TQUParameter::In },
	{ "mousePos", &static_QUType_varptr, "\x0e", TQUParameter::In }
    };
    static const TQUMethod slot_2 = {"slotClick", 4, param_slot_2 };
    static const TQUParameter param_slot_3[] = {
	{ "row", &static_QUType_int, 0, TQUParameter::In },
	{ "col", &static_QUType_int, 0, TQUParameter::In },
	{ "button", &static_QUType_int, 0, TQUParameter::In },
	{ "mousePos", &static_QUType_varptr, "\x0e", TQUParameter::In }
    };
    static const TQUMethod slot_3 = {"slotDoubleClick", 4, param_slot_3 };
    static const TQUMethod slot_4 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "slotQuery()", &slot_0, TQMetaData::Public },
	{ "slotJoin()", &slot_1, TQMetaData::Public },
	{ "slotClick(int,int,int,const TQPoint&)", &slot_2, TQMetaData::Public },
	{ "slotDoubleClick(int,int,int,const TQPoint&)", &slot_3, TQMetaData::Public },
	{ "languageChange()", &slot_4, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"dlgChatRoomsList", parentObject,
	slot_tbl, 5,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_dlgChatRoomsList.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool dlgChatRoomsList::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: slotQuery(); break;
    case 1: slotJoin(); break;
    case 2: slotClick((int)static_QUType_int.get(_o+1),(int)static_QUType_int.get(_o+2),(int)static_QUType_int.get(_o+3),(const TQPoint&)*((const TQPoint*)static_QUType_ptr.get(_o+4))); break;
    case 3: slotDoubleClick((int)static_QUType_int.get(_o+1),(int)static_QUType_int.get(_o+2),(int)static_QUType_int.get(_o+3),(const TQPoint&)*((const TQPoint*)static_QUType_ptr.get(_o+4))); break;
    case 4: languageChange(); break;
    default:
	return KDialog::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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