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

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

#include "mediacontrolconfigwidget.h"

#include <ntqvariant.h>
#include <knuminput.h>
#include <ntqpushbutton.h>
#include <ntqtabwidget.h>
#include <ntqgroupbox.h>
#include <tdelistbox.h>
#include <ntqlabel.h>
#include <ntqcheckbox.h>
#include <ntqtoolbutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    tabWidget = new TQTabWidget( this, "tabWidget" );

    tabGeneral = new TQWidget( tabWidget, "tabGeneral" );
    tabGeneralLayout = new TQGridLayout( tabGeneral, 1, 1, 11, 6, "tabGeneralLayout"); 

    gbMediaPlayer = new TQGroupBox( tabGeneral, "gbMediaPlayer" );
    gbMediaPlayer->setColumnLayout(0, TQt::Vertical );
    gbMediaPlayer->layout()->setSpacing( 6 );
    gbMediaPlayer->layout()->setMargin( 11 );
    gbMediaPlayerLayout = new TQGridLayout( gbMediaPlayer->layout() );
    gbMediaPlayerLayout->setAlignment( TQt::AlignTop );

    playerListBox = new TDEListBox( gbMediaPlayer, "playerListBox" );

    gbMediaPlayerLayout->addWidget( playerListBox, 0, 0 );

    tabGeneralLayout->addWidget( gbMediaPlayer, 0, 0 );

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

    lmousewheelscrollingamount = new TQLabel( tabGeneral, "lmousewheelscrollingamount" );
    Layout5->addWidget( lmousewheelscrollingamount );

    mWheelScrollAmount = new KIntSpinBox( tabGeneral, "mWheelScrollAmount" );
    Layout5->addWidget( mWheelScrollAmount );

    tabGeneralLayout->addLayout( Layout5, 1, 0 );
    tabWidget->insertTab( tabGeneral, TQString::fromLatin1("") );

    themes = new TQWidget( tabWidget, "themes" );
    themesLayout = new TQVBoxLayout( themes, 11, 6, "themesLayout"); 

    mUseThemes = new TQCheckBox( themes, "mUseThemes" );
    themesLayout->addWidget( mUseThemes );

    themeListBox = new TDEListBox( themes, "themeListBox" );
    themeListBox->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, themeListBox->sizePolicy().hasHeightForWidth() ) );
    themesLayout->addWidget( themeListBox );

    Layout4 = new TQHBoxLayout( 0, 0, 6, "Layout4"); 
    Spacer1 = new TQSpacerItem( 20, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    Layout4->addItem( Spacer1 );

    previewGroupBox = new TQGroupBox( themes, "previewGroupBox" );
    previewGroupBox->setColumnLayout(0, TQt::Vertical );
    previewGroupBox->layout()->setSpacing( 2 );
    previewGroupBox->layout()->setMargin( 8 );
    previewGroupBoxLayout = new TQGridLayout( previewGroupBox->layout() );
    previewGroupBoxLayout->setAlignment( TQt::AlignTop );

    previewPrev = new TQToolButton( previewGroupBox, "previewPrev" );
    previewPrev->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, previewPrev->sizePolicy().hasHeightForWidth() ) );
    previewPrev->setMinimumSize( TQSize( 18, 18 ) );
    previewPrev->setMaximumSize( TQSize( 18, 18 ) );

    previewGroupBoxLayout->addWidget( previewPrev, 0, 0 );

    previewPlay = new TQToolButton( previewGroupBox, "previewPlay" );
    previewPlay->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, previewPlay->sizePolicy().hasHeightForWidth() ) );
    previewPlay->setMinimumSize( TQSize( 18, 18 ) );
    previewPlay->setMaximumSize( TQSize( 18, 18 ) );

    previewGroupBoxLayout->addWidget( previewPlay, 0, 1 );

    previewPause = new TQToolButton( previewGroupBox, "previewPause" );
    previewPause->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, previewPause->sizePolicy().hasHeightForWidth() ) );
    previewPause->setMinimumSize( TQSize( 18, 18 ) );
    previewPause->setMaximumSize( TQSize( 18, 18 ) );

    previewGroupBoxLayout->addWidget( previewPause, 0, 2 );

    previewStop = new TQToolButton( previewGroupBox, "previewStop" );
    previewStop->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, previewStop->sizePolicy().hasHeightForWidth() ) );
    previewStop->setMinimumSize( TQSize( 18, 18 ) );
    previewStop->setMaximumSize( TQSize( 18, 18 ) );

    previewGroupBoxLayout->addWidget( previewStop, 0, 3 );

    previewNext = new TQToolButton( previewGroupBox, "previewNext" );
    previewNext->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, previewNext->sizePolicy().hasHeightForWidth() ) );
    previewNext->setMinimumSize( TQSize( 18, 18 ) );
    previewNext->setMaximumSize( TQSize( 18, 18 ) );

    previewGroupBoxLayout->addWidget( previewNext, 0, 4 );
    Layout4->addWidget( previewGroupBox );
    Spacer1_2 = new TQSpacerItem( 20, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    Layout4->addItem( Spacer1_2 );
    themesLayout->addLayout( Layout4 );
    tabWidget->insertTab( themes, TQString::fromLatin1("") );
    MediaControlConfigWidgetLayout->addWidget( tabWidget );
    languageChange();
    resize( TQSize(318, 245).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // buddies
    lmousewheelscrollingamount->setBuddy( mWheelScrollAmount );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void MediaControlConfigWidget::languageChange()
{
    TQToolTip::add( this, TQString::null );
    TQWhatsThis::add( this, TQString::null );
    gbMediaPlayer->setTitle( tr2i18n( "Media-Player" ) );
    TQWhatsThis::add( playerListBox, tr2i18n( "Select the multimedia player you are using from this list." ) );
    lmousewheelscrollingamount->setText( tr2i18n( "&Wheel scroll seconds:" ) );
    TQWhatsThis::add( mWheelScrollAmount, tr2i18n( "Sets the number of lines a mousewheel will scroll in the current file." ) );
    tabWidget->changeTab( tabGeneral, tr2i18n( "&General" ) );
    mUseThemes->setText( tr2i18n( "&Use themes" ) );
    themeListBox->clear();
    themeListBox->insertItem( tr2i18n( "default" ) );
    previewGroupBox->setTitle( tr2i18n( "Preview" ) );
    TQWhatsThis::add( previewGroupBox, tr2i18n( "Shows you how the selected theme will look" ) );
    previewPrev->setText( tr2i18n( "<" ) );
    previewPlay->setText( tr2i18n( ">" ) );
    previewPause->setText( tr2i18n( "o" ) );
    previewStop->setText( tr2i18n( "O" ) );
    previewNext->setText( tr2i18n( ">" ) );
    tabWidget->changeTab( themes, tr2i18n( "&Themes" ) );
}

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

TQMetaObject *MediaControlConfigWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_MediaControlConfigWidget( "MediaControlConfigWidget", &MediaControlConfigWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* MediaControlConfigWidget::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 }
    };
    static const TQUParameter param_signal_0[] = {
	{ 0, &static_QUType_bool, 0, TQUParameter::In }
    };
    static const TQUMethod signal_0 = {"toggled", 1, param_signal_0 };
    static const TQMetaData signal_tbl[] = {
	{ "toggled(bool)", &signal_0, TQMetaData::Public }
    };
    metaObj = TQMetaObject::new_metaobject(
	"MediaControlConfigWidget", parentObject,
	slot_tbl, 1,
	signal_tbl, 1,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_MediaControlConfigWidget.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

// TQ_SIGNAL toggled
void MediaControlConfigWidget::toggled( bool t0 )
{
    activate_signal_bool( staticMetaObject()->signalOffset() + 0, t0 );
}

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

bool MediaControlConfigWidget::tqt_emit( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->signalOffset() ) {
    case 0: toggled((bool)static_QUType_bool.get(_o+1)); break;
    default:
	return TQWidget::tqt_emit(_id,_o);
    }
    return true;
}
#ifndef TQT_NO_PROPERTIES

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

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