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

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

#include "servergroupdialogui.h"

#include <ntqvariant.h>
#include <kpushbutton.h>
#include <tdelistbox.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqlineedit.h>
#include <ntqcheckbox.h>
#include <ntqgroupbox.h>
#include <ntqtoolbutton.h>
#include <ntqcombobox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    m_networkLabel = new TQLabel( this, "m_networkLabel" );
    m_networkLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, m_networkLabel->sizePolicy().hasHeightForWidth() ) );

    ServerGroupDialogUILayout->addWidget( m_networkLabel, 0, 0 );

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

    ServerGroupDialogUILayout->addMultiCellWidget( m_nameEdit, 0, 0, 1, 2 );

    m_identityLabel = new TQLabel( this, "m_identityLabel" );
    m_identityLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, m_identityLabel->sizePolicy().hasHeightForWidth() ) );

    ServerGroupDialogUILayout->addWidget( m_identityLabel, 1, 0 );

    m_commandsLabel = new TQLabel( this, "m_commandsLabel" );
    m_commandsLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, m_commandsLabel->sizePolicy().hasHeightForWidth() ) );

    ServerGroupDialogUILayout->addWidget( m_commandsLabel, 2, 0 );

    m_editIdentityButton = new KPushButton( this, "m_editIdentityButton" );
    m_editIdentityButton->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, 0, 0, m_editIdentityButton->sizePolicy().hasHeightForWidth() ) );

    ServerGroupDialogUILayout->addWidget( m_editIdentityButton, 1, 2 );

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

    ServerGroupDialogUILayout->addMultiCellWidget( m_commandEdit, 2, 2, 1, 2 );

    m_autoConnectCBox = new TQCheckBox( this, "m_autoConnectCBox" );

    ServerGroupDialogUILayout->addMultiCellWidget( m_autoConnectCBox, 3, 3, 0, 2 );

    m_serverGroupBox = new TQGroupBox( this, "m_serverGroupBox" );
    m_serverGroupBox->setColumnLayout(0, TQt::Vertical );
    m_serverGroupBox->layout()->setSpacing( KDialog::spacingHint() );
    m_serverGroupBox->layout()->setMargin( KDialog::marginHint() );
    m_serverGroupBoxLayout = new TQGridLayout( m_serverGroupBox->layout() );
    m_serverGroupBoxLayout->setAlignment( TQt::AlignTop );

    m_serverLBox = new TDEListBox( m_serverGroupBox, "m_serverLBox" );

    m_serverGroupBoxLayout->addMultiCellWidget( m_serverLBox, 0, 0, 0, 5 );

    m_addServerButton = new KPushButton( m_serverGroupBox, "m_addServerButton" );

    m_serverGroupBoxLayout->addWidget( m_addServerButton, 1, 0 );

    m_changeServerButton = new KPushButton( m_serverGroupBox, "m_changeServerButton" );
    m_changeServerButton->setEnabled( false );

    m_serverGroupBoxLayout->addWidget( m_changeServerButton, 1, 1 );

    m_removeServerButton = new TQToolButton( m_serverGroupBox, "m_removeServerButton" );
    m_removeServerButton->setEnabled( false );

    m_serverGroupBoxLayout->addWidget( m_removeServerButton, 1, 2 );

    m_downServerBtn = new TQToolButton( m_serverGroupBox, "m_downServerBtn" );
    m_downServerBtn->setEnabled( false );
    m_downServerBtn->setAutoRepeat( true );

    m_serverGroupBoxLayout->addWidget( m_downServerBtn, 1, 5 );

    m_upServerBtn = new TQToolButton( m_serverGroupBox, "m_upServerBtn" );
    m_upServerBtn->setEnabled( false );
    m_upServerBtn->setAutoRepeat( true );

    m_serverGroupBoxLayout->addWidget( m_upServerBtn, 1, 4 );
    serverSpacer = new TQSpacerItem( 0, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    m_serverGroupBoxLayout->addItem( serverSpacer, 1, 3 );

    ServerGroupDialogUILayout->addMultiCellWidget( m_serverGroupBox, 4, 4, 0, 2 );

    m_channelGroupBox = new TQGroupBox( this, "m_channelGroupBox" );
    m_channelGroupBox->setColumnLayout(0, TQt::Vertical );
    m_channelGroupBox->layout()->setSpacing( KDialog::spacingHint() );
    m_channelGroupBox->layout()->setMargin( KDialog::marginHint() );
    m_channelGroupBoxLayout = new TQGridLayout( m_channelGroupBox->layout() );
    m_channelGroupBoxLayout->setAlignment( TQt::AlignTop );

    m_channelLBox = new TDEListBox( m_channelGroupBox, "m_channelLBox" );

    m_channelGroupBoxLayout->addMultiCellWidget( m_channelLBox, 0, 0, 0, 5 );

    m_addChannelButton = new KPushButton( m_channelGroupBox, "m_addChannelButton" );

    m_channelGroupBoxLayout->addWidget( m_addChannelButton, 1, 0 );

    m_changeChannelButton = new KPushButton( m_channelGroupBox, "m_changeChannelButton" );
    m_changeChannelButton->setEnabled( false );

    m_channelGroupBoxLayout->addWidget( m_changeChannelButton, 1, 1 );

    m_downChannelBtn = new TQToolButton( m_channelGroupBox, "m_downChannelBtn" );
    m_downChannelBtn->setEnabled( false );
    m_downChannelBtn->setAutoRepeat( true );

    m_channelGroupBoxLayout->addWidget( m_downChannelBtn, 1, 5 );

    m_removeChannelButton = new TQToolButton( m_channelGroupBox, "m_removeChannelButton" );
    m_removeChannelButton->setEnabled( false );

    m_channelGroupBoxLayout->addWidget( m_removeChannelButton, 1, 2 );
    channelSpacer = new TQSpacerItem( 255, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    m_channelGroupBoxLayout->addItem( channelSpacer, 1, 3 );

    m_upChannelBtn = new TQToolButton( m_channelGroupBox, "m_upChannelBtn" );
    m_upChannelBtn->setEnabled( false );
    m_upChannelBtn->setAutoRepeat( true );

    m_channelGroupBoxLayout->addWidget( m_upChannelBtn, 1, 4 );

    ServerGroupDialogUILayout->addMultiCellWidget( m_channelGroupBox, 5, 5, 0, 2 );

    m_identityCBox = new TQComboBox( false, this, "m_identityCBox" );
    m_identityCBox->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 2, 0, m_identityCBox->sizePolicy().hasHeightForWidth() ) );

    ServerGroupDialogUILayout->addWidget( m_identityCBox, 1, 1 );
    languageChange();
    resize( TQSize(491, 493).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void ServerGroupDialogUI::languageChange()
{
    m_networkLabel->setText( tr2i18n( "Network name:" ) );
    m_identityLabel->setText( tr2i18n( "Identity:" ) );
    m_commandsLabel->setText( tr2i18n( "Commands:" ) );
    m_editIdentityButton->setText( tr2i18n( "&Edit..." ) );
    m_autoConnectCBox->setText( tr2i18n( "Co&nnect on application start up" ) );
    m_serverGroupBox->setTitle( tr2i18n( "Servers" ) );
    m_addServerButton->setText( tr2i18n( "&Add..." ) );
    m_changeServerButton->setText( tr2i18n( "E&dit..." ) );
    m_removeServerButton->setText( TQString::null );
    m_downServerBtn->setText( TQString::null );
    m_upServerBtn->setText( TQString::null );
    m_channelGroupBox->setTitle( tr2i18n( "Auto Join Channels" ) );
    m_addChannelButton->setText( tr2i18n( "Add..." ) );
    m_changeChannelButton->setText( tr2i18n( "Ed&it..." ) );
    m_downChannelBtn->setText( TQString::null );
    m_removeChannelButton->setText( TQString::null );
    m_upChannelBtn->setText( TQString::null );
}

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

TQMetaObject *ServerGroupDialogUI::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_ServerGroupDialogUI( "ServerGroupDialogUI", &ServerGroupDialogUI::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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