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

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

#include "open_ksircData.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqcombobox.h>
#include <ntqgroupbox.h>
#include <ntqlineedit.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "enter_combo.h"

/*
 *  Constructs a open_ksircData 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.
 */
open_ksircData::open_ksircData( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "Form1" );
    Form1Layout = new TQGridLayout( this, 1, 1, 11, 6, "Form1Layout"); 

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

    Form1Layout->addMultiCellWidget( TextLabel2, 0, 0, 2, 3 );

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

    Form1Layout->addWidget( TextLabel3, 0, 4 );

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

    Form1Layout->addMultiCellWidget( ComboB_ServerGroup, 1, 1, 0, 1 );

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

    Form1Layout->addMultiCellWidget( TextLabel1, 0, 0, 0, 1 );

    ComboB_ServerName = new EnterCombo( this, "ComboB_ServerName" );
    ComboB_ServerName->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, ComboB_ServerName->sizePolicy().hasHeightForWidth() ) );
    ComboB_ServerName->setFocusPolicy( EnterCombo::StrongFocus );

    Form1Layout->addMultiCellWidget( ComboB_ServerName, 1, 1, 2, 3 );

    ComboB_ServerPort = new TQComboBox( false, this, "ComboB_ServerPort" );
    ComboB_ServerPort->setEditable( true );

    Form1Layout->addWidget( ComboB_ServerPort, 1, 4 );

    GroupBox2 = new TQGroupBox( this, "GroupBox2" );
    GroupBox2->setColumnLayout(0, TQt::Vertical );
    GroupBox2->layout()->setSpacing( 6 );
    GroupBox2->layout()->setMargin( 11 );
    GroupBox2Layout = new TQVBoxLayout( GroupBox2->layout() );
    GroupBox2Layout->setAlignment( TQt::AlignTop );

    Label_ServerDesc = new TQLabel( GroupBox2, "Label_ServerDesc" );
    Label_ServerDesc->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)1, 0, 0, Label_ServerDesc->sizePolicy().hasHeightForWidth() ) );
    Label_ServerDesc->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignTop | TQLabel::AlignLeft ) );
    GroupBox2Layout->addWidget( Label_ServerDesc );

    Form1Layout->addMultiCellWidget( GroupBox2, 2, 2, 0, 2 );

    GroupBox1 = new TQGroupBox( this, "GroupBox1" );
    GroupBox1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)3, 0, 0, GroupBox1->sizePolicy().hasHeightForWidth() ) );
    GroupBox1->setColumnLayout(0, TQt::Vertical );
    GroupBox1->layout()->setSpacing( 6 );
    GroupBox1->layout()->setMargin( 11 );
    GroupBox1Layout = new TQGridLayout( GroupBox1->layout() );
    GroupBox1Layout->setAlignment( TQt::AlignTop );

    TextLabel5 = new TQLabel( GroupBox1, "TextLabel5" );

    GroupBox1Layout->addWidget( TextLabel5, 0, 0 );

    LineE_Password = new TQLineEdit( GroupBox1, "LineE_Password" );
    LineE_Password->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 0, 0, LineE_Password->sizePolicy().hasHeightForWidth() ) );
    LineE_Password->setEchoMode( TQLineEdit::Password );

    GroupBox1Layout->addMultiCellWidget( LineE_Password, 0, 0, 1, 2 );

    CheckB_UseSSL = new TQCheckBox( GroupBox1, "CheckB_UseSSL" );

    GroupBox1Layout->addMultiCellWidget( CheckB_UseSSL, 1, 1, 0, 1 );

    CheckB_StorePassword = new TQCheckBox( GroupBox1, "CheckB_StorePassword" );

    GroupBox1Layout->addWidget( CheckB_StorePassword, 1, 2 );

    Form1Layout->addMultiCellWidget( GroupBox1, 2, 2, 3, 4 );

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

    Form1Layout->addWidget( PB_Cancel, 3, 4 );

    PB_Connect = new TQPushButton( this, "PB_Connect" );
    PB_Connect->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, PB_Connect->sizePolicy().hasHeightForWidth() ) );
    PB_Connect->setDefault( true );

    Form1Layout->addWidget( PB_Connect, 3, 3 );

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

    Form1Layout->addMultiCellWidget( PB_Edit, 3, 3, 1, 2 );
    Spacer3 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    Form1Layout->addItem( Spacer3, 3, 0 );
    languageChange();
    resize( TQSize(593, 196).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( LineE_Password, TQ_SIGNAL( textChanged(const TQString&) ), this, TQ_SLOT( passwordChanged(const TQString&) ) );

    // tab order
    setTabOrder( ComboB_ServerGroup, ComboB_ServerName );
    setTabOrder( ComboB_ServerName, ComboB_ServerPort );
    setTabOrder( ComboB_ServerPort, LineE_Password );
    setTabOrder( LineE_Password, CheckB_StorePassword );
    setTabOrder( CheckB_StorePassword, PB_Edit );
    setTabOrder( PB_Edit, PB_Connect );
    setTabOrder( PB_Connect, PB_Cancel );

    // buddies
    TextLabel2->setBuddy( ComboB_ServerName );
    TextLabel3->setBuddy( ComboB_ServerPort );
    TextLabel1->setBuddy( ComboB_ServerGroup );
    TextLabel5->setBuddy( LineE_Password );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void open_ksircData::languageChange()
{
    TextLabel2->setText( tr2i18n( "&Server/Quick connect to:" ) );
    TextLabel3->setText( tr2i18n( "&Port:" ) );
    TQToolTip::add( ComboB_ServerGroup, tr2i18n( "Choose a server for an IRC Network" ) );
    TQWhatsThis::add( ComboB_ServerGroup, tr2i18n( "Usually IRC Servers are connected to a net (IRCNet, Freenode, etc.). Here, you can select the closest server for your favorite network." ) );
    TextLabel1->setText( tr2i18n( "&Group:" ) );
    TQToolTip::add( ComboB_ServerName, tr2i18n( "Enter/choose a server to connect to" ) );
    TQWhatsThis::add( ComboB_ServerName, tr2i18n( "If you selected an IRC Network in <i>\"Group\"</i>, this window shows all of its servers. If you did not choose a group, you can enter your own here or select one of the recently used ones (<i>\"Quick Connect\"</i>)." ) );
    TQToolTip::add( ComboB_ServerPort, tr2i18n( "Choose a server port" ) );
    TQWhatsThis::add( ComboB_ServerPort, tr2i18n( "Using <i>\"6667\"</i> or <i>\"6666\"</i> here is safe in most cases. Only use other values if you have been told so." ) );
    GroupBox2->setTitle( tr2i18n( "Server Description" ) );
    TQWhatsThis::add( GroupBox2, tr2i18n( "This is the description of the server currently selected" ) );
    GroupBox1->setTitle( tr2i18n( "Server Access" ) );
    TextLabel5->setText( tr2i18n( "Pass&word:" ) );
    CheckB_UseSSL->setText( tr2i18n( "Use SS&L" ) );
    TQWhatsThis::add( CheckB_UseSSL, tr2i18n( "This will use a secure connection to the server. This must be supported by the server." ) );
    CheckB_StorePassword->setText( tr2i18n( "S&tore password" ) );
    TQWhatsThis::add( CheckB_StorePassword, tr2i18n( "This will cause your server password to be stored on your disk." ) );
    PB_Cancel->setText( tr2i18n( "&Cancel" ) );
    TQToolTip::add( PB_Cancel, tr2i18n( "Cancel Connect" ) );
    TQWhatsThis::add( PB_Cancel, tr2i18n( "Cancel Connect" ) );
    PB_Connect->setText( tr2i18n( "C&onnect" ) );
    TQToolTip::add( PB_Connect, tr2i18n( "Connect to the selected server" ) );
    TQWhatsThis::add( PB_Connect, tr2i18n( "Connect to the server given in <i>\"Server / Quick Connect to:\"</i> on the port given in <i>\"Port:\"</i>." ) );
    PB_Edit->setText( tr2i18n( "&Edit Servers" ) );
    TQWhatsThis::add( PB_Edit, TQString::null );
}

void open_ksircData::passwordChanged(const TQString&)
{
    tqWarning( "open_ksircData::passwordChanged(const TQString&): Not implemented yet" );
}

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

TQMetaObject *open_ksircData::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_open_ksircData( "open_ksircData", &open_ksircData::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* open_ksircData::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 TQUParameter param_slot_1[] = {
	{ 0, &static_QUType_TQString, 0, TQUParameter::In }
    };
    static const TQUMethod slot_1 = {"passwordChanged", 1, param_slot_1 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected },
	{ "passwordChanged(const TQString&)", &slot_1, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"open_ksircData", parentObject,
	slot_tbl, 2,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_open_ksircData.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool open_ksircData::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: languageChange(); break;
    case 1: passwordChanged((const TQString&)static_QUType_TQString.get(_o+1)); break;
    default:
	return TQDialog::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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