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

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

#include "dccNewbase.h"

#include <ntqvariant.h>
#include <alistbox.h>
#include <kcombobox.h>
#include <klineedit.h>
#include <ntqpushbutton.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqgroupbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "alistbox.h"

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

    buttonGroup1 = new TQButtonGroup( this, "buttonGroup1" );
    buttonGroup1->setFrameShape( TQButtonGroup::GroupBoxPanel );
    buttonGroup1->setFrameShadow( TQButtonGroup::Sunken );
    buttonGroup1->setColumnLayout(0, TQt::Vertical );
    buttonGroup1->layout()->setSpacing( 6 );
    buttonGroup1->layout()->setMargin( 11 );
    buttonGroup1Layout = new TQHBoxLayout( buttonGroup1->layout() );
    buttonGroup1Layout->setAlignment( TQt::AlignTop );

    rbFileSend = new TQRadioButton( buttonGroup1, "rbFileSend" );
    buttonGroup1Layout->addWidget( rbFileSend );

    rbChat = new TQRadioButton( buttonGroup1, "rbChat" );
    buttonGroup1Layout->addWidget( rbChat );
    spacer2 = new TQSpacerItem( 51, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    buttonGroup1Layout->addItem( spacer2 );
    dccNewBaseLayout->addWidget( buttonGroup1 );

    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 );

    nickList = new aListBox( groupBox2, "nickList" );
    nickList->setMinimumSize( TQSize( 0, 100 ) );
    groupBox2Layout->addWidget( nickList );

    cbNicks = new KComboBox( false, groupBox2, "cbNicks" );
    cbNicks->setEditable( true );
    groupBox2Layout->addWidget( cbNicks );
    dccNewBaseLayout->addWidget( groupBox2 );

    gbFile = new TQGroupBox( this, "gbFile" );
    gbFile->setMinimumSize( TQSize( 0, 0 ) );
    gbFile->setColumnLayout(0, TQt::Vertical );
    gbFile->layout()->setSpacing( 6 );
    gbFile->layout()->setMargin( 11 );
    gbFileLayout = new TQHBoxLayout( gbFile->layout() );
    gbFileLayout->setAlignment( TQt::AlignTop );

    leFile = new KLineEdit( gbFile, "leFile" );
    gbFileLayout->addWidget( leFile );

    pbFile = new TQPushButton( gbFile, "pbFile" );
    pbFile->setAutoDefault( false );
    gbFileLayout->addWidget( pbFile );
    dccNewBaseLayout->addWidget( gbFile );

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

    pbSend = new TQPushButton( this, "pbSend" );
    pbSend->setDefault( true );
    layout1->addWidget( pbSend );

    pbCancel = new TQPushButton( this, "pbCancel" );
    layout1->addWidget( pbCancel );
    dccNewBaseLayout->addLayout( layout1 );
    languageChange();
    resize( TQSize(424, 386).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( rbChat, TQ_SIGNAL( clicked() ), this, TQ_SLOT( chatClicked() ) );
    connect( rbFileSend, TQ_SIGNAL( clicked() ), this, TQ_SLOT( fileSendClicked() ) );
    connect( pbSend, TQ_SIGNAL( clicked() ), this, TQ_SLOT( sendClicked() ) );
    connect( pbFile, TQ_SIGNAL( clicked() ), this, TQ_SLOT( fileClicked() ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void dccNewBase::languageChange()
{
    setCaption( tr2i18n( "New DCC" ) );
    buttonGroup1->setTitle( tr2i18n( "DCC Type" ) );
    rbFileSend->setText( tr2i18n( "&File send" ) );
    rbChat->setText( tr2i18n( "C&hat" ) );
    groupBox2->setTitle( tr2i18n( "Nick" ) );
    gbFile->setTitle( tr2i18n( "File Name" ) );
    pbFile->setText( tr2i18n( "&..." ) );
    pbSend->setText( tr2i18n( "&Send" ) );
    pbCancel->setText( tr2i18n( "&Cancel" ) );
}

void dccNewBase::chatClicked()
{
    tqWarning( "dccNewBase::chatClicked(): Not implemented yet" );
}

void dccNewBase::radioButton4_clicked()
{
    tqWarning( "dccNewBase::radioButton4_clicked(): Not implemented yet" );
}

void dccNewBase::fileSendClicked()
{
    tqWarning( "dccNewBase::fileSendClicked(): Not implemented yet" );
}

void dccNewBase::send()
{
    tqWarning( "dccNewBase::send(): Not implemented yet" );
}

void dccNewBase::sendClicked()
{
    tqWarning( "dccNewBase::sendClicked(): Not implemented yet" );
}

void dccNewBase::fileClicked()
{
    tqWarning( "dccNewBase::fileClicked(): Not implemented yet" );
}

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

TQMetaObject *dccNewBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_dccNewBase( "dccNewBase", &dccNewBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* dccNewBase::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 = {"chatClicked", 0, 0 };
    static const TQUMethod slot_1 = {"radioButton4_clicked", 0, 0 };
    static const TQUMethod slot_2 = {"fileSendClicked", 0, 0 };
    static const TQUMethod slot_3 = {"send", 0, 0 };
    static const TQUMethod slot_4 = {"sendClicked", 0, 0 };
    static const TQUMethod slot_5 = {"fileClicked", 0, 0 };
    static const TQUMethod slot_6 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "chatClicked()", &slot_0, TQMetaData::Public },
	{ "radioButton4_clicked()", &slot_1, TQMetaData::Public },
	{ "fileSendClicked()", &slot_2, TQMetaData::Public },
	{ "send()", &slot_3, TQMetaData::Public },
	{ "sendClicked()", &slot_4, TQMetaData::Public },
	{ "fileClicked()", &slot_5, TQMetaData::Public },
	{ "languageChange()", &slot_6, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"dccNewBase", parentObject,
	slot_tbl, 7,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_dccNewBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool dccNewBase::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: chatClicked(); break;
    case 1: radioButton4_clicked(); break;
    case 2: fileSendClicked(); break;
    case 3: send(); break;
    case 4: sendClicked(); break;
    case 5: fileClicked(); break;
    case 6: languageChange(); break;
    default:
	return TQDialog::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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