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

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

#include "editderivativespage.h"

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

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

    grp1der = new TQFrame( this, "grp1der" );
    grp1der->setFrameShape( TQFrame::Box );
    grp1der->setFrameShadow( TQFrame::Sunken );
    grp1derLayout = new TQGridLayout( grp1der, 1, 1, 11, 6, "grp1derLayout"); 

    colorDerivative1 = new KColorButton( grp1der, "colorDerivative1" );
    colorDerivative1->setEnabled( false );

    grp1derLayout->addWidget( colorDerivative1, 2, 1 );

    TextLabel2_2_2 = new TQLabel( grp1der, "TextLabel2_2_2" );

    grp1derLayout->addWidget( TextLabel2_2_2, 1, 2 );

    textLabel2_2_2 = new TQLabel( grp1der, "textLabel2_2_2" );

    grp1derLayout->addWidget( textLabel2_2_2, 2, 0 );

    lineWidthDerivative1 = new KIntNumInput( grp1der, "lineWidthDerivative1" );
    lineWidthDerivative1->setEnabled( false );
    lineWidthDerivative1->setMinValue( 1 );

    grp1derLayout->addWidget( lineWidthDerivative1, 1, 1 );

    showDerivative1 = new TQCheckBox( grp1der, "showDerivative1" );

    grp1derLayout->addMultiCellWidget( showDerivative1, 0, 0, 0, 2 );

    textLabel1_3_2_2 = new TQLabel( grp1der, "textLabel1_3_2_2" );

    grp1derLayout->addWidget( textLabel1_3_2_2, 1, 0 );
    EditDerivativesPageLayout->addWidget( grp1der );

    grp2der = new TQFrame( this, "grp2der" );
    grp2der->setFrameShape( TQFrame::Box );
    grp2der->setFrameShadow( TQFrame::Sunken );
    grp2derLayout = new TQGridLayout( grp2der, 1, 1, 11, 6, "grp2derLayout"); 

    textLabel2_2 = new TQLabel( grp2der, "textLabel2_2" );

    grp2derLayout->addWidget( textLabel2_2, 2, 0 );

    colorDerivative2 = new KColorButton( grp2der, "colorDerivative2" );
    colorDerivative2->setEnabled( false );

    grp2derLayout->addWidget( colorDerivative2, 2, 1 );

    textLabel1_3_2 = new TQLabel( grp2der, "textLabel1_3_2" );

    grp2derLayout->addWidget( textLabel1_3_2, 1, 0 );

    lineWidthDerivative2 = new KIntNumInput( grp2der, "lineWidthDerivative2" );
    lineWidthDerivative2->setEnabled( false );
    lineWidthDerivative2->setMinValue( 1 );

    grp2derLayout->addWidget( lineWidthDerivative2, 1, 1 );

    TextLabel2_2 = new TQLabel( grp2der, "TextLabel2_2" );

    grp2derLayout->addWidget( TextLabel2_2, 1, 2 );

    showDerivative2 = new TQCheckBox( grp2der, "showDerivative2" );

    grp2derLayout->addMultiCellWidget( showDerivative2, 0, 0, 0, 2 );
    EditDerivativesPageLayout->addWidget( grp2der );
    spacer6 = new TQSpacerItem( 20, 110, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    EditDerivativesPageLayout->addItem( spacer6 );
    languageChange();
    resize( TQSize(323, 255).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( showDerivative1, TQ_SIGNAL( toggled(bool) ), lineWidthDerivative1, TQ_SLOT( setEnabled(bool) ) );
    connect( showDerivative1, TQ_SIGNAL( toggled(bool) ), colorDerivative1, TQ_SLOT( setEnabled(bool) ) );
    connect( showDerivative2, TQ_SIGNAL( toggled(bool) ), lineWidthDerivative2, TQ_SLOT( setEnabled(bool) ) );
    connect( showDerivative2, TQ_SIGNAL( toggled(bool) ), colorDerivative2, TQ_SLOT( setEnabled(bool) ) );
    connect( showDerivative1, TQ_SIGNAL( toggled(bool) ), textLabel1_3_2_2, TQ_SLOT( setEnabled(bool) ) );

    // tab order
    setTabOrder( showDerivative1, lineWidthDerivative1 );
    setTabOrder( lineWidthDerivative1, colorDerivative1 );
    setTabOrder( colorDerivative1, showDerivative2 );
    setTabOrder( showDerivative2, lineWidthDerivative2 );
    setTabOrder( lineWidthDerivative2, colorDerivative2 );

    // buddies
    textLabel2_2_2->setBuddy( colorDerivative1 );
    textLabel1_3_2_2->setBuddy( lineWidthDerivative1 );
    textLabel2_2->setBuddy( colorDerivative2 );
    textLabel1_3_2->setBuddy( lineWidthDerivative2 );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void EditDerivativesPage::languageChange()
{
    setCaption( tr2i18n( "Edit Derivatives" ) );
    colorDerivative1->setText( TQString::null );
    TQToolTip::add( colorDerivative1, tr2i18n( "color of the plot line" ) );
    TQWhatsThis::add( colorDerivative1, tr2i18n( "Click this button to choose a color for the plot line." ) );
    TextLabel2_2_2->setText( tr2i18n( "0.1mm" ) );
    textLabel2_2_2->setText( tr2i18n( "&Color:" ) );
    TQToolTip::add( lineWidthDerivative1, tr2i18n( "width of the plot line" ) );
    TQWhatsThis::add( lineWidthDerivative1, tr2i18n( "Change the width of the plot line in steps of 0.1mm." ) );
    showDerivative1->setText( tr2i18n( "Show &1st derivative" ) );
    TQToolTip::add( showDerivative1, tr2i18n( "Show first derivative" ) );
    TQWhatsThis::add( showDerivative1, tr2i18n( "If this box is checked, the first derivative will be plotted, too." ) );
    textLabel1_3_2_2->setText( tr2i18n( "&Line width:" ) );
    textLabel2_2->setText( tr2i18n( "Colo&r:" ) );
    colorDerivative2->setText( TQString::null );
    TQToolTip::add( colorDerivative2, tr2i18n( "color of the plot line" ) );
    TQWhatsThis::add( colorDerivative2, tr2i18n( "Click this button to choose a color for the plot line." ) );
    textLabel1_3_2->setText( tr2i18n( "Line &width:" ) );
    TQToolTip::add( lineWidthDerivative2, tr2i18n( "width of the plot line" ) );
    TQWhatsThis::add( lineWidthDerivative2, tr2i18n( "Change the width of the plot line in steps of 0.1mm." ) );
    TextLabel2_2->setText( tr2i18n( "0.1mm" ) );
    showDerivative2->setText( tr2i18n( "Show &2nd derivative" ) );
    TQToolTip::add( showDerivative2, tr2i18n( "Show second derivative" ) );
    TQWhatsThis::add( showDerivative2, tr2i18n( "If this box is checked, the first derivative will be plotted, too." ) );
}

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

TQMetaObject *EditDerivativesPage::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_EditDerivativesPage( "EditDerivativesPage", &EditDerivativesPage::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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