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

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

#include "validateprogresswidget.h"

#include <ntqvariant.h>
#include <kprogress.h>
#include <ksqueezedtextlabel.h>
#include <ntqlabel.h>
#include <ntqlistbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "validateprogresswidget.ui.h"

/*
 *  Constructs a ValidateProgressWidget as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
ValidateProgressWidget::ValidateProgressWidget( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "ValidateProgressWidget" );
    ValidateProgressWidgetLayout = new TQVBoxLayout( this, 11, 6, "ValidateProgressWidgetLayout"); 

    layout2 = new TQGridLayout( 0, 1, 1, 0, 6, "layout2"); 

    _currentAction = new TQLabel( this, "_currentAction" );
    _currentAction->setMinimumSize( TQSize( 92, 0 ) );

    layout2->addWidget( _currentAction, 2, 0 );

    _overallProgress = new KProgress( this, "_overallProgress" );

    layout2->addMultiCellWidget( _overallProgress, 3, 3, 1, 2 );

    _currentTool = new KSqueezedTextLabel( this, "_currentTool" );

    layout2->addWidget( _currentTool, 0, 2 );

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

    layout2->addWidget( textLabel1_2, 3, 0 );

    _currentFileProgress = new KProgress( this, "_currentFileProgress" );

    layout2->addMultiCellWidget( _currentFileProgress, 2, 2, 1, 2 );

    _currentFile = new KSqueezedTextLabel( this, "_currentFile" );

    layout2->addWidget( _currentFile, 1, 2 );

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

    layout2->addMultiCellWidget( _currentLabel, 1, 1, 0, 1 );

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

    layout2->addWidget( textLabel3_2, 0, 0 );
    ValidateProgressWidgetLayout->addLayout( layout2 );

    _errorList = new TQListBox( this, "_errorList" );
    ValidateProgressWidgetLayout->addWidget( _errorList );
    languageChange();
    resize( TQSize(448, 295).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( this, TQ_SIGNAL( setValidationProgressBar(int) ), _currentFileProgress, TQ_SLOT( setValue(int) ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void ValidateProgressWidget::languageChange()
{
    _currentAction->setText( tr2i18n( "Current:" ) );
    _currentTool->setText( TQString::null );
    textLabel1_2->setText( tr2i18n( "Overall:" ) );
    _currentFile->setText( TQString::null );
    _currentLabel->setText( tr2i18n( "Current file:" ) );
    textLabel3_2->setText( tr2i18n( "Validation:" ) );
    _errorList->clear();
    _errorList->insertItem( tr2i18n( "New Item" ) );
}

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

TQMetaObject *ValidateProgressWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_ValidateProgressWidget( "ValidateProgressWidget", &ValidateProgressWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* ValidateProgressWidget::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 TQUParameter param_slot_0[] = {
	{ "text", &static_QUType_TQString, 0, TQUParameter::In },
	{ "maxvalue", &static_QUType_int, 0, TQUParameter::In }
    };
    static const TQUMethod slot_0 = {"setupFileProgressBar", 2, param_slot_0 };
    static const TQUMethod slot_1 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "setupFileProgressBar(TQString,int)", &slot_0, TQMetaData::Public },
	{ "languageChange()", &slot_1, TQMetaData::Protected }
    };
    static const TQUParameter param_signal_0[] = {
	{ 0, &static_QUType_int, 0, TQUParameter::In }
    };
    static const TQUMethod signal_0 = {"setValidationProgressBar", 1, param_signal_0 };
    static const TQMetaData signal_tbl[] = {
	{ "setValidationProgressBar(int)", &signal_0, TQMetaData::Public }
    };
    metaObj = TQMetaObject::new_metaobject(
	"ValidateProgressWidget", parentObject,
	slot_tbl, 2,
	signal_tbl, 1,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_ValidateProgressWidget.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

// TQ_SIGNAL setValidationProgressBar
void ValidateProgressWidget::setValidationProgressBar( int t0 )
{
    activate_signal( staticMetaObject()->signalOffset() + 0, t0 );
}

bool ValidateProgressWidget::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: setupFileProgressBar((TQString)static_QUType_TQString.get(_o+1),(int)static_QUType_int.get(_o+2)); break;
    case 1: languageChange(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

bool ValidateProgressWidget::tqt_emit( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->signalOffset() ) {
    case 0: setValidationProgressBar((int)static_QUType_int.get(_o+1)); break;
    default:
	return TQWidget::tqt_emit(_id,_o);
    }
    return true;
}
#ifndef TQT_NO_PROPERTIES

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

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