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

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

#include "mixminion.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqlineedit.h>
#include <ntqtextedit.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "mixminion.ui.h"

/*
 *  Constructs a MixMinionClient as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
MixMinionClient::MixMinionClient( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "MixMinionClient" );

    mailLayout = new TQGroupBox( this, "mailLayout" );
    mailLayout->setGeometry( TQRect( 11, 11, 578, 458 ) );
    mailLayout->setColumnLayout(0, TQt::Vertical );
    mailLayout->layout()->setSpacing( 6 );
    mailLayout->layout()->setMargin( 11 );
    mailLayoutLayout = new TQGridLayout( mailLayout->layout() );
    mailLayoutLayout->setAlignment( TQt::AlignTop );

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

    textLabel1_2 = new TQLabel( mailLayout, "textLabel1_2" );
    layout2_2->addWidget( textLabel1_2 );

    subject = new TQLineEdit( mailLayout, "subject" );
    subject->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 0, 0, subject->sizePolicy().hasHeightForWidth() ) );
    layout2_2->addWidget( subject );

    mailLayoutLayout->addMultiCellLayout( layout2_2, 1, 1, 0, 1 );

    layout1 = new TQHBoxLayout( 0, 0, 6, "layout1"); 
    spacer3 = new TQSpacerItem( 461, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout1->addItem( spacer3 );

    send = new TQPushButton( mailLayout, "send" );
    send->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, send->sizePolicy().hasHeightForWidth() ) );
    layout1->addWidget( send );

    mailLayoutLayout->addMultiCellLayout( layout1, 4, 4, 0, 1 );

    messageBody = new TQTextEdit( mailLayout, "messageBody" );

    mailLayoutLayout->addMultiCellWidget( messageBody, 2, 2, 0, 1 );

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

    textLabel1 = new TQLabel( mailLayout, "textLabel1" );
    layout2->addWidget( textLabel1 );

    toAddress = new TQLineEdit( mailLayout, "toAddress" );
    toAddress->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 0, 0, toAddress->sizePolicy().hasHeightForWidth() ) );
    layout2->addWidget( toAddress );

    mailLayoutLayout->addMultiCellLayout( layout2, 0, 0, 0, 1 );
    languageChange();
    resize( TQSize(600, 480).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( send, TQ_SIGNAL( clicked() ), this, TQ_SLOT( send_clicked() ) );

    // tab order
    setTabOrder( toAddress, subject );
    setTabOrder( subject, messageBody );
    setTabOrder( messageBody, send );
    init();
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void MixMinionClient::languageChange()
{
    setCaption( tr2i18n( "Anonymous Email Message" ) );
    mailLayout->setTitle( tr2i18n( "Anonymous Email Message For Delivery Through the Mixminion Network" ) );
    textLabel1_2->setText( tr2i18n( "Subject:" ) );
    send->setText( tr2i18n( "Send" ) );
    textLabel1->setText( tr2i18n( "To:" ) );
}

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

TQMetaObject *MixMinionClient::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_MixMinionClient( "MixMinionClient", &MixMinionClient::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* MixMinionClient::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 = {"send_clicked", 0, 0 };
    static const TQUMethod slot_1 = {"slotProg", 0, 0 };
    static const TQUParameter param_slot_2[] = {
	{ "mixminionproc", &static_QUType_ptr, "KProcIO", TQUParameter::In }
    };
    static const TQUMethod slot_2 = {"receivedMixminionOutput", 1, param_slot_2 };
    static const TQUParameter param_slot_3[] = {
	{ "proc", &static_QUType_ptr, "TDEProcess", TQUParameter::In }
    };
    static const TQUMethod slot_3 = {"mixminionprocExited", 1, param_slot_3 };
    static const TQUMethod slot_4 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "send_clicked()", &slot_0, TQMetaData::Public },
	{ "slotProg()", &slot_1, TQMetaData::Public },
	{ "receivedMixminionOutput(KProcIO*)", &slot_2, TQMetaData::Public },
	{ "mixminionprocExited(TDEProcess*)", &slot_3, TQMetaData::Public },
	{ "languageChange()", &slot_4, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"MixMinionClient", parentObject,
	slot_tbl, 5,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_MixMinionClient.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool MixMinionClient::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: send_clicked(); break;
    case 1: slotProg(); break;
    case 2: receivedMixminionOutput((KProcIO*)static_QUType_ptr.get(_o+1)); break;
    case 3: mixminionprocExited((TDEProcess*)static_QUType_ptr.get(_o+1)); break;
    case 4: languageChange(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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