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

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

#include "altvstimeui.h"

#include <ntqvariant.h>
#include <kpushbutton.h>
#include <tdelistbox.h>
#include <../dmsbox.h>
#include <ntqpushbutton.h>
#include <ntqtabwidget.h>
#include <ntqlabel.h>
#include <klineedit.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "libtdeedu/extdate/extdatetimeedit.h"

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

    tabWidget2 = new TQTabWidget( this, "tabWidget2" );
    tabWidget2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, tabWidget2->sizePolicy().hasHeightForWidth() ) );

    tab = new TQWidget( tabWidget2, "tab" );
    tabLayout = new TQHBoxLayout( tab, 11, 6, "tabLayout"); 

    layout30 = new TQGridLayout( 0, 1, 1, 0, 0, "layout30"); 

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

    layout30->addWidget( textLabel3, 3, 0 );

    decBox = new dmsBox( tab, "decBox" );
    decBox->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, decBox->sizePolicy().hasHeightForWidth() ) );
    decBox->setFocusPolicy( dmsBox::StrongFocus );

    layout30->addWidget( decBox, 2, 1 );

    textLabel4 = new TQLabel( tab, "textLabel4" );
    textLabel4->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)5, 0, 0, textLabel4->sizePolicy().hasHeightForWidth() ) );

    layout30->addWidget( textLabel4, 2, 0 );

    textLabel2 = new TQLabel( tab, "textLabel2" );
    textLabel2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, textLabel2->sizePolicy().hasHeightForWidth() ) );
    textLabel2->setAlignment( int( TQLabel::AlignVCenter ) );

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

    nameBox = new KLineEdit( tab, "nameBox" );
    nameBox->setProperty( "trapEnterKeyEvent", TQVariant( true ) );

    layout30->addWidget( nameBox, 0, 1 );

    raBox = new dmsBox( tab, "raBox" );
    raBox->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, raBox->sizePolicy().hasHeightForWidth() ) );
    raBox->setFocusPolicy( dmsBox::StrongFocus );

    layout30->addWidget( raBox, 1, 1 );

    epochName = new KLineEdit( tab, "epochName" );
    epochName->setMinimumSize( TQSize( 80, 0 ) );
    epochName->setMaximumSize( TQSize( 80, 32767 ) );

    layout30->addWidget( epochName, 3, 1 );

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

    layout30->addWidget( textLabel1, 0, 0 );
    tabLayout->addLayout( layout30 );

    layout6 = new TQVBoxLayout( 0, 0, 0, "layout6"); 

    browseButton = new KPushButton( tab, "browseButton" );
    browseButton->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)1, 0, 0, browseButton->sizePolicy().hasHeightForWidth() ) );
    layout6->addWidget( browseButton );

    addButton = new KPushButton( tab, "addButton" );
    addButton->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)1, 0, 0, addButton->sizePolicy().hasHeightForWidth() ) );
    layout6->addWidget( addButton );

    clearFieldsButton = new KPushButton( tab, "clearFieldsButton" );
    clearFieldsButton->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)1, 0, 0, clearFieldsButton->sizePolicy().hasHeightForWidth() ) );
    clearFieldsButton->setMinimumSize( TQSize( 100, 0 ) );
    layout6->addWidget( clearFieldsButton );

    clearButton = new KPushButton( tab, "clearButton" );
    clearButton->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)1, 0, 0, clearButton->sizePolicy().hasHeightForWidth() ) );
    layout6->addWidget( clearButton );
    tabLayout->addLayout( layout6 );

    PlotList = new TDEListBox( tab, "PlotList" );
    PlotList->setMinimumSize( TQSize( 100, 0 ) );
    PlotList->setVScrollBarMode( TDEListBox::AlwaysOn );
    tabLayout->addWidget( PlotList );
    tabWidget2->insertTab( tab, TQString::fromLatin1("") );

    tab_2 = new TQWidget( tabWidget2, "tab_2" );
    tabLayout_2 = new TQVBoxLayout( tab_2, 11, 6, "tabLayout_2"); 

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

    textLabel5 = new TQLabel( tab_2, "textLabel5" );
    layout57->addWidget( textLabel5 );

    dateBox = new ExtDateEdit( tab_2, "dateBox" );
    dateBox->setMinimumSize( TQSize( 90, 0 ) );
    layout57->addWidget( dateBox );
    spacer3 = new TQSpacerItem( 257, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout57->addItem( spacer3 );
    tabLayout_2->addLayout( layout57 );

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

    cityButton = new KPushButton( tab_2, "cityButton" );
    layout25->addWidget( cityButton );

    textLabel7 = new TQLabel( tab_2, "textLabel7" );
    textLabel7->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)5, 0, 0, textLabel7->sizePolicy().hasHeightForWidth() ) );
    layout25->addWidget( textLabel7 );

    longBox = new dmsBox( tab_2, "longBox" );
    longBox->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, longBox->sizePolicy().hasHeightForWidth() ) );
    longBox->setFocusPolicy( dmsBox::StrongFocus );
    layout25->addWidget( longBox );

    textLabel6 = new TQLabel( tab_2, "textLabel6" );
    textLabel6->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)5, 0, 0, textLabel6->sizePolicy().hasHeightForWidth() ) );
    layout25->addWidget( textLabel6 );

    latBox = new dmsBox( tab_2, "latBox" );
    latBox->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, latBox->sizePolicy().hasHeightForWidth() ) );
    latBox->setFocusPolicy( dmsBox::StrongFocus );
    layout25->addWidget( latBox );
    tabLayout_2->addLayout( layout25 );
    spacer5 = new TQSpacerItem( 20, 16, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    tabLayout_2->addItem( spacer5 );

    layout26 = new TQHBoxLayout( 0, 0, 6, "layout26"); 
    spacer4 = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout26->addItem( spacer4 );

    updateButton = new KPushButton( tab_2, "updateButton" );
    layout26->addWidget( updateButton );
    tabLayout_2->addLayout( layout26 );
    tabWidget2->insertTab( tab_2, TQString::fromLatin1("") );
    AltVsTimeUILayout->addWidget( tabWidget2 );
    languageChange();
    resize( TQSize(458, 209).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( tabWidget2, nameBox );
    setTabOrder( nameBox, raBox );
    setTabOrder( raBox, decBox );
    setTabOrder( decBox, epochName );
    setTabOrder( epochName, addButton );
    setTabOrder( addButton, browseButton );
    setTabOrder( browseButton, clearFieldsButton );
    setTabOrder( clearFieldsButton, clearButton );
    setTabOrder( clearButton, PlotList );
    setTabOrder( PlotList, cityButton );
    setTabOrder( cityButton, longBox );
    setTabOrder( longBox, latBox );
    setTabOrder( latBox, updateButton );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void AltVsTimeUI::languageChange()
{
    setCaption( tr2i18n( "Altitude vs. Time" ) );
    textLabel3->setText( tr2i18n( "Epoch:" ) );
    textLabel4->setText( tr2i18n( "Dec:" ) );
    textLabel2->setText( tr2i18n( "RA:" ) );
    TQToolTip::add( nameBox, tr2i18n( "Name of plotted object" ) );
    TQWhatsThis::add( nameBox, tr2i18n( "There are two ways to use this field:  \n"
"\n"
"1. Simply type the name of a known object and press the \"Plot\" button (or press Enter).  The object's Altitude vs. Time curve will be added to the plot, and its coordinates will be displayed below.\n"
"\n"
"2. Type a name label for a custom object.  You will also need to specify the RA and Dec coordinates of the object, and then press the \"Plot\" button to add its curve to the plot." ) );
    textLabel1->setText( tr2i18n( "Name:" ) );
    browseButton->setText( tr2i18n( "Find Object..." ) );
    addButton->setText( tr2i18n( "Plot" ) );
    clearFieldsButton->setText( tr2i18n( "Clear Fields" ) );
    clearButton->setText( tr2i18n( "Clear List" ) );
    tabWidget2->changeTab( tab, tr2i18n( "Sources" ) );
    textLabel5->setText( tr2i18n( "Date:" ) );
    cityButton->setText( tr2i18n( "Choose City..." ) );
    textLabel7->setText( tr2i18n( "Long.:" ) );
    textLabel6->setText( tr2i18n( "Lat.:" ) );
    updateButton->setText( tr2i18n( "Update" ) );
    tabWidget2->changeTab( tab_2, tr2i18n( "Date && Location" ) );
}

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

TQMetaObject *AltVsTimeUI::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_AltVsTimeUI( "AltVsTimeUI", &AltVsTimeUI::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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