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

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

#include "bcgdialogbase.h"

#include <ntqvariant.h>
#include <ntqlabel.h>
#include <ntqslider.h>
#include <ntqspinbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

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

    BCGDialogBaseLayout->addWidget( textLabel2, 1, 0 );

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

    BCGDialogBaseLayout->addWidget( textLabel2_2, 2, 0 );

    mBSlider = new TQSlider( this, "mBSlider" );
    mBSlider->setMinValue( -100 );
    mBSlider->setMaxValue( 100 );
    mBSlider->setOrientation( TQSlider::Horizontal );

    BCGDialogBaseLayout->addWidget( mBSlider, 0, 1 );

    mCSlider = new TQSlider( this, "mCSlider" );
    mCSlider->setMinValue( -100 );
    mCSlider->setMaxValue( 100 );
    mCSlider->setOrientation( TQSlider::Horizontal );

    BCGDialogBaseLayout->addWidget( mCSlider, 1, 1 );

    mGSlider = new TQSlider( this, "mGSlider" );
    mGSlider->setMinValue( -100 );
    mGSlider->setMaxValue( 100 );
    mGSlider->setOrientation( TQSlider::Horizontal );

    BCGDialogBaseLayout->addWidget( mGSlider, 2, 1 );

    mBSpinBox = new TQSpinBox( this, "mBSpinBox" );
    mBSpinBox->setMaxValue( 100 );
    mBSpinBox->setMinValue( -100 );

    BCGDialogBaseLayout->addWidget( mBSpinBox, 0, 2 );

    mCSpinBox = new TQSpinBox( this, "mCSpinBox" );
    mCSpinBox->setMaxValue( 100 );
    mCSpinBox->setMinValue( -100 );

    BCGDialogBaseLayout->addWidget( mCSpinBox, 1, 2 );

    mGSpinBox = new TQSpinBox( this, "mGSpinBox" );
    mGSpinBox->setMaxValue( 100 );
    mGSpinBox->setMinValue( -100 );

    BCGDialogBaseLayout->addWidget( mGSpinBox, 2, 2 );

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

    BCGDialogBaseLayout->addWidget( textLabel1, 0, 0 );
    languageChange();
    resize( TQSize(377, 140).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( mBSlider, TQ_SIGNAL( valueChanged(int) ), mBSpinBox, TQ_SLOT( setValue(int) ) );
    connect( mCSlider, TQ_SIGNAL( valueChanged(int) ), mCSpinBox, TQ_SLOT( setValue(int) ) );
    connect( mGSlider, TQ_SIGNAL( valueChanged(int) ), mGSpinBox, TQ_SLOT( setValue(int) ) );
    connect( mBSpinBox, TQ_SIGNAL( valueChanged(int) ), mBSlider, TQ_SLOT( setValue(int) ) );
    connect( mCSpinBox, TQ_SIGNAL( valueChanged(int) ), mCSlider, TQ_SLOT( setValue(int) ) );
    connect( mGSpinBox, TQ_SIGNAL( valueChanged(int) ), mGSlider, TQ_SLOT( setValue(int) ) );

    // tab order
    setTabOrder( mBSlider, mBSpinBox );
    setTabOrder( mBSpinBox, mCSlider );
    setTabOrder( mCSlider, mCSpinBox );
    setTabOrder( mCSpinBox, mGSlider );
    setTabOrder( mGSlider, mGSpinBox );

    // buddies
    textLabel2->setBuddy( mCSlider );
    textLabel2_2->setBuddy( mGSlider );
    textLabel1->setBuddy( mBSlider );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void BCGDialogBase::languageChange()
{
    textLabel2->setText( tr2i18n( "&Contrast:" ) );
    textLabel2_2->setText( tr2i18n( "&Gamma:" ) );
    textLabel1->setText( tr2i18n( "&Brightness:" ) );
}

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

TQMetaObject *BCGDialogBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_BCGDialogBase( "BCGDialogBase", &BCGDialogBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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