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

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

#include "settings_units.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    kcfg_temperature = new TQButtonGroup( this, "kcfg_temperature" );
    kcfg_temperature->setColumnLayout(0, TQt::Vertical );
    kcfg_temperature->layout()->setSpacing( 6 );
    kcfg_temperature->layout()->setMargin( 11 );
    kcfg_temperatureLayout = new TQGridLayout( kcfg_temperature->layout() );
    kcfg_temperatureLayout->setAlignment( TQt::AlignTop );

    radioButton19 = new TQRadioButton( kcfg_temperature, "radioButton19" );
    kcfg_temperature->insert( radioButton19, 0 );

    kcfg_temperatureLayout->addWidget( radioButton19, 0, 0 );

    radioButton11_2 = new TQRadioButton( kcfg_temperature, "radioButton11_2" );
    kcfg_temperature->insert( radioButton11_2, 2 );

    kcfg_temperatureLayout->addWidget( radioButton11_2, 2, 0 );

    radioButton21 = new TQRadioButton( kcfg_temperature, "radioButton21" );
    kcfg_temperature->insert( radioButton21, 3 );

    kcfg_temperatureLayout->addWidget( radioButton21, 3, 0 );

    radioButton22 = new TQRadioButton( kcfg_temperature, "radioButton22" );
    kcfg_temperature->insert( radioButton22, 4 );

    kcfg_temperatureLayout->addWidget( radioButton22, 4, 0 );

    radioButton20 = new TQRadioButton( kcfg_temperature, "radioButton20" );
    kcfg_temperature->insert( radioButton20, 1 );

    kcfg_temperatureLayout->addWidget( radioButton20, 1, 0 );

    setupUnitsLayout->addWidget( kcfg_temperature, 0, 0 );

    kcfg_energies = new TQButtonGroup( this, "kcfg_energies" );
    kcfg_energies->setExclusive( true );
    kcfg_energies->setColumnLayout(0, TQt::Vertical );
    kcfg_energies->layout()->setSpacing( 6 );
    kcfg_energies->layout()->setMargin( 11 );
    kcfg_energiesLayout = new TQGridLayout( kcfg_energies->layout() );
    kcfg_energiesLayout->setAlignment( TQt::AlignTop );

    radioButton3_2_2_2 = new TQRadioButton( kcfg_energies, "radioButton3_2_2_2" );

    kcfg_energiesLayout->addWidget( radioButton3_2_2_2, 0, 0 );

    radioButton4_2_2_2 = new TQRadioButton( kcfg_energies, "radioButton4_2_2_2" );

    kcfg_energiesLayout->addWidget( radioButton4_2_2_2, 1, 0 );

    setupUnitsLayout->addWidget( kcfg_energies, 1, 0 );
    languageChange();
    resize( TQSize(400, 256).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void setupUnits::languageChange()
{
    kcfg_temperature->setTitle( tr2i18n( "&Temperatures" ) );
    TQWhatsThis::add( kcfg_temperature, tr2i18n( "Kalzium can show you the temperature in three different scales" ) );
    radioButton19->setText( tr2i18n( "&Use Kelvin" ) );
    TQToolTip::add( radioButton19, tr2i18n( "If selected, the temperatures will be displayed in Kelvin" ) );
    TQWhatsThis::add( radioButton19, tr2i18n( "If selected, the temperatures will be displayed in Kelvin. This is then saved in configuration and restored next time you start Kalzium." ) );
    radioButton11_2->setText( tr2i18n( "Use degrees &Fahrenheit" ) );
    TQToolTip::add( radioButton11_2, tr2i18n( "If selected, the temperatures will be displayed in Degrees Fahrenheit" ) );
    TQWhatsThis::add( radioButton11_2, tr2i18n( "If selected, the temperatures will be displayed in Degrees Fahrenheit. This is then saved in configuration and restored next time you start Kalzium." ) );
    radioButton21->setText( tr2i18n( "Use degrees R&ankine" ) );
    TQToolTip::add( radioButton21, tr2i18n( "If selected, the temperatures will be displayed in Degrees Rankine" ) );
    TQWhatsThis::add( radioButton21, tr2i18n( "If selected, the temperatures will be displayed in Degrees Rankine. This is then saved in configuration and restored next time you start Kalzium." ) );
    radioButton22->setText( tr2i18n( "Use degrees &Réaumur" ) );
    TQToolTip::add( radioButton22, tr2i18n( "If selected, the temperatures will be displayed in Degrees Réaumur." ) );
    TQWhatsThis::add( radioButton22, tr2i18n( "If selected, the temperatures will be displayed in Degrees Réaumur. This is then saved in configuration and restored next time you start Kalzium." ) );
    radioButton20->setText( tr2i18n( "Use de&grees Celsius" ) );
    TQToolTip::add( radioButton20, tr2i18n( "If selected, the temperatures will be displayed in Degrees Celsius" ) );
    TQWhatsThis::add( radioButton20, tr2i18n( "If selected, the temperatures will be displayed in Degrees Celsius. This is then saved in configuration and restored next time you start Kalzium." ) );
    kcfg_energies->setTitle( tr2i18n( "Units of &Energies" ) );
    radioButton3_2_2_2->setText( tr2i18n( "&Show energies in kJ/mol (kilojoule per mol)" ) );
    TQToolTip::add( radioButton3_2_2_2, tr2i18n( "Chose the energy unit as kJ/mol (kilojoule per mol)" ) );
    TQWhatsThis::add( radioButton3_2_2_2, tr2i18n( "Check this if you prefer the energy unit in  kJ/mol (kilojoule per mol). The other choice you have is eV (electronvolt)." ) );
    radioButton4_2_2_2->setText( tr2i18n( "Show energies &in eV (electronvolt)" ) );
    TQToolTip::add( radioButton4_2_2_2, tr2i18n( "Choose the energy unit as eV (electronvolt)" ) );
    TQWhatsThis::add( radioButton4_2_2_2, tr2i18n( "Check this if you prefer the energy unit in eV (electronvolt). The other choice you have is kJ/mol (kilojoule per mol)." ) );
}

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

TQMetaObject *setupUnits::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_setupUnits( "setupUnits", &setupUnits::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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