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

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

#include "Options5.h"

#include <ntqvariant.h>
#include <tqapplication.h>
#include <tqdesktopwidget.h>
#include <ktextedit.h>
#include <kcombobox.h>
#include <knuminput.h>
#include <tdefontrequester.h>
#include <kcolorbutton.h>
#include <ntqpushbutton.h>
#include <ntqcheckbox.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "Options5.ui.h"

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

    kcfg_OsdEnabled = new TQCheckBox( this, "kcfg_OsdEnabled" );
    kcfg_OsdEnabled->setChecked( true );
    Options5Layout->addWidget( kcfg_OsdEnabled );

    layout2 = new TQHBoxLayout( 0, 0, 6, "layout2"); 
    spacer2 = new TQSpacerItem( 16, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout2->addItem( spacer2 );

    mainBox = new TQGroupBox( this, "mainBox" );
    mainBox->setFrameShape( TQGroupBox::NoFrame );
    mainBox->setColumnLayout(0, TQt::Vertical );
    mainBox->layout()->setSpacing( 6 );
    mainBox->layout()->setMargin( 0 );
    mainBoxLayout = new TQVBoxLayout( mainBox->layout() );
    mainBoxLayout->setAlignment( TQt::AlignTop );

    fontBox = new TQGroupBox( mainBox, "fontBox" );
    fontBox->setFrameShape( TQGroupBox::GroupBoxPanel );
    fontBox->setFrameShadow( TQGroupBox::Sunken );
    fontBox->setLineWidth( 1 );
    fontBox->setFlat( false );
    fontBox->setColumnLayout(0, TQt::Vertical );
    fontBox->layout()->setSpacing( 6 );
    fontBox->layout()->setMargin( 11 );
    fontBoxLayout = new TQVBoxLayout( fontBox->layout() );
    fontBoxLayout->setAlignment( TQt::AlignTop );

    kcfg_OsdFont = new TDEFontRequester( fontBox, "kcfg_OsdFont" );
    TQFont kcfg_OsdFont_font(  kcfg_OsdFont->font() );
    kcfg_OsdFont->setFont( kcfg_OsdFont_font ); 
    fontBoxLayout->addWidget( kcfg_OsdFont );

    kcfg_OsdDrawShadow = new TQCheckBox( fontBox, "kcfg_OsdDrawShadow" );
    fontBoxLayout->addWidget( kcfg_OsdDrawShadow );
    mainBoxLayout->addWidget( fontBox );

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

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

    kcfg_OsdUseCustomColors = new TQCheckBox( groupBox9, "kcfg_OsdUseCustomColors" );
    layout3->addWidget( kcfg_OsdUseCustomColors );

    layout1 = new TQHBoxLayout( 0, 0, 6, "layout1"); 
    spacer1 = new TQSpacerItem( 16, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout1->addItem( spacer1 );

    colorsBox = new TQGroupBox( groupBox9, "colorsBox" );
    colorsBox->setEnabled( false );
    colorsBox->setFrameShape( TQGroupBox::NoFrame );
    colorsBox->setFlat( false );
    colorsBox->setColumnLayout(0, TQt::Vertical );
    colorsBox->layout()->setSpacing( 6 );
    colorsBox->layout()->setMargin( 0 );
    colorsBoxLayout = new TQGridLayout( colorsBox->layout() );
    colorsBoxLayout->setAlignment( TQt::AlignTop );

    textLabel2_2 = new TQLabel( colorsBox, "textLabel2_2" );
    textLabel2_2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 1, 0, textLabel2_2->sizePolicy().hasHeightForWidth() ) );
    textLabel2_2->setFrameShape( TQLabel::NoFrame );

    colorsBoxLayout->addWidget( textLabel2_2, 1, 0 );

    kcfg_OsdTextColor = new KColorButton( colorsBox, "kcfg_OsdTextColor" );
    kcfg_OsdTextColor->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 2, 0, kcfg_OsdTextColor->sizePolicy().hasHeightForWidth() ) );
    kcfg_OsdTextColor->setColor( TQColor( 255, 0, 0 ) );

    colorsBoxLayout->addWidget( kcfg_OsdTextColor, 0, 1 );

    kcfg_OsdBackgroundColor = new KColorButton( colorsBox, "kcfg_OsdBackgroundColor" );
    kcfg_OsdBackgroundColor->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 2, 0, kcfg_OsdBackgroundColor->sizePolicy().hasHeightForWidth() ) );
    kcfg_OsdBackgroundColor->setColor( TQColor( 255, 0, 0 ) );

    colorsBoxLayout->addWidget( kcfg_OsdBackgroundColor, 1, 1 );

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

    colorsBoxLayout->addWidget( textLabel2, 0, 0 );
    layout1->addWidget( colorsBox );
    layout3->addLayout( layout1 );
    groupBox9Layout->addLayout( layout3 );

    kcfg_OsdUseFakeTranslucency = new TQCheckBox( groupBox9, "kcfg_OsdUseFakeTranslucency" );
    groupBox9Layout->addWidget( kcfg_OsdUseFakeTranslucency );
    mainBoxLayout->addWidget( groupBox9 );

    osdText = new TQGroupBox( mainBox, "osdText" );
    osdText->setFrameShape( TQGroupBox::GroupBoxPanel );
    osdText->setFlat( false );
    osdText->setColumnLayout(0, TQt::Vertical );
    osdText->layout()->setSpacing( 6 );
    osdText->layout()->setMargin( 11 );
    osdTextLayout = new TQVBoxLayout( osdText->layout() );
    osdTextLayout->setAlignment( TQt::AlignTop );

    kcfg_OsdUsePlaylistColumns = new TQCheckBox( osdText, "kcfg_OsdUsePlaylistColumns" );
    osdTextLayout->addWidget( kcfg_OsdUsePlaylistColumns );

    kcfg_OsdText = new KTextEdit( osdText, "kcfg_OsdText" );
    kcfg_OsdText->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, kcfg_OsdText->sizePolicy().hasHeightForWidth() ) );
    kcfg_OsdText->setLineWidth( 2 );
    kcfg_OsdText->setTextFormat( KTextEdit::PlainText );
    kcfg_OsdText->setTabChangesFocus( true );
    osdTextLayout->addWidget( kcfg_OsdText );
    mainBoxLayout->addWidget( osdText );

    groupBox22 = new TQGroupBox( mainBox, "groupBox22" );
    groupBox22->setColumnLayout(0, TQt::Vertical );
    groupBox22->layout()->setSpacing( 6 );
    groupBox22->layout()->setMargin( 11 );
    groupBox22Layout = new TQGridLayout( groupBox22->layout() );
    groupBox22Layout->setAlignment( TQt::AlignTop );

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

    groupBox22Layout->addWidget( textLabel1, 0, 0 );

    kcfg_OsdDuration = new KIntSpinBox( groupBox22, "kcfg_OsdDuration" );
    kcfg_OsdDuration->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 2, 0, kcfg_OsdDuration->sizePolicy().hasHeightForWidth() ) );
    kcfg_OsdDuration->setButtonSymbols( KIntSpinBox::UpDownArrows );
    kcfg_OsdDuration->setMaxValue( 600000 );
    kcfg_OsdDuration->setMinValue( 0 );
    kcfg_OsdDuration->setLineStep( 1000 );
    kcfg_OsdDuration->setValue( 5000 );

    groupBox22Layout->addWidget( kcfg_OsdDuration, 0, 1 );

    kcfg_OsdScreen = new KComboBox( false, groupBox22, "kcfg_OsdScreen" );
    kcfg_OsdScreen->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 2, 0, kcfg_OsdScreen->sizePolicy().hasHeightForWidth() ) );

    groupBox22Layout->addWidget( kcfg_OsdScreen, 0, 3 );

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

    groupBox22Layout->addWidget( textLabel2_3, 0, 2 );
    mainBoxLayout->addWidget( groupBox22 );
    layout2->addWidget( mainBox );
    Options5Layout->addLayout( layout2 );
    languageChange();
    resize( TQSize(481, 472).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( kcfg_OsdUseCustomColors, TQ_SIGNAL( toggled(bool) ), colorsBox, TQ_SLOT( setEnabled(bool) ) );
    connect( kcfg_OsdEnabled, TQ_SIGNAL( toggled(bool) ), mainBox, TQ_SLOT( setEnabled(bool) ) );
    connect( kcfg_OsdUseCustomColors, TQ_SIGNAL( toggled(bool) ), this, TQ_SLOT( useCustomColorsToggled(bool) ) );
    connect( kcfg_OsdUsePlaylistColumns, TQ_SIGNAL( toggled(bool) ), kcfg_OsdText, TQ_SLOT( setDisabled(bool) ) );

    // buddies
    textLabel1->setBuddy( kcfg_OsdDuration );
    textLabel2_3->setBuddy( kcfg_OsdScreen );
    init();
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void Options5::languageChange()
{
    kcfg_OsdEnabled->setText( tr2i18n( "&Use On-Screen-Display" ) );
    TQToolTip::add( kcfg_OsdEnabled, tr2i18n( "Check to enable the On-Screen-Display. <br>The OSD briefly displays track data when a new track is played." ) );
    TQWhatsThis::add( kcfg_OsdEnabled, tr2i18n( "Check to enable the On-Screen-Display. The OSD briefly displays track data when a new track is played." ) );
    mainBox->setTitle( TQString::null );
    fontBox->setTitle( tr2i18n( "&Font" ) );
    kcfg_OsdFont->setSampleText( TQString::null );
    TQToolTip::add( kcfg_OsdFont, tr2i18n( "The font to use for the On-Screen Display." ) );
    TQWhatsThis::add( kcfg_OsdFont, tr2i18n( "The font to use for the On-Screen Display." ) );
    kcfg_OsdDrawShadow->setText( tr2i18n( "Draw &shadow" ) );
    groupBox9->setTitle( tr2i18n( "C&olors" ) );
    kcfg_OsdUseCustomColors->setText( tr2i18n( "Use &custom colors" ) );
    TQToolTip::add( kcfg_OsdUseCustomColors, tr2i18n( "Check to enable custom colors for the On-Screen-Display." ) );
    TQWhatsThis::add( kcfg_OsdUseCustomColors, tr2i18n( "Check to enable custom colors for the On-Screen-Display." ) );
    colorsBox->setTitle( TQString::null );
    textLabel2_2->setText( tr2i18n( "Background color:" ) );
    TQWhatsThis::add( textLabel2_2, tr2i18n( "The color of the OSD background." ) );
    kcfg_OsdTextColor->setText( TQString::null );
    TQToolTip::add( kcfg_OsdTextColor, tr2i18n( "Click to select the color of the OSD text." ) );
    TQWhatsThis::add( kcfg_OsdTextColor, tr2i18n( "The color of the OSD text." ) );
    kcfg_OsdBackgroundColor->setText( TQString::null );
    TQToolTip::add( kcfg_OsdBackgroundColor, tr2i18n( "Click to select the background color of the OSD." ) );
    TQWhatsThis::add( kcfg_OsdBackgroundColor, tr2i18n( "The color of the OSD background." ) );
    textLabel2->setText( tr2i18n( "Text color:" ) );
    TQWhatsThis::add( textLabel2, tr2i18n( "The color of the OSD text." ) );
    kcfg_OsdUseFakeTranslucency->setText( tr2i18n( "Make the &background translucent" ) );
    osdText->setTitle( tr2i18n( "Display &Text" ) );
    kcfg_OsdUsePlaylistColumns->setText( tr2i18n( "Display the same information as the columns in the playlist" ) );
    groupBox22->setTitle( TQString::null );
    textLabel1->setText( tr2i18n( "&Duration:" ) );
    kcfg_OsdDuration->setSuffix( tr2i18n( " ms" ) );
    kcfg_OsdDuration->setSpecialValueText( tr2i18n( "Forever" ) );
    TQToolTip::add( kcfg_OsdDuration, tr2i18n( "The time in milliseconds to show the OSD. The value must be between 500 ms and 10000 ms." ) );
    TQWhatsThis::add( kcfg_OsdDuration, tr2i18n( "The time in milliseconds to show the OSD. The value must be between 500 ms and 10000 ms." ) );
    TQToolTip::add( kcfg_OsdScreen, tr2i18n( "The screen that should display the OSD." ) );
    TQWhatsThis::add( kcfg_OsdScreen, tr2i18n( "The screen that should display the OSD." ) );
    textLabel2_3->setText( tr2i18n( "Sc&reen:" ) );
}

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

TQMetaObject *Options5::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_Options5( "Options5", &Options5::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* Options5::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 TQUMethod slot_1 = {"slotPositionChanged", 0, 0 };
    static const TQUParameter param_slot_2[] = {
	{ "on", &static_QUType_bool, 0, TQUParameter::In }
    };
    static const TQUMethod slot_2 = {"useCustomColorsToggled", 1, param_slot_2 };
    static const TQUParameter param_slot_3[] = {
	{ "on", &static_QUType_bool, 0, TQUParameter::In }
    };
    static const TQUMethod slot_3 = {"useFakeTransparencyToggled", 1, param_slot_3 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected },
	{ "slotPositionChanged()", &slot_1, TQMetaData::Protected },
	{ "useCustomColorsToggled(bool)", &slot_2, TQMetaData::Protected },
	{ "useFakeTransparencyToggled(bool)", &slot_3, TQMetaData::Protected }
    };
    static const TQUMethod signal_0 = {"settingsChanged", 0, 0 };
    static const TQMetaData signal_tbl[] = {
	{ "settingsChanged()", &signal_0, TQMetaData::Public }
    };
    metaObj = TQMetaObject::new_metaobject(
	"Options5", parentObject,
	slot_tbl, 4,
	signal_tbl, 1,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_Options5.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

// TQ_SIGNAL settingsChanged
void Options5::settingsChanged()
{
    activate_signal( staticMetaObject()->signalOffset() + 0 );
}

bool Options5::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: languageChange(); break;
    case 1: slotPositionChanged(); break;
    case 2: useCustomColorsToggled((bool)static_QUType_bool.get(_o+1)); break;
    case 3: useFakeTransparencyToggled((bool)static_QUType_bool.get(_o+1)); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

bool Options5::tqt_emit( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->signalOffset() ) {
    case 0: settingsChanged(); break;
    default:
	return TQWidget::tqt_emit(_id,_o);
    }
    return true;
}
#ifndef TQT_NO_PROPERTIES

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

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