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

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

#include "generaltab.h"

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

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

    startServer = new TQCheckBox( this, "startServer" );
    TQFont startServer_font(  startServer->font() );
    startServer_font.setBold( true );
    startServer->setFont( startServer_font ); 
    startServer->setChecked( true );
    generalTabLayout->addWidget( startServer );

    frame3 = new TQFrame( this, "frame3" );
    frame3->setFrameShape( TQFrame::HLine );
    frame3->setFrameShadow( TQFrame::Sunken );
    generalTabLayout->addWidget( frame3 );

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

    textLabel1_2 = new KRichTextLabel( networkedSoundGroupBox, "textLabel1_2" );
    networkedSoundGroupBoxLayout->addWidget( textLabel1_2 );

    networkTransparent = new TQCheckBox( networkedSoundGroupBox, "networkTransparent" );
    networkedSoundGroupBoxLayout->addWidget( networkTransparent );
    generalTabLayout->addWidget( networkedSoundGroupBox );

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

    textLabel1 = new KRichTextLabel( realtimeGroupBox, "textLabel1" );

    realtimeGroupBoxLayout->addMultiCellWidget( textLabel1, 0, 0, 0, 1 );

    startRealtime = new TQCheckBox( realtimeGroupBox, "startRealtime" );
    startRealtime->setChecked( true );

    realtimeGroupBoxLayout->addMultiCellWidget( startRealtime, 1, 1, 0, 1 );

    latencySlider = new TQSlider( realtimeGroupBox, "latencySlider" );
    latencySlider->setMinValue( 10 );
    latencySlider->setMaxValue( 500 );
    latencySlider->setValue( 150 );
    latencySlider->setOrientation( TQSlider::Horizontal );
    latencySlider->setTickmarks( TQSlider::NoMarks );
    latencySlider->setTickInterval( 50 );

    realtimeGroupBoxLayout->addWidget( latencySlider, 2, 1 );

    textLabel5 = new TQLabel( realtimeGroupBox, "textLabel5" );

    realtimeGroupBoxLayout->addWidget( textLabel5, 2, 0 );

    latencyLabel = new TQLabel( realtimeGroupBox, "latencyLabel" );

    realtimeGroupBoxLayout->addWidget( latencyLabel, 3, 1 );
    generalTabLayout->addWidget( realtimeGroupBox );

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

    textLabel5_2 = new KRichTextLabel( autoSuspendGroupBox, "textLabel5_2" );
    autoSuspendGroupBoxLayout->addWidget( textLabel5_2 );

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

    autoSuspend = new TQCheckBox( autoSuspendGroupBox, "autoSuspend" );
    autoSuspend->setEnabled( true );
    autoSuspend->setChecked( true );
    layout7->addWidget( autoSuspend );

    suspendTime = new KIntNumInput( autoSuspendGroupBox, "suspendTime" );
    layout7->addWidget( suspendTime );
    spacer17_2 = new TQSpacerItem( 173, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout7->addItem( spacer17_2 );
    autoSuspendGroupBoxLayout->addLayout( layout7 );
    generalTabLayout->addWidget( autoSuspendGroupBox );

    layout3 = new TQHBoxLayout( 0, 0, 6, "layout3"); 
    spacer3_2_2 = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout3->addItem( spacer3_2_2 );

    testSound = new TQPushButton( this, "testSound" );
    testSound->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)1, 0, 0, testSound->sizePolicy().hasHeightForWidth() ) );
    layout3->addWidget( testSound );
    spacer3 = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout3->addItem( spacer3 );
    generalTabLayout->addLayout( layout3 );
    spacer5 = new TQSpacerItem( 20, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    generalTabLayout->addItem( spacer5 );
    languageChange();
    resize( TQSize(637, 613).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // buddies
    textLabel5->setBuddy( latencySlider );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void generalTab::languageChange()
{
    startServer->setText( tr2i18n( "&Enable the sound system" ) );
    TQWhatsThis::add( startServer, tr2i18n( "If this option is enabled, the sound system will be loaded on TDE startup.\n"
"Recommended if you want sound." ) );
    networkedSoundGroupBox->setTitle( tr2i18n( "Networked Sound" ) );
    textLabel1_2->setText( tr2i18n( "<i>Enable this option if you want to play sound on a remote computer or you want to be able to control sound on this system from another computer.</i>" ) );
    networkTransparent->setText( tr2i18n( "Enable &networked sound" ) );
    TQWhatsThis::add( networkTransparent, tr2i18n( "This option allows sound requests coming in from over the network to be accepted, instead of just limiting the server to the local computer." ) );
    realtimeGroupBox->setTitle( tr2i18n( "Skip Prevention" ) );
    textLabel1->setText( tr2i18n( "<i>If your sound is skipping during playback, enable running with highest possible priority. Increasing your sound buffer might also help.</i>" ) );
    startRealtime->setText( tr2i18n( "&Run with the highest possible priority (realtime priority)" ) );
    TQWhatsThis::add( startRealtime, tr2i18n( "On systems which support realtime scheduling, if you have sufficient permissions, this option will enable a very high priority for processing sound requests." ) );
    textLabel5->setText( tr2i18n( "Sound &buffer:" ) );
    latencyLabel->setText( tr2i18n( "<p align=\"right\"><b>Huge</b> buffer, for <b>low-end</b> machines, <b>less skipping</b></p>" ) );
    autoSuspendGroupBox->setTitle( tr2i18n( "Auto-Suspend" ) );
    textLabel5_2->setText( tr2i18n( "<i>The TDE sound system takes exclusive control over your audio hardware, blocking programs that may wish to use it directly. If the TDE sound system sits idle it can give up this exclusive control.</i>" ) );
    autoSuspend->setText( tr2i18n( "&Auto-suspend if idle after:" ) );
    TQWhatsThis::add( autoSuspend, tr2i18n( "The sound server will suspend itself if idle for this period of time." ) );
    suspendTime->setSuffix( tr2i18n( " seconds" ) );
    testSound->setText( tr2i18n( "Test &Sound" ) );
}

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

TQMetaObject *generalTab::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_generalTab( "generalTab", &generalTab::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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