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

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

#include "scandlgbase.h"

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

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

    m_torrent_label = new TQLabel( this, "m_torrent_label" );
    ScanDlgBaseLayout->addWidget( m_torrent_label );

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

    layout3 = new TQVBoxLayout( 0, 0, 6, "layout3"); 

    textLabel2 = new TQLabel( this, "textLabel2" );
    layout3->addWidget( textLabel2 );

    textLabel3 = new TQLabel( this, "textLabel3" );
    layout3->addWidget( textLabel3 );
    layout5->addLayout( layout3 );

    layout4 = new TQVBoxLayout( 0, 0, 6, "layout4"); 

    m_chunks_found = new TQLabel( this, "m_chunks_found" );
    m_chunks_found->setMinimumSize( TQSize( 100, 0 ) );
    m_chunks_found->setFrameShape( TQLabel::Box );
    m_chunks_found->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
    layout4->addWidget( m_chunks_found );

    m_chunks_failed = new TQLabel( this, "m_chunks_failed" );
    m_chunks_failed->setMinimumSize( TQSize( 100, 0 ) );
    m_chunks_failed->setFrameShape( TQLabel::Box );
    m_chunks_failed->setFrameShadow( TQLabel::Plain );
    m_chunks_failed->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
    layout4->addWidget( m_chunks_failed );
    layout5->addLayout( layout4 );
    ScanDlgBaseLayout->addLayout( layout5 );

    m_progress = new KProgress( this, "m_progress" );
    ScanDlgBaseLayout->addWidget( m_progress );

    line1 = new TQFrame( this, "line1" );
    line1->setFrameShape( TQFrame::HLine );
    line1->setFrameShadow( TQFrame::Sunken );
    line1->setFrameShape( TQFrame::HLine );
    ScanDlgBaseLayout->addWidget( line1 );

    layout8 = new TQHBoxLayout( 0, 0, 6, "layout8"); 
    spacer2 = new TQSpacerItem( 181, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout8->addItem( spacer2 );

    m_cancel = new KPushButton( this, "m_cancel" );
    layout8->addWidget( m_cancel );
    ScanDlgBaseLayout->addLayout( layout8 );
    languageChange();
    resize( TQSize(441, 182).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void ScanDlgBase::languageChange()
{
    setCaption( tr2i18n( "Scanning data" ) );
    m_torrent_label->setText( tr2i18n( "Scanning data of torrent :" ) );
    textLabel2->setText( tr2i18n( "Number of chunks found :" ) );
    textLabel3->setText( tr2i18n( "Number of chunks failed / not downloaded :" ) );
    m_chunks_found->setText( tr2i18n( "0" ) );
    m_chunks_failed->setText( tr2i18n( "0" ) );
    m_cancel->setText( tr2i18n( "C&ancel" ) );
}

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

TQMetaObject *ScanDlgBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_ScanDlgBase( "ScanDlgBase", &ScanDlgBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* ScanDlgBase::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 TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"ScanDlgBase", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_ScanDlgBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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