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

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

#include "focusdialogdlg.h"

#include <ntqvariant.h>
#include <dmsbox.h>
#include <ntqpushbutton.h>
#include <ntqtabwidget.h>
#include <ntqlabel.h>
#include <ntqlineedit.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    fdTab = new TQTabWidget( this, "fdTab" );

    rdTab = new TQWidget( fdTab, "rdTab" );
    rdTabLayout = new TQGridLayout( rdTab, 1, 1, 11, 6, "rdTabLayout"); 

    raLabel = new TQLabel( rdTab, "raLabel" );

    rdTabLayout->addWidget( raLabel, 0, 0 );

    raBox = new dmsBox( rdTab, "raBox" );
    raBox->setProperty( "focusPolicy", "StrongFocus" );

    rdTabLayout->addWidget( raBox, 0, 1 );

    decBox = new dmsBox( rdTab, "decBox" );
    decBox->setProperty( "focusPolicy", "StrongFocus" );

    rdTabLayout->addWidget( decBox, 1, 1 );

    decLabel = new TQLabel( rdTab, "decLabel" );

    rdTabLayout->addWidget( decLabel, 1, 0 );

    epochLabel = new TQLabel( rdTab, "epochLabel" );

    rdTabLayout->addWidget( epochLabel, 2, 0 );

    epochName = new TQLineEdit( rdTab, "epochName" );

    rdTabLayout->addWidget( epochName, 2, 1 );
    fdTab->insertTab( rdTab, TQString::fromLatin1("") );

    aaTab = new TQWidget( fdTab, "aaTab" );
    aaTabLayout = new TQGridLayout( aaTab, 1, 1, 11, 6, "aaTabLayout"); 

    azLabel = new TQLabel( aaTab, "azLabel" );

    aaTabLayout->addWidget( azLabel, 0, 0 );

    altLabel = new TQLabel( aaTab, "altLabel" );

    aaTabLayout->addWidget( altLabel, 1, 0 );

    azBox = new dmsBox( aaTab, "azBox" );
    azBox->setProperty( "focusPolicy", "StrongFocus" );

    aaTabLayout->addWidget( azBox, 0, 1 );
    spacer1 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    aaTabLayout->addItem( spacer1, 2, 0 );
    spacer2 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    aaTabLayout->addItem( spacer2, 2, 1 );

    altBox = new dmsBox( aaTab, "altBox" );
    altBox->setProperty( "focusPolicy", "StrongFocus" );

    aaTabLayout->addWidget( altBox, 1, 1 );
    fdTab->insertTab( aaTab, TQString::fromLatin1("") );
    FocusDialogDlgLayout->addWidget( fdTab );
    languageChange();
    resize( TQSize(208, 146).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void FocusDialogDlg::languageChange()
{
    raLabel->setProperty( "text", tr2i18n( "New RA:" ) );
    TQToolTip::add( raBox, tr2i18n( "Enter new Right Ascension" ) );
    TQToolTip::add( decBox, tr2i18n( "Enter new Declination" ) );
    decLabel->setProperty( "text", tr2i18n( "New dec:" ) );
    epochLabel->setProperty( "text", tr2i18n( "Epoch:" ) );
    epochName->setProperty( "text", tr2i18n( "2000.0" ) );
    TQToolTip::add( epochName, tr2i18n( "Epoch for the RA/Dec coordinates" ) );
    fdTab->changeTab( rdTab, tr2i18n( "RA/Dec" ) );
    azLabel->setProperty( "text", tr2i18n( "New azimuth:" ) );
    altLabel->setProperty( "text", tr2i18n( "New altitude:" ) );
    TQToolTip::add( azBox, tr2i18n( "Enter new Azimuth" ) );
    TQToolTip::add( altBox, tr2i18n( "Enter new Altitude" ) );
    fdTab->changeTab( aaTab, tr2i18n( "Az/Alt" ) );
}

void FocusDialogDlg::checkLineEdits()
{
    tqWarning( "FocusDialogDlg::checkLineEdits(): Not implemented yet" );
}

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

TQMetaObject *FocusDialogDlg::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_FocusDialogDlg( "FocusDialogDlg", &FocusDialogDlg::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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