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

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

#include "klc.h"

#include <ntqvariant.h>
#include <kdirlister.h>
#include <tdeio/job.h>
#include <tqheader.h>
#include <tqtimer.h>
#include <tdeio/netaccess.h>
#include <tdeapplication.h>
#include <dcopclient.h>
#include <ntqpushbutton.h>
#include <ntqheader.h>
#include <ntqlistview.h>
#include <ntqlabel.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "klc.ui.h"

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

    layout1 = new TQHBoxLayout( 0, 0, 6, "layout1"); 
    spacer1 = new TQSpacerItem( 371, 26, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout1->addItem( spacer1 );

    pushApply = new TQPushButton( this, "pushApply" );
    layout1->addWidget( pushApply );

    pushClose = new TQPushButton( this, "pushClose" );
    layout1->addWidget( pushClose );

    KLCLayout->addMultiCellLayout( layout1, 2, 2, 0, 1 );

    listDisabled = new TQListView( this, "listDisabled" );
    listDisabled->addColumn( tr2i18n( "..." ) );
    listDisabled->setEnabled( false );
    listDisabled->setAllColumnsShowFocus( true );
    listDisabled->setResizeMode( TQListView::AllColumns );

    KLCLayout->addWidget( listDisabled, 1, 1 );

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

    KLCLayout->addWidget( textLabel1_2, 0, 1 );

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

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

    listEnabled = new TQListView( this, "listEnabled" );
    listEnabled->addColumn( tr2i18n( "..." ) );
    listEnabled->setEnabled( false );
    listEnabled->setAllColumnsShowFocus( true );
    listEnabled->setResizeMode( TQListView::AllColumns );

    KLCLayout->addWidget( listEnabled, 1, 0 );
    languageChange();
    resize( TQSize(586, 425).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( pushApply, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotApply() ) );
    connect( pushClose, TQ_SIGNAL( clicked() ), this, TQ_SLOT( close() ) );

    // tab order
    setTabOrder( listEnabled, listDisabled );
    setTabOrder( listDisabled, pushApply );
    setTabOrder( pushApply, pushClose );
    init();
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KLC::languageChange()
{
    setCaption( tr2i18n( "Codec manager" ) );
    pushApply->setText( tr2i18n( "Apply" ) );
    pushClose->setText( tr2i18n( "Close" ) );
    listDisabled->header()->setLabel( 0, tr2i18n( "..." ) );
    textLabel1_2->setText( tr2i18n( "<b>Select codecs to enable:</b>" ) );
    textLabel1->setText( tr2i18n( "<b>Select codecs to disable:</b>" ) );
    listEnabled->header()->setLabel( 0, tr2i18n( "..." ) );
}

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

TQMetaObject *KLC::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KLC( "KLC", &KLC::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* KLC::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 = {"languageChange", 0, 0 };
    static const TQUMethod slot_1 = {"slotLoad", 0, 0 };
    static const TQUMethod slot_2 = {"slotApply", 0, 0 };
    static const TQUParameter param_slot_3[] = {
	{ "u", &static_QUType_ptr, "KURL", TQUParameter::In }
    };
    static const TQUMethod slot_3 = {"slotCompleted", 1, param_slot_3 };
    static const TQUParameter param_slot_4[] = {
	{ "list", &static_QUType_ptr, "KFileItemList", TQUParameter::In }
    };
    static const TQUMethod slot_4 = {"slotNewItems", 1, param_slot_4 };
    static const TQUParameter param_slot_5[] = {
	{ "fi", &static_QUType_ptr, "KFileItem", TQUParameter::In }
    };
    static const TQUMethod slot_5 = {"slotDeleteItem", 1, param_slot_5 };
    static const TQUParameter param_slot_6[] = {
	{ "job", &static_QUType_ptr, "TDEIO::Job", TQUParameter::In }
    };
    static const TQUMethod slot_6 = {"slotDelResult", 1, param_slot_6 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected },
	{ "slotLoad()", &slot_1, TQMetaData::Private },
	{ "slotApply()", &slot_2, TQMetaData::Private },
	{ "slotCompleted(const KURL&)", &slot_3, TQMetaData::Private },
	{ "slotNewItems(const KFileItemList&)", &slot_4, TQMetaData::Private },
	{ "slotDeleteItem(KFileItem*)", &slot_5, TQMetaData::Private },
	{ "slotDelResult(TDEIO::Job*)", &slot_6, TQMetaData::Private }
    };
    metaObj = TQMetaObject::new_metaobject(
	"KLC", parentObject,
	slot_tbl, 7,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_KLC.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool KLC::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: languageChange(); break;
    case 1: slotLoad(); break;
    case 2: slotApply(); break;
    case 3: slotCompleted((const KURL&)*((const KURL*)static_QUType_ptr.get(_o+1))); break;
    case 4: slotNewItems((const KFileItemList&)*((const KFileItemList*)static_QUType_ptr.get(_o+1))); break;
    case 5: slotDeleteItem((KFileItem*)static_QUType_ptr.get(_o+1)); break;
    case 6: slotDelResult((TDEIO::Job*)static_QUType_ptr.get(_o+1)); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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