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

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

#include "channeleditorui.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqframe.h>
#include <ntqlabel.h>
#include <ntqcombobox.h>
#include <ntqlineedit.h>
#include <ntqspinbox.h>
#include <ntqgroupbox.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

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

    ChannelEditorUILayout->addWidget( line2, 0, 1 );

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

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

    textLabel1_4 = new TQLabel( this, "textLabel1_4" );
    layout8->addWidget( textLabel1_4 );

    sourceComb = new TQComboBox( false, this, "sourceComb" );
    layout8->addWidget( sourceComb );
    spacer3 = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout8->addItem( spacer3 );
    layout7->addLayout( layout8 );

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

    textLabel1 = new TQLabel( this, "textLabel1" );
    textLabel1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, textLabel1->sizePolicy().hasHeightForWidth() ) );
    layout5->addWidget( textLabel1 );

    nameLe = new TQLineEdit( this, "nameLe" );
    nameLe->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 0, 0, nameLe->sizePolicy().hasHeightForWidth() ) );
    layout5->addWidget( nameLe );

    textLabel2_2 = new TQLabel( this, "textLabel2_2" );
    layout5->addWidget( textLabel2_2 );

    numSpin = new TQSpinBox( this, "numSpin" );
    numSpin->setMaxValue( 99999 );
    layout5->addWidget( numSpin );
    layout7->addLayout( layout5 );

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

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

    polGroup = new TQButtonGroup( freqGroup, "polGroup" );
    polGroup->setColumnLayout(0, TQt::Vertical );
    polGroup->layout()->setSpacing( 6 );
    polGroup->layout()->setMargin( 11 );
    polGroupLayout = new TQGridLayout( polGroup->layout() );
    polGroupLayout->setAlignment( TQt::AlignTop );

    verticalRadio = new TQRadioButton( polGroup, "verticalRadio" );

    polGroupLayout->addWidget( verticalRadio, 0, 0 );

    horizontalRadio = new TQRadioButton( polGroup, "horizontalRadio" );

    polGroupLayout->addWidget( horizontalRadio, 0, 1 );

    freqGroupLayout->addMultiCellWidget( polGroup, 2, 2, 0, 1 );

    textLabel2 = new TQLabel( freqGroup, "textLabel2" );
    textLabel2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, textLabel2->sizePolicy().hasHeightForWidth() ) );

    freqGroupLayout->addWidget( textLabel2, 0, 0 );

    textLabel3 = new TQLabel( freqGroup, "textLabel3" );
    textLabel3->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, textLabel3->sizePolicy().hasHeightForWidth() ) );

    freqGroupLayout->addWidget( textLabel3, 1, 0 );

    srSpin = new TQSpinBox( freqGroup, "srSpin" );
    srSpin->setMaxValue( 99999 );

    freqGroupLayout->addWidget( srSpin, 1, 1 );

    freqSpin = new TQSpinBox( freqGroup, "freqSpin" );
    freqSpin->setMaxValue( 999999 );
    freqSpin->setMinValue( 0 );
    freqSpin->setValue( 0 );

    freqGroupLayout->addWidget( freqSpin, 0, 1 );

    ftaCb = new TQCheckBox( freqGroup, "ftaCb" );

    freqGroupLayout->addMultiCellWidget( ftaCb, 3, 3, 0, 1 );
    layout6->addWidget( freqGroup );

    pidsGroup = new TQGroupBox( this, "pidsGroup" );
    pidsGroup->setColumnLayout(0, TQt::Vertical );
    pidsGroup->layout()->setSpacing( 6 );
    pidsGroup->layout()->setMargin( 11 );
    pidsGroupLayout = new TQVBoxLayout( pidsGroup->layout() );
    pidsGroupLayout->setAlignment( TQt::AlignTop );

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

    tsidSpin = new TQSpinBox( pidsGroup, "tsidSpin" );
    tsidSpin->setMaxValue( 65535 );

    layout7_2->addWidget( tsidSpin, 1, 1 );

    ttpidSpin = new TQSpinBox( pidsGroup, "ttpidSpin" );
    ttpidSpin->setMaxValue( 8191 );
    ttpidSpin->setMinValue( 0 );
    ttpidSpin->setValue( 0 );

    layout7_2->addWidget( ttpidSpin, 4, 1 );

    textLabel12 = new TQLabel( pidsGroup, "textLabel12" );
    textLabel12->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, textLabel12->sizePolicy().hasHeightForWidth() ) );

    layout7_2->addWidget( textLabel12, 2, 0 );

    textLabel2_3 = new TQLabel( pidsGroup, "textLabel2_3" );

    layout7_2->addWidget( textLabel2_3, 0, 0 );

    textLabel15 = new TQLabel( pidsGroup, "textLabel15" );
    textLabel15->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, textLabel15->sizePolicy().hasHeightForWidth() ) );

    layout7_2->addWidget( textLabel15, 4, 0 );

    vpidSpin = new TQSpinBox( pidsGroup, "vpidSpin" );
    vpidSpin->setMaxValue( 8191 );
    vpidSpin->setMinValue( 0 );
    vpidSpin->setValue( 0 );

    layout7_2->addWidget( vpidSpin, 3, 1 );

    sidSpin = new TQSpinBox( pidsGroup, "sidSpin" );
    sidSpin->setMaxValue( 65535 );

    layout7_2->addWidget( sidSpin, 2, 1 );

    nidSpin = new TQSpinBox( pidsGroup, "nidSpin" );
    nidSpin->setMaxValue( 65535 );

    layout7_2->addWidget( nidSpin, 0, 1 );

    textLabel13 = new TQLabel( pidsGroup, "textLabel13" );
    textLabel13->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, textLabel13->sizePolicy().hasHeightForWidth() ) );

    layout7_2->addWidget( textLabel13, 3, 0 );

    textLabel1_2 = new TQLabel( pidsGroup, "textLabel1_2" );
    textLabel1_2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, textLabel1_2->sizePolicy().hasHeightForWidth() ) );

    layout7_2->addWidget( textLabel1_2, 1, 0 );
    pidsGroupLayout->addLayout( layout7_2 );

    subpidBtn = new TQPushButton( pidsGroup, "subpidBtn" );
    pidsGroupLayout->addWidget( subpidBtn );

    apidBtn = new TQPushButton( pidsGroup, "apidBtn" );
    apidBtn->setFocusPolicy( TQPushButton::TabFocus );
    pidsGroupLayout->addWidget( apidBtn );
    layout6->addWidget( pidsGroup );
    layout7->addLayout( layout6 );

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

    transmissionComb = new TQComboBox( false, extendedGroup, "transmissionComb" );

    extendedGroupLayout->addWidget( transmissionComb, 0, 1 );

    textLabel10 = new TQLabel( extendedGroup, "textLabel10" );
    textLabel10->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, textLabel10->sizePolicy().hasHeightForWidth() ) );

    extendedGroupLayout->addWidget( textLabel10, 2, 0 );

    textLabel8 = new TQLabel( extendedGroup, "textLabel8" );
    textLabel8->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, textLabel8->sizePolicy().hasHeightForWidth() ) );

    extendedGroupLayout->addWidget( textLabel8, 0, 0 );

    coderateHComb = new TQComboBox( false, extendedGroup, "coderateHComb" );

    extendedGroupLayout->addWidget( coderateHComb, 2, 1 );

    coderateLComb = new TQComboBox( false, extendedGroup, "coderateLComb" );

    extendedGroupLayout->addWidget( coderateLComb, 1, 1 );

    textLabel9 = new TQLabel( extendedGroup, "textLabel9" );
    textLabel9->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, textLabel9->sizePolicy().hasHeightForWidth() ) );

    extendedGroupLayout->addWidget( textLabel9, 1, 0 );

    textLabel7 = new TQLabel( extendedGroup, "textLabel7" );
    textLabel7->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, textLabel7->sizePolicy().hasHeightForWidth() ) );

    extendedGroupLayout->addWidget( textLabel7, 3, 2 );

    hierarchyComb = new TQComboBox( false, extendedGroup, "hierarchyComb" );

    extendedGroupLayout->addWidget( hierarchyComb, 2, 3 );

    textLabel6 = new TQLabel( extendedGroup, "textLabel6" );
    textLabel6->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, textLabel6->sizePolicy().hasHeightForWidth() ) );

    extendedGroupLayout->addWidget( textLabel6, 2, 2 );

    textLabel5 = new TQLabel( extendedGroup, "textLabel5" );
    textLabel5->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, textLabel5->sizePolicy().hasHeightForWidth() ) );

    extendedGroupLayout->addWidget( textLabel5, 1, 2 );

    modulationComb = new TQComboBox( false, extendedGroup, "modulationComb" );

    extendedGroupLayout->addWidget( modulationComb, 1, 3 );

    inversionComb = new TQComboBox( false, extendedGroup, "inversionComb" );

    extendedGroupLayout->addWidget( inversionComb, 0, 3 );

    textLabel4 = new TQLabel( extendedGroup, "textLabel4" );
    textLabel4->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, textLabel4->sizePolicy().hasHeightForWidth() ) );

    extendedGroupLayout->addWidget( textLabel4, 0, 2 );

    textLabel11 = new TQLabel( extendedGroup, "textLabel11" );
    textLabel11->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, textLabel11->sizePolicy().hasHeightForWidth() ) );

    extendedGroupLayout->addWidget( textLabel11, 3, 0 );

    bandwidthComb = new TQComboBox( false, extendedGroup, "bandwidthComb" );

    extendedGroupLayout->addWidget( bandwidthComb, 3, 1 );

    textLabel1_3 = new TQLabel( extendedGroup, "textLabel1_3" );

    extendedGroupLayout->addWidget( textLabel1_3, 4, 0 );

    stypeComb = new TQComboBox( false, extendedGroup, "stypeComb" );

    extendedGroupLayout->addWidget( stypeComb, 4, 1 );

    rolloffComb = new TQComboBox( false, extendedGroup, "rolloffComb" );

    extendedGroupLayout->addWidget( rolloffComb, 4, 3 );

    textLabel2_4 = new TQLabel( extendedGroup, "textLabel2_4" );

    extendedGroupLayout->addWidget( textLabel2_4, 4, 2 );

    guardComb = new TQComboBox( false, extendedGroup, "guardComb" );

    extendedGroupLayout->addWidget( guardComb, 3, 3 );
    layout7->addWidget( extendedGroup );
    spacer6 = new TQSpacerItem( 20, 166, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    layout7->addItem( spacer6 );

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

    okBtn = new TQPushButton( this, "okBtn" );
    layout14->addWidget( okBtn );
    spacer4 = new TQSpacerItem( 150, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout14->addItem( spacer4 );

    cancelBtn = new TQPushButton( this, "cancelBtn" );
    layout14->addWidget( cancelBtn );
    layout7->addLayout( layout14 );

    ChannelEditorUILayout->addLayout( layout7, 0, 0 );
    languageChange();
    resize( TQSize(477, 541).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

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

    // tab order
    setTabOrder( nameLe, numSpin );
    setTabOrder( numSpin, freqSpin );
    setTabOrder( freqSpin, srSpin );
    setTabOrder( srSpin, verticalRadio );
    setTabOrder( verticalRadio, horizontalRadio );
    setTabOrder( horizontalRadio, ftaCb );
    setTabOrder( ftaCb, tsidSpin );
    setTabOrder( tsidSpin, sidSpin );
    setTabOrder( sidSpin, vpidSpin );
    setTabOrder( vpidSpin, ttpidSpin );
    setTabOrder( ttpidSpin, apidBtn );
    setTabOrder( apidBtn, transmissionComb );
    setTabOrder( transmissionComb, coderateLComb );
    setTabOrder( coderateLComb, coderateHComb );
    setTabOrder( coderateHComb, bandwidthComb );
    setTabOrder( bandwidthComb, inversionComb );
    setTabOrder( inversionComb, modulationComb );
    setTabOrder( modulationComb, hierarchyComb );
    setTabOrder( hierarchyComb, guardComb );
    setTabOrder( guardComb, cancelBtn );
    setTabOrder( cancelBtn, okBtn );
    setTabOrder( okBtn, sourceComb );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void ChannelEditorUI::languageChange()
{
    setCaption( tr2i18n( "Channel Editor" ) );
    textLabel1_4->setText( tr2i18n( "Source:" ) );
    textLabel1->setText( tr2i18n( "Name:" ) );
    textLabel2_2->setText( tr2i18n( "Nr:" ) );
    freqGroup->setTitle( TQString::null );
    polGroup->setTitle( tr2i18n( "Polarity" ) );
    verticalRadio->setText( tr2i18n( "Vertical" ) );
    horizontalRadio->setText( tr2i18n( "Horizontal" ) );
    textLabel2->setText( tr2i18n( "Frequency:" ) );
    textLabel3->setText( tr2i18n( "Symbol rate:" ) );
    ftaCb->setText( tr2i18n( "Scrambled" ) );
    pidsGroup->setTitle( TQString::null );
    textLabel12->setText( tr2i18n( "Service ID:" ) );
    textLabel2_3->setText( tr2i18n( "Network ID:" ) );
    textLabel15->setText( tr2i18n( "Teletext PID:" ) );
    textLabel13->setText( tr2i18n( "Video PID:" ) );
    textLabel1_2->setText( tr2i18n( "Transport stream ID:" ) );
    subpidBtn->setText( tr2i18n( "Subtitle PIDs..." ) );
    apidBtn->setText( tr2i18n( "Audio PIDs..." ) );
    extendedGroup->setTitle( TQString::null );
    textLabel10->setText( tr2i18n( "FEC high:" ) );
    textLabel8->setText( tr2i18n( "Transmission:" ) );
    textLabel9->setText( tr2i18n( "FEC low:" ) );
    textLabel7->setText( tr2i18n( "Guard interval:" ) );
    textLabel6->setText( tr2i18n( "Hierarchy:" ) );
    textLabel5->setText( tr2i18n( "Modulation:" ) );
    textLabel4->setText( tr2i18n( "Inversion:" ) );
    textLabel11->setText( tr2i18n( "Bandwidth:" ) );
    textLabel1_3->setText( tr2i18n( "Type:" ) );
    textLabel2_4->setText( tr2i18n( "Roll off:" ) );
    okBtn->setText( tr2i18n( "&OK" ) );
    cancelBtn->setText( tr2i18n( "&Cancel" ) );
}

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

TQMetaObject *ChannelEditorUI::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_ChannelEditorUI( "ChannelEditorUI", &ChannelEditorUI::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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