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

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

#include "propertiesdialog.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqtabwidget.h>
#include <ntqwidget.h>
#include <ntqlineedit.h>
#include <ntqframe.h>
#include <ntqlabel.h>
#include <ntqheader.h>
#include <ntqlistview.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "propertiesdialog.ui.h"

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

    TabWidget2 = new TQTabWidget( this, "TabWidget2" );

    details = new TQWidget( TabWidget2, "details" );
    detailsLayout = new TQGridLayout( details, 1, 1, 16, 6, "detailsLayout"); 

    nameField = new TQLineEdit( details, "nameField" );
    nameField->setMinimumSize( TQSize( 180, 0 ) );
    nameField->setReadOnly( true );

    detailsLayout->addWidget( nameField, 0, 2 );

    Line1 = new TQFrame( details, "Line1" );
    Line1->setProperty( "frameShape", "HLine" );
    Line1->setFrameShadow( TQFrame::Sunken );
    Line1->setFrameShape( TQFrame::HLine );

    detailsLayout->addMultiCellWidget( Line1, 1, 1, 0, 2 );

    iconLabel = new TQLabel( details, "iconLabel" );
    iconLabel->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignLeft ) );

    detailsLayout->addWidget( iconLabel, 0, 0 );

    typeLabel = new TQLabel( details, "typeLabel" );
    typeLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, typeLabel->sizePolicy().hasHeightForWidth() ) );

    detailsLayout->addWidget( typeLabel, 2, 2 );
    Spacer3 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    detailsLayout->addItem( Spacer3, 7, 2 );

    Line1_2 = new TQFrame( details, "Line1_2" );
    Line1_2->setProperty( "frameShape", "HLine" );
    Line1_2->setFrameShadow( TQFrame::Sunken );
    Line1_2->setFrameShape( TQFrame::HLine );

    detailsLayout->addMultiCellWidget( Line1_2, 6, 6, 0, 2 );

    TextLabel7_2 = new TQLabel( details, "TextLabel7_2" );

    detailsLayout->addWidget( TextLabel7_2, 2, 0 );

    TextLabel2_2 = new TQLabel( details, "TextLabel2_2" );
    TextLabel2_2->setMinimumSize( TQSize( 25, 0 ) );
    TextLabel2_2->setMaximumSize( TQSize( 25, 32767 ) );

    detailsLayout->addMultiCellWidget( TextLabel2_2, 2, 5, 1, 1 );

    TextLabel5 = new TQLabel( details, "TextLabel5" );

    detailsLayout->addWidget( TextLabel5, 3, 0 );

    lengthLabel = new TQLabel( details, "lengthLabel" );
    lengthLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, lengthLabel->sizePolicy().hasHeightForWidth() ) );

    detailsLayout->addWidget( lengthLabel, 3, 2 );

    TextLabel6 = new TQLabel( details, "TextLabel6" );

    detailsLayout->addWidget( TextLabel6, 4, 0 );

    audioLabel = new TQLabel( details, "audioLabel" );
    audioLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, audioLabel->sizePolicy().hasHeightForWidth() ) );

    detailsLayout->addWidget( audioLabel, 4, 2 );

    TextLabel7 = new TQLabel( details, "TextLabel7" );

    detailsLayout->addWidget( TextLabel7, 5, 0 );

    videoLabel = new TQLabel( details, "videoLabel" );
    videoLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, videoLabel->sizePolicy().hasHeightForWidth() ) );

    detailsLayout->addWidget( videoLabel, 5, 2 );
    TabWidget2->insertTab( details, TQString::fromLatin1("") );

    playobject = new TQWidget( TabWidget2, "playobject" );
    playobjectLayout = new TQGridLayout( playobject, 1, 1, 16, 6, "playobjectLayout"); 

    TextLabel2 = new TQLabel( playobject, "TextLabel2" );
    TextLabel2->setMinimumSize( TQSize( 80, 0 ) );
    TextLabel2->setMaximumSize( TQSize( 80, 32767 ) );

    playobjectLayout->addWidget( TextLabel2, 0, 0 );

    descriptionLabel = new TQLabel( playobject, "descriptionLabel" );

    playobjectLayout->addWidget( descriptionLabel, 0, 1 );

    capsList = new TQListView( playobject, "capsList" );
    capsList->addColumn( tr2i18n( "Capabilities" ) );

    playobjectLayout->addMultiCellWidget( capsList, 1, 1, 0, 1 );
    TabWidget2->insertTab( playobject, TQString::fromLatin1("") );
    PropertiesDialogLayout->addWidget( TabWidget2 );

    buttonLayout = new TQHBoxLayout( 0, 0, 6, "buttonLayout"); 
    Spacer1 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    buttonLayout->addItem( Spacer1 );

    okButton = new TQPushButton( this, "okButton" );
    okButton->setDefault( true );
    buttonLayout->addWidget( okButton );
    PropertiesDialogLayout->addLayout( buttonLayout );
    languageChange();
    resize( TQSize(320, 261).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( okButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void PropertiesDialog::languageChange()
{
    setCaption( tr2i18n( "Properties" ) );
    nameField->setText( TQString::null );
    TextLabel7_2->setText( tr2i18n( "Type:" ) );
    TextLabel5->setText( tr2i18n( "Length:" ) );
    TextLabel6->setText( tr2i18n( "Audio:" ) );
    TextLabel7->setText( tr2i18n( "Video:" ) );
    TabWidget2->changeTab( details, tr2i18n( "&Details" ) );
    TextLabel2->setText( tr2i18n( "Description:" ) );
    capsList->header()->setLabel( 0, tr2i18n( "Capabilities" ) );
    TabWidget2->changeTab( playobject, tr2i18n( "&PlayObject" ) );
    okButton->setText( tr2i18n( "&OK" ) );
}

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

TQMetaObject *PropertiesDialog::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_PropertiesDialog( "PropertiesDialog", &PropertiesDialog::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* PropertiesDialog::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[] = {
	{ "pi", &static_QUType_ptr, "PlaylistItem", TQUParameter::In },
	{ "po", &static_QUType_ptr, "Arts::PlayObject", TQUParameter::In }
    };
    static const TQUMethod slot_0 = {"setPlayObject", 2, param_slot_0 };
    static const TQUMethod slot_1 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "setPlayObject(PlaylistItem,Arts::PlayObject)", &slot_0, TQMetaData::Public },
	{ "languageChange()", &slot_1, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"PropertiesDialog", parentObject,
	slot_tbl, 2,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_PropertiesDialog.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool PropertiesDialog::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: setPlayObject((PlaylistItem)(*((PlaylistItem*)static_QUType_ptr.get(_o+1))),(Arts::PlayObject)(*((Arts::PlayObject*)static_QUType_ptr.get(_o+2)))); break;
    case 1: languageChange(); break;
    default:
	return TQDialog::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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