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

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

#include "speedtuner.h"

#include <ntqvariant.h>
#include <knuminput.h>
#include <ntqslider.h>
#include <ntqlineedit.h>
#include <ntqlabel.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    slider = new TQSlider( this, "slider" );
    slider->setOrientation( TQSlider::Vertical );
    slider->setTickmarks( TQSlider::Both );
    SpeedTunerLayout->addWidget( slider );

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

    currentValEdit = new TQLineEdit( this, "currentValEdit" );
    currentValEdit->setEnabled( false );
    TQFont currentValEdit_font(  currentValEdit->font() );
    currentValEdit_font.setFamily( "Sans Serif" );
    currentValEdit_font.setPointSize( 24 );
    currentValEdit_font.setBold( true );
    currentValEdit->setFont( currentValEdit_font ); 
    currentValEdit->setFrame( false );
    currentValEdit->setAlignment( int( TQLineEdit::AlignHCenter ) );
    Layout4->addWidget( currentValEdit );
    Spacer1 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    Layout4->addItem( Spacer1 );

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

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

    Layout2->addWidget( rangeLabel, 0, 0 );

    rangeInput = new KIntNumInput( this, "rangeInput" );
    rangeInput->setValue( 10 );

    Layout2->addWidget( rangeInput, 0, 1 );

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

    Layout2->addWidget( offsetLabel, 1, 0 );

    offsetInput = new KIntNumInput( this, "offsetInput" );
    offsetInput->setValue( 5 );

    Layout2->addWidget( offsetInput, 1, 1 );
    Layout4->addLayout( Layout2 );

    preserveFrequencies = new TQCheckBox( this, "preserveFrequencies" );
    Layout4->addWidget( preserveFrequencies );
    SpeedTunerLayout->addLayout( Layout4 );
    languageChange();
    resize( TQSize(269, 316).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( slider, TQ_SIGNAL( valueChanged(int) ), this, TQ_SLOT( speedChanged(int) ) );
    connect( rangeInput, TQ_SIGNAL( valueChanged(int) ), this, TQ_SLOT( rangeChanged(int) ) );
    connect( offsetInput, TQ_SIGNAL( valueChanged(int) ), this, TQ_SLOT( offsetChanged(int) ) );

    // buddies
    rangeLabel->setBuddy( rangeInput );
    offsetLabel->setBuddy( offsetInput );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void SpeedTuner::languageChange()
{
    setCaption( tr2i18n( "Adjust Playing Speed" ) );
    rangeLabel->setText( tr2i18n( "&Range:" ) );
    rangeInput->setSuffix( tr2i18n( " %" ) );
    rangeInput->setPrefix( tr2i18n( "+/- " ) );
    offsetLabel->setText( tr2i18n( "&Offset:" ) );
    offsetInput->setSuffix( tr2i18n( " %" ) );
    preserveFrequencies->setText( tr2i18n( "&Preserve frequencies" ) );
}

void SpeedTuner::speedChanged(int)
{
    tqWarning( "SpeedTuner::speedChanged(int): Not implemented yet" );
}

void SpeedTuner::offsetChanged(int)
{
    tqWarning( "SpeedTuner::offsetChanged(int): Not implemented yet" );
}

void SpeedTuner::rangeChanged(int)
{
    tqWarning( "SpeedTuner::rangeChanged(int): Not implemented yet" );
}

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

TQMetaObject *SpeedTuner::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_SpeedTuner( "SpeedTuner", &SpeedTuner::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* SpeedTuner::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 TQUParameter param_slot_1[] = {
	{ 0, &static_QUType_int, 0, TQUParameter::In }
    };
    static const TQUMethod slot_1 = {"speedChanged", 1, param_slot_1 };
    static const TQUParameter param_slot_2[] = {
	{ 0, &static_QUType_int, 0, TQUParameter::In }
    };
    static const TQUMethod slot_2 = {"offsetChanged", 1, param_slot_2 };
    static const TQUParameter param_slot_3[] = {
	{ 0, &static_QUType_int, 0, TQUParameter::In }
    };
    static const TQUMethod slot_3 = {"rangeChanged", 1, param_slot_3 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected },
	{ "speedChanged(int)", &slot_1, TQMetaData::Protected },
	{ "offsetChanged(int)", &slot_2, TQMetaData::Protected },
	{ "rangeChanged(int)", &slot_3, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"SpeedTuner", parentObject,
	slot_tbl, 4,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_SpeedTuner.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool SpeedTuner::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: languageChange(); break;
    case 1: speedChanged((int)static_QUType_int.get(_o+1)); break;
    case 2: offsetChanged((int)static_QUType_int.get(_o+1)); break;
    case 3: rangeChanged((int)static_QUType_int.get(_o+1)); break;
    default:
	return TQDialog::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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