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

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

#include "editintegralpage.h"

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

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

    showIntegral = new TQCheckBox( this, "showIntegral" );
    EditIntegralPageLayout->addWidget( showIntegral );

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

    textLabel1_5 = new TQLabel( grpPoint, "textLabel1_5" );

    grpPointLayout->addWidget( textLabel1_5, 0, 0 );

    textLabel1_5_2 = new TQLabel( grpPoint, "textLabel1_5_2" );

    grpPointLayout->addWidget( textLabel1_5_2, 1, 0 );

    txtInitX = new KLineEdit( grpPoint, "txtInitX" );

    grpPointLayout->addWidget( txtInitX, 0, 1 );

    txtInitY = new KLineEdit( grpPoint, "txtInitY" );

    grpPointLayout->addWidget( txtInitY, 1, 1 );
    EditIntegralPageLayout->addWidget( grpPoint );

    frame5_2_2 = new TQFrame( this, "frame5_2_2" );
    frame5_2_2->setEnabled( false );
    frame5_2_2->setFrameShape( TQFrame::Box );
    frame5_2_2->setFrameShadow( TQFrame::Sunken );
    frame5_2_2Layout = new TQGridLayout( frame5_2_2, 1, 1, 11, 6, "frame5_2_2Layout"); 

    textLabel2_2_3 = new TQLabel( frame5_2_2, "textLabel2_2_3" );

    frame5_2_2Layout->addWidget( textLabel2_2_3, 1, 0 );

    precision = new KDoubleNumInput( frame5_2_2, "precision" );
    precision->setEnabled( false );
    precision->setMinValue( 0.01 );

    frame5_2_2Layout->addWidget( precision, 1, 1 );

    customPrecision = new TQCheckBox( frame5_2_2, "customPrecision" );

    frame5_2_2Layout->addMultiCellWidget( customPrecision, 0, 0, 0, 1 );
    EditIntegralPageLayout->addWidget( frame5_2_2 );

    frame6_3 = new TQFrame( this, "frame6_3" );
    frame6_3->setEnabled( false );
    frame6_3->setFrameShape( TQFrame::Box );
    frame6_3->setFrameShadow( TQFrame::Sunken );
    frame6_3Layout = new TQGridLayout( frame6_3, 1, 1, 11, 6, "frame6_3Layout"); 

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

    frame6_3Layout->addWidget( textLabel2_3, 1, 0 );

    color = new KColorButton( frame6_3, "color" );

    frame6_3Layout->addWidget( color, 1, 1 );

    textLabel1_3_3 = new TQLabel( frame6_3, "textLabel1_3_3" );

    frame6_3Layout->addWidget( textLabel1_3_3, 0, 0 );

    lineWidth = new KIntNumInput( frame6_3, "lineWidth" );
    lineWidth->setMinValue( 1 );

    frame6_3Layout->addWidget( lineWidth, 0, 1 );

    TextLabel2_3 = new TQLabel( frame6_3, "TextLabel2_3" );

    frame6_3Layout->addWidget( TextLabel2_3, 0, 2 );
    EditIntegralPageLayout->addWidget( frame6_3 );
    spacer5 = new TQSpacerItem( 20, 62, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    EditIntegralPageLayout->addItem( spacer5 );
    languageChange();
    resize( TQSize(324, 316).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( showIntegral, TQ_SIGNAL( toggled(bool) ), grpPoint, TQ_SLOT( setEnabled(bool) ) );
    connect( showIntegral, TQ_SIGNAL( toggled(bool) ), frame5_2_2, TQ_SLOT( setEnabled(bool) ) );
    connect( showIntegral, TQ_SIGNAL( toggled(bool) ), frame6_3, TQ_SLOT( setEnabled(bool) ) );
    connect( customPrecision, TQ_SIGNAL( toggled(bool) ), precision, TQ_SLOT( setEnabled(bool) ) );
    connect( customPrecision, TQ_SIGNAL( toggled(bool) ), textLabel2_2_3, TQ_SLOT( setEnabled(bool) ) );

    // tab order
    setTabOrder( showIntegral, txtInitX );
    setTabOrder( txtInitX, txtInitY );
    setTabOrder( txtInitY, customPrecision );
    setTabOrder( customPrecision, precision );
    setTabOrder( precision, lineWidth );
    setTabOrder( lineWidth, color );

    // buddies
    textLabel1_5->setBuddy( txtInitX );
    textLabel1_5_2->setBuddy( txtInitY );
    textLabel2_2_3->setBuddy( precision );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void EditIntegralPage::languageChange()
{
    setCaption( tr2i18n( "Integral" ) );
    showIntegral->setText( tr2i18n( "Show integral" ) );
    TQToolTip::add( showIntegral, tr2i18n( "hide the plot" ) );
    TQWhatsThis::add( showIntegral, tr2i18n( "Check this box if you want to hide the plot of the function." ) );
    grpPoint->setTitle( tr2i18n( "Initial Point" ) );
    textLabel1_5->setText( tr2i18n( "&x-value:" ) );
    textLabel1_5_2->setText( tr2i18n( "&y-value:" ) );
    TQToolTip::add( txtInitX, tr2i18n( "Enter the initial x-point,for instance 2 or pi" ) );
    TQWhatsThis::add( txtInitX, tr2i18n( "Enter the initial x-value or expression for the integral, for example 2 or pi/2" ) );
    TQToolTip::add( txtInitY, tr2i18n( "enter the initial y-point, eg 2 or pi" ) );
    TQWhatsThis::add( txtInitY, tr2i18n( "Enter the initial y-value or expression for the integral, for example 2 or pi/2" ) );
    textLabel2_2_3->setText( tr2i18n( "P&recision:" ) );
    customPrecision->setText( tr2i18n( "Custom &precision" ) );
    TQToolTip::add( customPrecision, tr2i18n( "Customize the precision" ) );
    textLabel2_3->setText( tr2i18n( "Color:" ) );
    color->setText( TQString::null );
    TQToolTip::add( color, tr2i18n( "color of the plot line" ) );
    TQWhatsThis::add( color, tr2i18n( "Click this button to choose a color for the plot line." ) );
    textLabel1_3_3->setText( tr2i18n( "Line width:" ) );
    TQToolTip::add( lineWidth, tr2i18n( "width of the plot line" ) );
    TQWhatsThis::add( lineWidth, tr2i18n( "Change the width of the plot line in steps of 0.1mm." ) );
    TextLabel2_3->setText( tr2i18n( "0.1mm" ) );
}

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

TQMetaObject *EditIntegralPage::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_EditIntegralPage( "EditIntegralPage", &EditIntegralPage::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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