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

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

#include "modcalcjddlg.h"

#include <ntqvariant.h>
#include <kpushbutton.h>
#include <klineedit.h>
#include <ntqpushbutton.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqdatetimeedit.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "libtdeedu/extdate/extdatetimeedit.h"

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

    InputBox = new TQButtonGroup( this, "InputBox" );
    InputBox->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, InputBox->sizePolicy().hasHeightForWidth() ) );
    InputBox->setColumnLayout(0, TQt::Vertical );
    InputBox->layout()->setSpacing( 6 );
    InputBox->layout()->setMargin( 11 );
    InputBoxLayout = new TQVBoxLayout( InputBox->layout() );
    InputBoxLayout->setAlignment( TQt::AlignTop );

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

    JdRadio = new TQRadioButton( InputBox, "JdRadio" );
    JdRadio->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, JdRadio->sizePolicy().hasHeightForWidth() ) );
    layout9->addWidget( JdRadio );

    MjdRadio = new TQRadioButton( InputBox, "MjdRadio" );
    MjdRadio->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, MjdRadio->sizePolicy().hasHeightForWidth() ) );
    layout9->addWidget( MjdRadio );

    DateRadio = new TQRadioButton( InputBox, "DateRadio" );
    DateRadio->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, DateRadio->sizePolicy().hasHeightForWidth() ) );
    layout9->addWidget( DateRadio );
    InputBoxLayout->addLayout( layout9 );
    modCalcJdDlgLayout->addWidget( InputBox );

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

    JdBox = new TQGroupBox( this, "JdBox" );
    JdBox->setColumnLayout(0, TQt::Vertical );
    JdBox->layout()->setSpacing( 6 );
    JdBox->layout()->setMargin( 11 );
    JdBoxLayout = new TQHBoxLayout( JdBox->layout() );
    JdBoxLayout->setAlignment( TQt::AlignTop );

    JdLabel = new TQLabel( JdBox, "JdLabel" );
    JdBoxLayout->addWidget( JdLabel );

    JdName = new KLineEdit( JdBox, "JdName" );
    JdName->setMinimumSize( TQSize( 130, 0 ) );
    JdBoxLayout->addWidget( JdName );
    layout37->addWidget( JdBox );

    MjdBox = new TQGroupBox( this, "MjdBox" );
    MjdBox->setColumnLayout(0, TQt::Vertical );
    MjdBox->layout()->setSpacing( 6 );
    MjdBox->layout()->setMargin( 11 );
    MjdBoxLayout = new TQHBoxLayout( MjdBox->layout() );
    MjdBoxLayout->setAlignment( TQt::AlignTop );

    MjdLabel = new TQLabel( MjdBox, "MjdLabel" );
    MjdBoxLayout->addWidget( MjdLabel );

    MjdName = new KLineEdit( MjdBox, "MjdName" );
    MjdName->setMinimumSize( TQSize( 130, 0 ) );
    MjdBoxLayout->addWidget( MjdName );
    layout37->addWidget( MjdBox );
    modCalcJdDlgLayout->addLayout( layout37 );

    Datebox = new TQGroupBox( this, "Datebox" );
    Datebox->setColumnLayout(0, TQt::Vertical );
    Datebox->layout()->setSpacing( 6 );
    Datebox->layout()->setMargin( 11 );
    DateboxLayout = new TQHBoxLayout( Datebox->layout() );
    DateboxLayout->setAlignment( TQt::AlignTop );
    spacer60 = new TQSpacerItem( 16, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    DateboxLayout->addItem( spacer60 );

    timeLabel = new TQLabel( Datebox, "timeLabel" );
    DateboxLayout->addWidget( timeLabel );

    timBox = new TQTimeEdit( Datebox, "timBox" );
    timBox->setMinimumSize( TQSize( 100, 0 ) );
    DateboxLayout->addWidget( timBox );
    spacer61 = new TQSpacerItem( 16, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    DateboxLayout->addItem( spacer61 );

    dateLabel = new TQLabel( Datebox, "dateLabel" );
    DateboxLayout->addWidget( dateLabel );

    datBox = new ExtDateEdit( Datebox, "datBox" );
    datBox->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, datBox->sizePolicy().hasHeightForWidth() ) );
    datBox->setMinimumSize( TQSize( 110, 0 ) );
    DateboxLayout->addWidget( datBox );
    spacer62 = new TQSpacerItem( 16, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    DateboxLayout->addItem( spacer62 );
    modCalcJdDlgLayout->addWidget( Datebox );

    layout7 = new TQHBoxLayout( 0, 0, 6, "layout7"); 
    Spacer8 = new TQSpacerItem( 23, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout7->addItem( Spacer8 );

    Now = new KPushButton( this, "Now" );
    Now->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, Now->sizePolicy().hasHeightForWidth() ) );
    layout7->addWidget( Now );
    spacer6 = new TQSpacerItem( 39, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout7->addItem( spacer6 );

    Clear = new KPushButton( this, "Clear" );
    Clear->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, Clear->sizePolicy().hasHeightForWidth() ) );
    Clear->setMinimumSize( TQSize( 0, 25 ) );
    Clear->setMaximumSize( TQSize( 32767, 30 ) );
    layout7->addWidget( Clear );
    spacer4 = new TQSpacerItem( 37, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout7->addItem( spacer4 );

    Compute = new KPushButton( this, "Compute" );
    Compute->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, Compute->sizePolicy().hasHeightForWidth() ) );
    Compute->setMinimumSize( TQSize( 0, 25 ) );
    Compute->setMaximumSize( TQSize( 32767, 30 ) );
    layout7->addWidget( Compute );
    spacer5 = new TQSpacerItem( 38, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout7->addItem( spacer5 );
    modCalcJdDlgLayout->addLayout( layout7 );
    spacer55 = new TQSpacerItem( 20, 30, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    modCalcJdDlgLayout->addItem( spacer55 );
    languageChange();
    resize( TQSize(407, 387).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( Now, TQ_SIGNAL( clicked() ), this, TQ_SLOT( showCurrentTime() ) );
    connect( Clear, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotClearTime() ) );
    connect( Compute, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotComputeTime() ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void modCalcJdDlg::languageChange()
{
    setCaption( tr2i18n( "Julian Day" ) );
    InputBox->setTitle( tr2i18n( "Choose Input Field" ) );
    JdRadio->setText( tr2i18n( "Julian day" ) );
    MjdRadio->setText( tr2i18n( "Modified Julian day" ) );
    DateRadio->setText( tr2i18n( "Date" ) );
    JdBox->setTitle( tr2i18n( "Julian Day" ) );
    JdLabel->setText( tr2i18n( "JD:" ) );
    MjdBox->setTitle( tr2i18n( "Modified Julian Day" ) );
    MjdLabel->setText( tr2i18n( "MJD:" ) );
    Datebox->setTitle( tr2i18n( "Date && Time" ) );
    timeLabel->setText( tr2i18n( "UT:" ) );
    dateLabel->setText( tr2i18n( "Date:" ) );
    Now->setText( tr2i18n( "Now" ) );
    Clear->setText( tr2i18n( "Clear" ) );
    Compute->setText( tr2i18n( "Convert" ) );
}

void modCalcJdDlg::slotClearTime()
{
    tqWarning( "modCalcJdDlg::slotClearTime(): Not implemented yet" );
}

void modCalcJdDlg::slotComputeTime()
{
    tqWarning( "modCalcJdDlg::slotComputeTime(): Not implemented yet" );
}

void modCalcJdDlg::showCurrentTime()
{
    tqWarning( "modCalcJdDlg::showCurrentTime(): Not implemented yet" );
}

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

TQMetaObject *modCalcJdDlg::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_modCalcJdDlg( "modCalcJdDlg", &modCalcJdDlg::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

bool modCalcJdDlg::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: slotClearTime(); break;
    case 1: slotComputeTime(); break;
    case 2: showCurrentTime(); break;
    case 3: languageChange(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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