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

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

#include "subeditorui.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqframe.h>
#include <ntqgroupbox.h>
#include <ntqlistbox.h>
#include <ntqlabel.h>
#include <ntqspinbox.h>
#include <ntqlineedit.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

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

    SubEditorUILayout->addWidget( line3, 1, 0 );

    layout19 = new TQHBoxLayout( 0, 0, 6, "layout19"); 
    spacer9 = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout19->addItem( spacer9 );

    okBtn = new TQPushButton( this, "okBtn" );
    layout19->addWidget( okBtn );

    SubEditorUILayout->addLayout( layout19, 2, 0 );

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

    groupBox10 = new TQGroupBox( this, "groupBox10" );
    groupBox10->setColumnLayout(0, TQt::Vertical );
    groupBox10->layout()->setSpacing( 6 );
    groupBox10->layout()->setMargin( 11 );
    groupBox10Layout = new TQGridLayout( groupBox10->layout() );
    groupBox10Layout->setAlignment( TQt::AlignTop );

    pidList = new TQListBox( groupBox10, "pidList" );

    groupBox10Layout->addWidget( pidList, 0, 0 );
    layout13->addWidget( groupBox10 );

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

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

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

    upBtn = new TQPushButton( this, "upBtn" );
    layout15->addWidget( upBtn );

    downBtn = new TQPushButton( this, "downBtn" );
    layout15->addWidget( downBtn );

    delBtn = new TQPushButton( this, "delBtn" );
    layout15->addWidget( delBtn );
    layout16->addLayout( layout15 );
    spacer8 = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout16->addItem( spacer8 );
    layout12->addLayout( layout16 );
    spacer10 = new TQSpacerItem( 20, 180, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    layout12->addItem( spacer10 );

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

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

    updateBtn = new TQPushButton( this, "updateBtn" );
    layout13_2->addWidget( updateBtn );

    newBtn = new TQPushButton( this, "newBtn" );
    layout13_2->addWidget( newBtn );
    layout11->addLayout( layout13_2 );

    groupBox9 = new TQGroupBox( this, "groupBox9" );
    groupBox9->setColumnLayout(0, TQt::Vertical );
    groupBox9->layout()->setSpacing( 6 );
    groupBox9->layout()->setMargin( 11 );
    groupBox9Layout = new TQHBoxLayout( groupBox9->layout() );
    groupBox9Layout->setAlignment( TQt::AlignTop );

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

    textLabel3 = new TQLabel( groupBox9, "textLabel3" );
    layout10->addWidget( textLabel3 );

    textLabel1 = new TQLabel( groupBox9, "textLabel1" );
    layout10->addWidget( textLabel1 );

    textLabel2 = new TQLabel( groupBox9, "textLabel2" );
    layout10->addWidget( textLabel2 );

    textLabel4 = new TQLabel( groupBox9, "textLabel4" );
    layout10->addWidget( textLabel4 );
    groupBox9Layout->addLayout( layout10 );

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

    pidSpin = new TQSpinBox( groupBox9, "pidSpin" );
    pidSpin->setMaxValue( 8191 );
    layout9->addWidget( pidSpin );

    pageSpin = new TQSpinBox( groupBox9, "pageSpin" );
    pageSpin->setMaxValue( 99999 );
    layout9->addWidget( pageSpin );

    ancSpin = new TQSpinBox( groupBox9, "ancSpin" );
    ancSpin->setMaxValue( 99999 );
    layout9->addWidget( ancSpin );

    langLe = new TQLineEdit( groupBox9, "langLe" );
    langLe->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)2, (TQSizePolicy::SizeType)0, 0, 0, langLe->sizePolicy().hasHeightForWidth() ) );
    layout9->addWidget( langLe );
    groupBox9Layout->addLayout( layout9 );
    layout11->addWidget( groupBox9 );
    layout12->addLayout( layout11 );
    layout13->addLayout( layout12 );

    SubEditorUILayout->addLayout( layout13, 0, 0 );
    languageChange();
    resize( TQSize(558, 444).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

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

    // tab order
    setTabOrder( okBtn, pidList );
    setTabOrder( pidList, upBtn );
    setTabOrder( upBtn, downBtn );
    setTabOrder( downBtn, delBtn );
    setTabOrder( delBtn, updateBtn );
    setTabOrder( updateBtn, newBtn );
    setTabOrder( newBtn, pidSpin );
    setTabOrder( pidSpin, pageSpin );
    setTabOrder( pageSpin, ancSpin );
    setTabOrder( ancSpin, langLe );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void SubEditorUI::languageChange()
{
    setCaption( tr2i18n( "Subtitle PIDs Editor" ) );
    okBtn->setText( tr2i18n( "&Close" ) );
    groupBox10->setTitle( tr2i18n( "Subtitle PIDs" ) );
    pidList->clear();
    pidList->insertItem( tr2i18n( "New Item" ) );
    upBtn->setText( tr2i18n( "Move Up" ) );
    downBtn->setText( tr2i18n( "Move Down" ) );
    delBtn->setText( tr2i18n( "Remove" ) );
    updateBtn->setText( tr2i18n( "<< Update Selected" ) );
    newBtn->setText( tr2i18n( "<< New" ) );
    groupBox9->setTitle( tr2i18n( "Properties" ) );
    textLabel3->setText( tr2i18n( "Pid:" ) );
    textLabel1->setText( tr2i18n( "Page:" ) );
    textLabel2->setText( tr2i18n( "Sub page:" ) );
    textLabel4->setText( tr2i18n( "Lang:" ) );
}

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

TQMetaObject *SubEditorUI::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_SubEditorUI( "SubEditorUI", &SubEditorUI::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* SubEditorUI::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(
	"SubEditorUI", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_SubEditorUI.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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