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

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

#include "settingspageprecision.h"

#include <ntqvariant.h>
#include <knuminput.h>
#include <kcolorbutton.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a SettingsPagePrecision as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The qdialog will by default be modeless, unless you set 'modal' to
 *  true to construct a modal qdialog.
 */
SettingsPagePrecision::SettingsPagePrecision( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "SettingsPagePrecision" );
    SettingsPagePrecisionLayout = new TQGridLayout( this, 1, 1, 11, 6, "SettingsPagePrecisionLayout"); 
    spacer1 = new TQSpacerItem( 20, 29, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    SettingsPagePrecisionLayout->addItem( spacer1, 4, 0 );

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

    textLabel1_2 = new TQLabel( groupBox3, "textLabel1_2" );

    groupBox3Layout->addWidget( textLabel1_2, 0, 0 );

    textLabel1_2_2 = new TQLabel( groupBox3, "textLabel1_2_2" );

    groupBox3Layout->addWidget( textLabel1_2_2, 1, 0 );

    kcfg_zoomInStep = new KIntNumInput( groupBox3, "kcfg_zoomInStep" );
    kcfg_zoomInStep->setValue( 25 );
    kcfg_zoomInStep->setMinValue( 1 );
    kcfg_zoomInStep->setMaxValue( 100 );
    kcfg_zoomInStep->setReferencePoint( 5 );

    groupBox3Layout->addWidget( kcfg_zoomInStep, 0, 1 );

    kcfg_zoomOutStep = new KIntNumInput( groupBox3, "kcfg_zoomOutStep" );
    kcfg_zoomOutStep->setValue( 25 );
    kcfg_zoomOutStep->setMinValue( 1 );
    kcfg_zoomOutStep->setMaxValue( 100 );
    kcfg_zoomOutStep->setReferencePoint( 5 );

    groupBox3Layout->addWidget( kcfg_zoomOutStep, 1, 1 );

    SettingsPagePrecisionLayout->addWidget( groupBox3, 3, 0 );

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

    kcfg_backgroundcolor = new KColorButton( groupBox2, "kcfg_backgroundcolor" );
    groupBox2Layout->addWidget( kcfg_backgroundcolor );
    spacer2 = new TQSpacerItem( 81, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    groupBox2Layout->addItem( spacer2 );

    SettingsPagePrecisionLayout->addWidget( groupBox2, 2, 0 );

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

    radioButton1 = new TQRadioButton( kcfg_anglemode, "radioButton1" );
    kcfg_anglemodeLayout->addWidget( radioButton1 );

    radioButton2 = new TQRadioButton( kcfg_anglemode, "radioButton2" );
    kcfg_anglemodeLayout->addWidget( radioButton2 );

    SettingsPagePrecisionLayout->addWidget( kcfg_anglemode, 1, 0 );

    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 );

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

    textLabel1 = new TQLabel( groupBox1, "textLabel1" );
    layout1->addWidget( textLabel1 );

    kcfg_stepWidth = new KDoubleNumInput( groupBox1, "kcfg_stepWidth" );
    kcfg_stepWidth->setValue( 1 );
    kcfg_stepWidth->setMinValue( 0.1 );
    layout1->addWidget( kcfg_stepWidth );
    groupBox1Layout->addLayout( layout1 );

    kcfg_useRelativeStepWidth = new TQCheckBox( groupBox1, "kcfg_useRelativeStepWidth" );
    groupBox1Layout->addWidget( kcfg_useRelativeStepWidth );

    SettingsPagePrecisionLayout->addWidget( groupBox1, 0, 0 );
    languageChange();
    resize( TQSize(301, 401).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void SettingsPagePrecision::languageChange()
{
    groupBox3->setTitle( tr2i18n( "Zoom" ) );
    textLabel1_2->setText( tr2i18n( "Zoom in by:" ) );
    textLabel1_2_2->setText( tr2i18n( "Zoom out by:" ) );
    kcfg_zoomInStep->setSuffix( tr2i18n( "%" ) );
    TQWhatsThis::add( kcfg_zoomInStep, tr2i18n( "The value the zoom-in tool should use." ) );
    kcfg_zoomOutStep->setSuffix( tr2i18n( "%" ) );
    TQWhatsThis::add( kcfg_zoomOutStep, tr2i18n( "The value the zoom-out tool should use." ) );
    groupBox2->setTitle( tr2i18n( "Background Color" ) );
    kcfg_backgroundcolor->setText( TQString::null );
    TQToolTip::add( kcfg_backgroundcolor, tr2i18n( "Color for the plot area behind the grid." ) );
    TQWhatsThis::add( kcfg_backgroundcolor, tr2i18n( "Click on the button the choose the color of the background. This option has no effect on printing nor export." ) );
    kcfg_anglemode->setTitle( tr2i18n( "Angle Mode" ) );
    radioButton1->setText( tr2i18n( "&Radian" ) );
    TQToolTip::add( radioButton1, tr2i18n( "Trigonometric functions use radian mode for angles." ) );
    TQWhatsThis::add( radioButton1, tr2i18n( "Check this button to use radian mode to measure angles. This is important for trigonometric functions only." ) );
    radioButton2->setText( tr2i18n( "&Degree" ) );
    TQToolTip::add( radioButton2, tr2i18n( "Trigonometric functions use degree mode for angles." ) );
    TQWhatsThis::add( radioButton2, tr2i18n( "Check this button to use degree mode to measure angles. This is important for trigonometric functions only." ) );
    groupBox1->setTitle( tr2i18n( "Precision" ) );
    textLabel1->setText( tr2i18n( "Points per pixel:" ) );
    TQToolTip::add( kcfg_stepWidth, tr2i18n( "How many points per pixel shall be calculated." ) );
    TQWhatsThis::add( kcfg_stepWidth, tr2i18n( "Enter the amount of points per pixel which shall be calculated. For slow computers or very complex plots use higher values." ) );
    kcfg_useRelativeStepWidth->setText( tr2i18n( "&Use relative step width" ) );
    TQToolTip::add( kcfg_useRelativeStepWidth, tr2i18n( "Use the same precision independent of the window's size" ) );
    TQWhatsThis::add( kcfg_useRelativeStepWidth, tr2i18n( "If relative step width is set to true, the step width will be adapted to the size of the window." ) );
}

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

TQMetaObject *SettingsPagePrecision::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_SettingsPagePrecision( "SettingsPagePrecision", &SettingsPagePrecision::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* SettingsPagePrecision::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 = TQDialog::staticMetaObject();
    static const TQUMethod slot_0 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"SettingsPagePrecision", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_SettingsPagePrecision.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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