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

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

#include "equalizerwidget.h"

#include <ntqvariant.h>
#include <knuminput.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqslider.h>
#include <ntqgroupbox.h>
#include <ntqframe.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a EqualizerWidget as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
EqualizerWidget::EqualizerWidget( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "EqualizerWidget" );
    EqualizerWidgetLayout = new TQGridLayout( this, 1, 1, 0, 6, "EqualizerWidgetLayout"); 

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

    textLabel1_2 = new TQLabel( this, "textLabel1_2" );
    textLabel1_2->setAlignment( int( TQLabel::AlignCenter ) );

    layout5->addMultiCellWidget( textLabel1_2, 0, 0, 0, 2 );
    spacer3 = new TQSpacerItem( 1, 8, TQSizePolicy::Minimum, TQSizePolicy::Minimum );
    layout5->addItem( spacer3, 1, 2 );
    spacer4_2 = new TQSpacerItem( 1, 8, TQSizePolicy::Minimum, TQSizePolicy::Minimum );
    layout5->addItem( spacer4_2, 1, 0 );

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

    preampSlider = new TQSlider( this, "preampSlider" );
    preampSlider->setMinValue( -200 );
    preampSlider->setMaxValue( 200 );
    preampSlider->setLineStep( 0 );
    preampSlider->setPageStep( 25 );
    preampSlider->setValue( 0 );
    preampSlider->setOrientation( TQSlider::Vertical );
    preampSlider->setTickmarks( TQSlider::Both );
    preampSlider->setTickInterval( 25 );
    layout3->addWidget( preampSlider );

    textLabel1 = new TQLabel( this, "textLabel1" );
    textLabel1->setAlignment( int( TQLabel::AlignCenter ) );
    layout3->addWidget( textLabel1 );

    layout5->addLayout( layout3, 1, 1 );

    EqualizerWidgetLayout->addLayout( layout5, 1, 0 );

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

    bandsFrame = new TQFrame( bandsGroupBox, "bandsFrame" );
    bandsFrame->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)3, 0, 0, bandsFrame->sizePolicy().hasHeightForWidth() ) );
    bandsFrame->setFrameShape( TQFrame::NoFrame );
    bandsFrame->setFrameShadow( TQFrame::Plain );
    bandsFrame->setLineWidth( 0 );
    bandsGroupBoxLayout->addWidget( bandsFrame );

    EqualizerWidgetLayout->addWidget( bandsGroupBox, 1, 1 );

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

    presetFrame = new TQFrame( presetsGroupBox, "presetFrame" );
    presetFrame->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)3, 0, 0, presetFrame->sizePolicy().hasHeightForWidth() ) );
    presetFrame->setFrameShape( TQFrame::NoFrame );
    presetFrame->setFrameShadow( TQFrame::Plain );
    presetFrame->setLineWidth( 0 );
    presetFrame->setMargin( 0 );

    presetsGroupBoxLayout->addMultiCellWidget( presetFrame, 0, 0, 0, 1 );

    removePresetButton = new TQPushButton( presetsGroupBox, "removePresetButton" );

    presetsGroupBoxLayout->addWidget( removePresetButton, 1, 0 );

    addPresetButton = new TQPushButton( presetsGroupBox, "addPresetButton" );

    presetsGroupBoxLayout->addWidget( addPresetButton, 2, 0 );
    spacer5 = new TQSpacerItem( 8, 16, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    presetsGroupBoxLayout->addItem( spacer5, 2, 1 );

    EqualizerWidgetLayout->addWidget( presetsGroupBox, 1, 2 );

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

    enabledCheckBox = new TQCheckBox( this, "enabledCheckBox" );
    layout4->addWidget( enabledCheckBox );
    spacer6 = new TQSpacerItem( 8, 16, TQSizePolicy::Minimum, TQSizePolicy::Minimum );
    layout4->addItem( spacer6 );

    textLabel1_3 = new TQLabel( this, "textLabel1_3" );
    layout4->addWidget( textLabel1_3 );

    bandCount = new KIntSpinBox( this, "bandCount" );
    bandCount->setMaxValue( 16 );
    bandCount->setValue( 6 );
    layout4->addWidget( bandCount );
    spacer4 = new TQSpacerItem( 8, 16, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout4->addItem( spacer4 );

    resetEqButton = new TQPushButton( this, "resetEqButton" );
    layout4->addWidget( resetEqButton );

    EqualizerWidgetLayout->addMultiCellLayout( layout4, 0, 0, 0, 2 );
    languageChange();
    resize( TQSize(518, 283).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( enabledCheckBox, bandCount );
    setTabOrder( bandCount, resetEqButton );
    setTabOrder( resetEqButton, preampSlider );
    setTabOrder( preampSlider, removePresetButton );
    setTabOrder( removePresetButton, addPresetButton );

    // buddies
    textLabel1_2->setBuddy( preampSlider );
    textLabel1_3->setBuddy( bandCount );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void EqualizerWidget::languageChange()
{
    setCaption( tr2i18n( "Equalizer" ) );
    textLabel1_2->setText( tr2i18n( "Pre&amp:" ) );
    textLabel1->setText( tr2i18n( "+/-" ) );
    bandsGroupBox->setTitle( tr2i18n( "&Bands" ) );
    presetsGroupBox->setTitle( tr2i18n( "&Presets" ) );
    removePresetButton->setText( tr2i18n( "&Remove" ) );
    addPresetButton->setText( tr2i18n( "A&dd" ) );
    enabledCheckBox->setText( tr2i18n( "&Enabled" ) );
    textLabel1_3->setText( tr2i18n( "&Number of bands:" ) );
    resetEqButton->setText( tr2i18n( "Re&set EQ" ) );
}

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

TQMetaObject *EqualizerWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_EqualizerWidget( "EqualizerWidget", &EqualizerWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* EqualizerWidget::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 = TQWidget::staticMetaObject();
    static const TQUMethod slot_0 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"EqualizerWidget", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_EqualizerWidget.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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