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

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

#include "qeditpolar.h"

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

/*
 *  Constructs a QEditPolar 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.
 */
QEditPolar::QEditPolar( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "QEditPolar" );
    setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, 0, 0, sizePolicy().hasHeightForWidth() ) );
    setSizeGripEnabled( true );
    QEditPolarLayout = new TQGridLayout( this, 1, 1, 11, 6, "QEditPolarLayout"); 

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

    kLineEditYFunction = new KLineEdit( groupBox1, "kLineEditYFunction" );
    kLineEditYFunction->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, kLineEditYFunction->sizePolicy().hasHeightForWidth() ) );

    groupBox1Layout->addWidget( kLineEditYFunction, 1, 1 );

    textLabelR = new TQLabel( groupBox1, "textLabelR" );

    groupBox1Layout->addWidget( textLabelR, 1, 0 );

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

    groupBox1Layout->addMultiCellWidget( textLabel2_2, 0, 0, 0, 1 );

    QEditPolarLayout->addWidget( groupBox1, 0, 0 );

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

    checkBoxHide = new TQCheckBox( buttonGroup1, "checkBoxHide" );
    buttonGroup1Layout->addWidget( checkBoxHide );

    QEditPolarLayout->addWidget( buttonGroup1, 1, 0 );

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

    textLabel2 = new TQLabel( frame6, "textLabel2" );

    frame6Layout->addWidget( textLabel2, 1, 0 );

    kColorButtonColor = new KColorButton( frame6, "kColorButtonColor" );

    frame6Layout->addWidget( kColorButtonColor, 1, 1 );

    textLabel1_3 = new TQLabel( frame6, "textLabel1_3" );

    frame6Layout->addWidget( textLabel1_3, 0, 0 );

    kIntNumInputLineWidth = new KIntNumInput( frame6, "kIntNumInputLineWidth" );
    kIntNumInputLineWidth->setMinValue( 1 );

    frame6Layout->addWidget( kIntNumInputLineWidth, 0, 1 );

    TextLabel2 = new TQLabel( frame6, "TextLabel2" );

    frame6Layout->addWidget( TextLabel2, 0, 2 );

    QEditPolarLayout->addWidget( frame6, 3, 0 );

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

    buttonHelp = new TQPushButton( this, "buttonHelp" );
    buttonHelp->setAutoDefault( true );
    Layout1->addWidget( buttonHelp );
    Horizontal_Spacing2 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    Layout1->addItem( Horizontal_Spacing2 );

    buttonOk = new TQPushButton( this, "buttonOk" );
    buttonOk->setAutoDefault( true );
    buttonOk->setDefault( true );
    Layout1->addWidget( buttonOk );

    buttonCancel = new TQPushButton( this, "buttonCancel" );
    buttonCancel->setAutoDefault( true );
    Layout1->addWidget( buttonCancel );

    QEditPolarLayout->addLayout( Layout1, 4, 0 );

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

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

    frame5Layout->addWidget( textLabel1_2, 3, 0 );

    textLabel1 = new TQLabel( frame5, "textLabel1" );

    frame5Layout->addWidget( textLabel1, 1, 0 );

    min = new KLineEdit( frame5, "min" );
    min->setEnabled( false );

    frame5Layout->addWidget( min, 1, 1 );

    max = new KLineEdit( frame5, "max" );
    max->setEnabled( false );

    frame5Layout->addWidget( max, 3, 1 );

    customMinRange = new TQCheckBox( frame5, "customMinRange" );

    frame5Layout->addMultiCellWidget( customMinRange, 0, 0, 0, 1 );

    customMaxRange = new TQCheckBox( frame5, "customMaxRange" );

    frame5Layout->addMultiCellWidget( customMaxRange, 2, 2, 0, 1 );

    QEditPolarLayout->addWidget( frame5, 2, 0 );
    languageChange();
    resize( TQSize(342, 432).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( buttonOk, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
    connect( buttonCancel, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
    connect( buttonHelp, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotHelp() ) );

    // tab order
    setTabOrder( kLineEditYFunction, checkBoxHide );
    setTabOrder( checkBoxHide, customMinRange );
    setTabOrder( customMinRange, min );
    setTabOrder( min, max );
    setTabOrder( max, kIntNumInputLineWidth );
    setTabOrder( kIntNumInputLineWidth, kColorButtonColor );
    setTabOrder( kColorButtonColor, buttonOk );
    setTabOrder( buttonOk, buttonCancel );
    setTabOrder( buttonCancel, buttonHelp );

    // buddies
    textLabel2->setBuddy( kColorButtonColor );
    textLabel1_3->setBuddy( kIntNumInputLineWidth );
    textLabel1_2->setBuddy( max );
    textLabel1->setBuddy( min );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void QEditPolar::languageChange()
{
    setCaption( tr2i18n( "Edit Polar Plot" ) );
    groupBox1->setTitle( tr2i18n( "Definition" ) );
    TQToolTip::add( kLineEditYFunction, tr2i18n( "enter an equation, for instance loop(angle)=ln(angle)" ) );
    TQWhatsThis::add( kLineEditYFunction, tr2i18n( "Enter an expression for the function. The prefix \"r\" will be added automatically.\n"
"Example: loop(angle)=ln(angle)" ) );
    textLabelR->setText( tr2i18n( "r" ) );
    textLabel2_2->setText( tr2i18n( "Equation:" ) );
    buttonGroup1->setTitle( tr2i18n( "Extensions" ) );
    checkBoxHide->setText( tr2i18n( "Hide" ) );
    TQToolTip::add( checkBoxHide, tr2i18n( "hide the plot" ) );
    TQWhatsThis::add( checkBoxHide, tr2i18n( "Check this box if you want to hide the plot of the function." ) );
    textLabel2->setText( tr2i18n( "Colo&r:" ) );
    kColorButtonColor->setText( TQString::null );
    TQToolTip::add( kColorButtonColor, tr2i18n( "color of the plot line" ) );
    TQWhatsThis::add( kColorButtonColor, tr2i18n( "Click this button to choose a color for the plot line." ) );
    textLabel1_3->setText( tr2i18n( "Line &width:" ) );
    TQToolTip::add( kIntNumInputLineWidth, tr2i18n( "width of the plot line" ) );
    TQWhatsThis::add( kIntNumInputLineWidth, tr2i18n( "Change the width of the plot line in steps of 0.1mm." ) );
    TextLabel2->setText( tr2i18n( "0.1mm" ) );
    buttonHelp->setText( tr2i18n( "&Help" ) );
    buttonHelp->setAccel( TQKeySequence( tr2i18n( "F1" ) ) );
    buttonOk->setText( tr2i18n( "&OK" ) );
    TQToolTip::add( buttonOk, tr2i18n( "apply changes to the list" ) );
    TQWhatsThis::add( buttonOk, tr2i18n( "Click this button to apply the changes to the list of functions." ) );
    buttonCancel->setText( tr2i18n( "&Cancel" ) );
    TQToolTip::add( buttonCancel, tr2i18n( "abort without changing anything" ) );
    TQWhatsThis::add( buttonCancel, tr2i18n( "Click here to close the dialog without changing anything." ) );
    textLabel1_2->setText( tr2i18n( "Max:" ) );
    textLabel1->setText( tr2i18n( "Min:" ) );
    TQToolTip::add( min, tr2i18n( "lower boundary of the plot range" ) );
    TQWhatsThis::add( min, tr2i18n( "Enter the lower boundary of the plot range. Expressions like 2*pi are allowed, too." ) );
    TQToolTip::add( max, tr2i18n( "upper boundary of the plot range" ) );
    TQWhatsThis::add( max, tr2i18n( "Enter the upper boundary of the plot range. Expressions like 2*pi are allowed, too." ) );
    customMinRange->setText( tr2i18n( "Custom plot minimum r-range:" ) );
    TQToolTip::add( customMinRange, tr2i18n( "Customize the plot range" ) );
    TQWhatsThis::add( customMinRange, tr2i18n( "Check this button and enter the plot minimum range boundary below." ) );
    customMaxRange->setText( tr2i18n( "Custom plot maximum r-range:" ) );
    TQToolTip::add( customMaxRange, tr2i18n( "Customize the maximum plot range" ) );
    TQWhatsThis::add( customMaxRange, tr2i18n( "Check this button and enter the plot maximum range boundary below." ) );
}

void QEditPolar::slotHelp()
{
    tqWarning( "QEditPolar::slotHelp(): Not implemented yet" );
}

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

TQMetaObject *QEditPolar::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_QEditPolar( "QEditPolar", &QEditPolar::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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