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

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

#include "sq_pluginsinfo.h"

#include <ntqvariant.h>
#include <kstandarddirs.h>
#include <ksquirrel-libs/fileio.h>
#include <ksquirrel-libs/fmt_codec_base.h>
#include <kstringhandler.h>
#include <ntqpushbutton.h>
#include <ntqframe.h>
#include <ntqheader.h>
#include <ntqlistview.h>
#include <ntqlabel.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "sq_libraryhandler.h"
#include "sq_iconloader.h"
#include "sq_codecsettingsskeleton.h"
#include "sq_pluginsinfo.ui.h"

/*
 *  Constructs a SQ_PluginsInfo 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.
 */
SQ_PluginsInfo::SQ_PluginsInfo( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "SQ_PluginsInfo" );
    setSizeGripEnabled( true );
    SQ_PluginsInfoLayout = new TQGridLayout( this, 1, 1, 11, 6, "SQ_PluginsInfoLayout"); 

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

    SQ_PluginsInfoLayout->addWidget( line1, 2, 0 );

    tableLib = new TQListView( this, "tableLib" );
    tableLib->addColumn( tr2i18n( "..." ) );
    tableLib->addColumn( tr2i18n( "Icon" ) );
    tableLib->addColumn( tr2i18n( "Library" ) );
    tableLib->addColumn( tr2i18n( "Version" ) );
    tableLib->addColumn( tr2i18n( "MIME" ) );
    tableLib->addColumn( TQString::null );
    tableLib->addColumn( TQString::null );
    tableLib->setAllColumnsShowFocus( true );
    tableLib->setResizeMode( TQListView::LastColumn );

    SQ_PluginsInfoLayout->addWidget( tableLib, 1, 0 );

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

    textCount = new TQLabel( this, "textCount" );
    TQFont textCount_font(  textCount->font() );
    textCount_font.setBold( true );
    textCount->setFont( textCount_font ); 

    layout1->addWidget( textCount, 1, 1 );

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

    layout1->addWidget( textLibs1, 0, 0 );
    spacer2 = new TQSpacerItem( 70, 16, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout1->addItem( spacer2, 1, 2 );

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

    layout1->addWidget( textLabel2, 1, 0 );

    textLibs = new TQLabel( this, "textLibs" );
    TQFont textLibs_font(  textLibs->font() );
    textLibs_font.setBold( true );
    textLibs->setFont( textLibs_font ); 

    layout1->addWidget( textLibs, 0, 1 );

    SQ_PluginsInfoLayout->addLayout( layout1, 0, 0 );

    layout6 = new TQHBoxLayout( 0, 0, 6, "layout6"); 
    spacer1 = new TQSpacerItem( 445, 16, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout6->addItem( spacer1 );

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

    SQ_PluginsInfoLayout->addLayout( layout6, 3, 0 );
    languageChange();
    resize( TQSize(604, 474).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( pushClose, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
    connect( tableLib, TQ_SIGNAL( doubleClicked(TQListViewItem*) ), this, TQ_SLOT( slotDoubleClicked(TQListViewItem*) ) );
    connect( tableLib, TQ_SIGNAL( mouseButtonClicked(int,TQListViewItem*,const TQPoint&,int) ), this, TQ_SLOT( slotMouseButtonClicked(int,TQListViewItem*,const TQPoint&,int) ) );
    init();
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void SQ_PluginsInfo::languageChange()
{
    setCaption( tr2i18n( "Codec information and settings" ) );
    tableLib->header()->setLabel( 0, tr2i18n( "..." ) );
    tableLib->header()->setLabel( 1, tr2i18n( "Icon" ) );
    tableLib->header()->setLabel( 2, tr2i18n( "Library" ) );
    tableLib->header()->setLabel( 3, tr2i18n( "Version" ) );
    tableLib->header()->setLabel( 4, tr2i18n( "MIME" ) );
    tableLib->header()->setLabel( 5, TQString::null );
    tableLib->header()->setLabel( 6, TQString::null );
    textCount->setText( TQString::null );
    textLibs1->setText( tr2i18n( "Directory:" ) );
    textLabel2->setText( tr2i18n( "Total found:" ) );
    textLibs->setText( TQString::null );
    pushClose->setText( tr2i18n( "Close" ) );
}

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

TQMetaObject *SQ_PluginsInfo::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_SQ_PluginsInfo( "SQ_PluginsInfo", &SQ_PluginsInfo::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* SQ_PluginsInfo::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 TQUParameter param_slot_0[] = {
	{ "i", &static_QUType_ptr, "TQListViewItem", TQUParameter::In }
    };
    static const TQUMethod slot_0 = {"slotDoubleClicked", 1, param_slot_0 };
    static const TQUParameter param_slot_1[] = {
	{ "button", &static_QUType_int, 0, TQUParameter::In },
	{ "i", &static_QUType_ptr, "TQListViewItem", TQUParameter::In },
	{ 0, &static_QUType_varptr, "\x0e", TQUParameter::In },
	{ "c", &static_QUType_int, 0, TQUParameter::In }
    };
    static const TQUMethod slot_1 = {"slotMouseButtonClicked", 4, param_slot_1 };
    static const TQUMethod slot_2 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "slotDoubleClicked(TQListViewItem*)", &slot_0, TQMetaData::Public },
	{ "slotMouseButtonClicked(int,TQListViewItem*,const TQPoint&,int)", &slot_1, TQMetaData::Public },
	{ "languageChange()", &slot_2, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"SQ_PluginsInfo", parentObject,
	slot_tbl, 3,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_SQ_PluginsInfo.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool SQ_PluginsInfo::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: slotDoubleClicked((TQListViewItem*)static_QUType_ptr.get(_o+1)); break;
    case 1: slotMouseButtonClicked((int)static_QUType_int.get(_o+1),(TQListViewItem*)static_QUType_ptr.get(_o+2),(const TQPoint&)*((const TQPoint*)static_QUType_ptr.get(_o+3)),(int)static_QUType_int.get(_o+4)); break;
    case 2: languageChange(); break;
    default:
	return TQDialog::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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