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

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

#include "kjguisettingswidget.h"

#include <ntqvariant.h>
#include <kcolorcombo.h>
#include <klineedit.h>
#include <knuminput.h>
#include <tdefontcombo.h>
#include <ntqpushbutton.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqlabel.h>
#include <ntqgroupbox.h>
#include <ntqcheckbox.h>
#include <ntqslider.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

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

    ButtonGroup1 = new TQButtonGroup( this, "ButtonGroup1" );
    ButtonGroup1->setColumnLayout(0, TQt::Vertical );
    ButtonGroup1->layout()->setSpacing( 6 );
    ButtonGroup1->layout()->setMargin( 11 );
    ButtonGroup1Layout = new TQVBoxLayout( ButtonGroup1->layout() );
    ButtonGroup1Layout->setAlignment( TQt::AlignTop );

    visScope = new TQRadioButton( ButtonGroup1, "visScope" );
    ButtonGroup1Layout->addWidget( visScope );

    visAnalyzer = new TQRadioButton( ButtonGroup1, "visAnalyzer" );
    ButtonGroup1Layout->addWidget( visAnalyzer );

    visNone = new TQRadioButton( ButtonGroup1, "visNone" );
    ButtonGroup1Layout->addWidget( visNone );

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

    TextLabel1_3 = new TQLabel( ButtonGroup1, "TextLabel1_3" );
    TextLabel1_3->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)5, 0, 0, TextLabel1_3->sizePolicy().hasHeightForWidth() ) );
    Layout5->addWidget( TextLabel1_3 );

    visTimerValue = new KIntNumInput( ButtonGroup1, "visTimerValue" );
    visTimerValue->setValue( 30 );
    visTimerValue->setMinValue( 20 );
    visTimerValue->setMaxValue( 1000 );
    Layout5->addWidget( visTimerValue );
    ButtonGroup1Layout->addLayout( Layout5 );
    Layout7->addWidget( ButtonGroup1 );

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

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

    TextLabel1_2 = new TQLabel( GroupBox1, "TextLabel1_2" );
    TextLabel1_2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)5, 0, 0, TextLabel1_2->sizePolicy().hasHeightForWidth() ) );
    Layout4->addWidget( TextLabel1_2 );

    minPitch = new KIntNumInput( GroupBox1, "minPitch" );
    minPitch->setValue( 50 );
    minPitch->setMinValue( 50 );
    minPitch->setMaxValue( 98 );
    Layout4->addWidget( minPitch );
    GroupBox1Layout->addLayout( Layout4 );

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

    TextLabel1_2_2 = new TQLabel( GroupBox1, "TextLabel1_2_2" );
    TextLabel1_2_2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)5, 0, 0, TextLabel1_2_2->sizePolicy().hasHeightForWidth() ) );
    Layout3->addWidget( TextLabel1_2_2 );

    maxPitch = new KIntNumInput( GroupBox1, "maxPitch" );
    maxPitch->setValue( 200 );
    maxPitch->setMinValue( 102 );
    maxPitch->setMaxValue( 200 );
    Layout3->addWidget( maxPitch );
    GroupBox1Layout->addLayout( Layout3 );
    Layout7->addWidget( GroupBox1 );

    KJGuiSettingsLayout->addMultiCellLayout( Layout7, 0, 0, 0, 1 );

    displayTooltips = new TQCheckBox( this, "displayTooltips" );

    KJGuiSettingsLayout->addMultiCellWidget( displayTooltips, 1, 1, 0, 1 );

    displaySplash = new TQCheckBox( this, "displaySplash" );

    KJGuiSettingsLayout->addMultiCellWidget( displaySplash, 2, 2, 0, 1 );
    Spacer1 = new TQSpacerItem( 20, 60, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    KJGuiSettingsLayout->addItem( Spacer1, 5, 0 );

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

    TextLabel1 = new TQLabel( this, "TextLabel1" );
    Layout2->addWidget( TextLabel1 );

    TextLabel2 = new TQLabel( this, "TextLabel2" );
    Layout2->addWidget( TextLabel2 );

    titleScrollSpeed = new TQSlider( this, "titleScrollSpeed" );
    titleScrollSpeed->setMinimumSize( TQSize( 80, 0 ) );
    titleScrollSpeed->setMinValue( 1 );
    titleScrollSpeed->setMaxValue( 3 );
    titleScrollSpeed->setPageStep( 1 );
    titleScrollSpeed->setValue( 2 );
    titleScrollSpeed->setOrientation( TQSlider::Horizontal );
    titleScrollSpeed->setTickmarks( TQSlider::NoMarks );
    titleScrollSpeed->setTickInterval( 1 );
    Layout2->addWidget( titleScrollSpeed );

    TextLabel3 = new TQLabel( this, "TextLabel3" );
    Layout2->addWidget( TextLabel3 );

    KJGuiSettingsLayout->addMultiCellLayout( Layout2, 4, 4, 0, 1 );

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

    cmbSysFontColor = new KColorCombo( groupBox2, "cmbSysFontColor" );
    cmbSysFontColor->setColor( TQColor( 255, 255, 255 ) );

    groupBox2Layout->addWidget( cmbSysFontColor, 2, 1 );

    txtFontColor = new TQLabel( groupBox2, "txtFontColor" );

    groupBox2Layout->addWidget( txtFontColor, 2, 0 );

    txtFont = new TQLabel( groupBox2, "txtFont" );

    groupBox2Layout->addWidget( txtFont, 1, 0 );

    cmbSysFont = new TDEFontCombo( groupBox2, "cmbSysFont" );
    cmbSysFont->setProperty( "urlDropsEnabled", TQVariant( false ) );
    cmbSysFont->setProperty( "editable", TQVariant( false ) );

    groupBox2Layout->addWidget( cmbSysFont, 1, 1 );

    useSysFont = new TQCheckBox( groupBox2, "useSysFont" );

    groupBox2Layout->addMultiCellWidget( useSysFont, 0, 0, 0, 1 );

    KJGuiSettingsLayout->addWidget( groupBox2, 3, 0 );
    spacer2 = new TQSpacerItem( 140, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    KJGuiSettingsLayout->addItem( spacer2, 3, 1 );
    languageChange();
    resize( TQSize(690, 454).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( visScope, visAnalyzer );
    setTabOrder( visAnalyzer, visNone );
    setTabOrder( visNone, visTimerValue );
    setTabOrder( visTimerValue, minPitch );
    setTabOrder( minPitch, maxPitch );
    setTabOrder( maxPitch, displayTooltips );
    setTabOrder( displayTooltips, displaySplash );
    setTabOrder( displaySplash, useSysFont );
    setTabOrder( useSysFont, cmbSysFont );
    setTabOrder( cmbSysFont, cmbSysFontColor );
    setTabOrder( cmbSysFontColor, titleScrollSpeed );

    // buddies
    TextLabel1_3->setBuddy( visTimerValue );
    TextLabel1_2->setBuddy( minPitch );
    TextLabel1_2_2->setBuddy( maxPitch );
    TextLabel1->setBuddy( titleScrollSpeed );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KJGuiSettings::languageChange()
{
    ButtonGroup1->setTitle( tr2i18n( "Visualization" ) );
    visScope->setText( tr2i18n( "Oscillo&scope" ) );
    visAnalyzer->setText( tr2i18n( "&Analyzer" ) );
    visNone->setText( tr2i18n( "&None" ) );
    TextLabel1_3->setText( tr2i18n( "U&pdate every:" ) );
    visTimerValue->setSuffix( tr2i18n( "ms" ) );
    GroupBox1->setTitle( tr2i18n( "Pitch" ) );
    TextLabel1_2->setText( tr2i18n( "&Lower limit:" ) );
    minPitch->setSuffix( tr2i18n( "%" ) );
    TextLabel1_2_2->setText( tr2i18n( "&Upper limit:" ) );
    maxPitch->setSuffix( tr2i18n( "%" ) );
    displayTooltips->setText( tr2i18n( "Display &tooltips" ) );
    displaySplash->setText( tr2i18n( "Display splash sc&reen" ) );
    TextLabel1->setText( tr2i18n( "T&itle display scrolling speed:" ) );
    TextLabel2->setText( tr2i18n( "Slow" ) );
    TextLabel3->setText( tr2i18n( "Fast" ) );
    groupBox2->setTitle( tr2i18n( "System Font" ) );
    txtFontColor->setText( tr2i18n( "Color:" ) );
    txtFont->setText( tr2i18n( "Font:" ) );
    useSysFont->setText( tr2i18n( "Use system font" ) );
}

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

TQMetaObject *KJGuiSettings::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KJGuiSettings( "KJGuiSettings", &KJGuiSettings::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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