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

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

#include "convert_dlg.h"

#include <ntqvariant.h>
#include <kprogress.h>
#include <ntqlabel.h>
#include <ntqpushbutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a ConvertingDlg 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.
 */
ConvertingDlg::ConvertingDlg( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "ConvertingDlg" );
    setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, sizePolicy().hasHeightForWidth() ) );
    setModal( true );
    ConvertingDlgLayout = new TQGridLayout( this, 1, 1, 11, 6, "ConvertingDlgLayout"); 
    ConvertingDlgLayout->setResizeMode( TQLayout::Fixed );

    textLabel1 = new TQLabel( this, "textLabel1" );
    textLabel1->setTextFormat( TQLabel::AutoText );
    textLabel1->setScaledContents( false );
    textLabel1->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) );
    textLabel1->setIndent( -2 );

    ConvertingDlgLayout->addWidget( textLabel1, 0, 0 );

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

    ConvertingDlgLayout->addWidget( lbl_progress, 1, 0 );

    kProgress1 = new KProgress( this, "kProgress1" );
    kProgress1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, kProgress1->sizePolicy().hasHeightForWidth() ) );
    kProgress1->setMinimumSize( TQSize( 390, 0 ) );

    ConvertingDlgLayout->addWidget( kProgress1, 2, 0 );

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

    label1 = new TQLabel( this, "label1" );
    layout6->addWidget( label1 );

    btnClose = new TQPushButton( this, "btnClose" );
    btnClose->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, btnClose->sizePolicy().hasHeightForWidth() ) );
    layout6->addWidget( btnClose );

    btnCancel = new TQPushButton( this, "btnCancel" );
    btnCancel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, btnCancel->sizePolicy().hasHeightForWidth() ) );
    layout6->addWidget( btnCancel );

    ConvertingDlgLayout->addLayout( layout6, 3, 0 );
    languageChange();
    resize( TQSize(414, 156).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( btnClose, TQ_SIGNAL( clicked() ), this, TQ_SLOT( btnClose_clicked() ) );
    connect( btnCancel, TQ_SIGNAL( clicked() ), this, TQ_SLOT( btnCancel_clicked() ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void ConvertingDlg::languageChange()
{
    setCaption( tr2i18n( "Converting..." ) );
    textLabel1->setText( tr2i18n( "Click on the 'convert' button to start converting antip2p file. NOTE: This process could take a while even on fast machines and during that time you will not be able to use KTorrent." ) );
    lbl_progress->setText( TQString::null );
    label1->setText( TQString::null );
    btnClose->setText( tr2i18n( "&Close" ) );
    btnCancel->setText( tr2i18n( "C&ancel" ) );
}

void ConvertingDlg::btnClose_clicked()
{
    tqWarning( "ConvertingDlg::btnClose_clicked(): Not implemented yet" );
}

void ConvertingDlg::btnCancel_clicked()
{
    tqWarning( "ConvertingDlg::btnCancel_clicked(): Not implemented yet" );
}

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

TQMetaObject *ConvertingDlg::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_ConvertingDlg( "ConvertingDlg", &ConvertingDlg::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* ConvertingDlg::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 = {"btnClose_clicked", 0, 0 };
    static const TQUMethod slot_1 = {"btnCancel_clicked", 0, 0 };
    static const TQUMethod slot_2 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "btnClose_clicked()", &slot_0, TQMetaData::Public },
	{ "btnCancel_clicked()", &slot_1, TQMetaData::Public },
	{ "languageChange()", &slot_2, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"ConvertingDlg", parentObject,
	slot_tbl, 3,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_ConvertingDlg.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool ConvertingDlg::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: btnClose_clicked(); break;
    case 1: btnCancel_clicked(); break;
    case 2: languageChange(); break;
    default:
	return TQDialog::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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