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

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

#include "plotsetupwidget.h"

#include <ntqvariant.h>
#include <knuminput.h>
#include <kcombobox.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqcheckbox.h>
#include <ntqgroupbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    textLabel3 = new TQLabel( this, "textLabel3" );

    PlotSetupWidgetLayout->addWidget( textLabel3, 9, 0 );

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

    textLabel1_2 = new TQLabel( this, "textLabel1_2" );
    layout4->addWidget( textLabel1_2 );

    aValue = new TQLabel( this, "aValue" );
    layout4->addWidget( aValue );

    PlotSetupWidgetLayout->addLayout( layout4, 2, 0 );

    to = new KIntNumInput( this, "to" );
    to->setValue( 115 );
    to->setMinValue( 2 );
    to->setMaxValue( 200 );

    PlotSetupWidgetLayout->addWidget( to, 12, 0 );

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

    textLabel3_2 = new TQLabel( this, "textLabel3_2" );
    layout2->addWidget( textLabel3_2 );

    minValue = new TQLabel( this, "minValue" );
    layout2->addWidget( minValue );

    PlotSetupWidgetLayout->addLayout( layout2, 0, 0 );

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

    PlotSetupWidgetLayout->addWidget( showNames, 8, 0 );

    textLabel4 = new TQLabel( this, "textLabel4" );

    PlotSetupWidgetLayout->addWidget( textLabel4, 11, 0 );

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

    textLabel2 = new TQLabel( this, "textLabel2" );
    layout3->addWidget( textLabel2 );

    maxValue = new TQLabel( this, "maxValue" );
    layout3->addWidget( maxValue );

    PlotSetupWidgetLayout->addLayout( layout3, 1, 0 );

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

    PlotSetupWidgetLayout->addWidget( connectPoints, 7, 0 );

    from = new KIntNumInput( this, "from" );
    from->setValue( 1 );
    from->setMinValue( 1 );
    from->setMaxValue( 200 );

    PlotSetupWidgetLayout->addWidget( from, 10, 0 );
    spacer1 = new TQSpacerItem( 20, 60, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    PlotSetupWidgetLayout->addItem( spacer1, 3, 0 );

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

    KCB_y = new KComboBox( false, groupBox1, "KCB_y" );

    groupBox1Layout->addWidget( KCB_y, 0, 0 );

    PlotSetupWidgetLayout->addWidget( groupBox1, 4, 0 );
    languageChange();
    resize( TQSize(279, 565).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void PlotSetupWidget::languageChange()
{
    textLabel3->setText( tr2i18n( "First element:" ) );
    textLabel1_2->setText( tr2i18n( "Average value:" ) );
    aValue->setText( TQString::null );
    TQWhatsThis::add( to, tr2i18n( "Define the last element whose value should be plotted" ) );
    textLabel3_2->setText( tr2i18n( "Minimum value:" ) );
    minValue->setText( TQString::null );
    showNames->setText( tr2i18n( "&Show element names" ) );
    TQWhatsThis::add( showNames, tr2i18n( "Define whether the names of the plotted element should be displayed" ) );
    textLabel4->setText( tr2i18n( "Last element:" ) );
    textLabel2->setText( tr2i18n( "Maximum value:" ) );
    maxValue->setText( TQString::null );
    connectPoints->setText( tr2i18n( "&Connect points" ) );
    TQWhatsThis::add( connectPoints, tr2i18n( "Define whether the plotted points should be connected or not" ) );
    TQWhatsThis::add( from, tr2i18n( "Define the first element whose value should be plotted" ) );
    groupBox1->setTitle( tr2i18n( "Y-axis" ) );
    KCB_y->clear();
    KCB_y->insertItem( tr2i18n( "Mass" ) );
    KCB_y->insertItem( tr2i18n( "Mean Mass" ) );
    KCB_y->insertItem( tr2i18n( "Density" ) );
    KCB_y->insertItem( tr2i18n( "Electronegativity" ) );
    KCB_y->insertItem( tr2i18n( "Melting Point" ) );
    KCB_y->insertItem( tr2i18n( "Boiling Point" ) );
    KCB_y->insertItem( tr2i18n( "Atomic Radius" ) );
    KCB_y->insertItem( tr2i18n( "Covalent Radius" ) );
    TQWhatsThis::add( KCB_y, tr2i18n( "Here you can define what you want to plot" ) );
}

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

TQMetaObject *PlotSetupWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_PlotSetupWidget( "PlotSetupWidget", &PlotSetupWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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