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

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

#include "observinglistui.h"

#include <ntqvariant.h>
#include <kpushbutton.h>
#include <tdelistview.h>
#include <tdelistbox.h>
#include <ktextedit.h>
#include <ntqpushbutton.h>
#include <ntqwidgetstack.h>
#include <ntqlabel.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

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

    OpenButton = new KPushButton( this, "OpenButton" );
    OpenButton->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, OpenButton->sizePolicy().hasHeightForWidth() ) );
    OpenButton->setMinimumSize( TQSize( 32, 32 ) );
    OpenButton->setMaximumSize( TQSize( 32, 32 ) );
    layout68->addWidget( OpenButton );

    SaveButton = new KPushButton( this, "SaveButton" );
    SaveButton->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, SaveButton->sizePolicy().hasHeightForWidth() ) );
    SaveButton->setMinimumSize( TQSize( 32, 32 ) );
    SaveButton->setMaximumSize( TQSize( 32, 32 ) );
    layout68->addWidget( SaveButton );

    SaveAsButton = new KPushButton( this, "SaveAsButton" );
    SaveAsButton->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, SaveAsButton->sizePolicy().hasHeightForWidth() ) );
    SaveAsButton->setMinimumSize( TQSize( 32, 32 ) );
    SaveAsButton->setMaximumSize( TQSize( 32, 32 ) );
    layout68->addWidget( SaveAsButton );

    WizardButton = new KPushButton( this, "WizardButton" );
    WizardButton->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, WizardButton->sizePolicy().hasHeightForWidth() ) );
    WizardButton->setMinimumSize( TQSize( 32, 32 ) );
    WizardButton->setMaximumSize( TQSize( 32, 32 ) );
    layout68->addWidget( WizardButton );
    spacer2 = new TQSpacerItem( 350, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout68->addItem( spacer2 );

    MiniButton = new KPushButton( this, "MiniButton" );
    MiniButton->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, MiniButton->sizePolicy().hasHeightForWidth() ) );
    MiniButton->setMinimumSize( TQSize( 32, 32 ) );
    MiniButton->setMaximumSize( TQSize( 32, 32 ) );
    layout68->addWidget( MiniButton );
    ObservingListUILayout->addLayout( layout68 );

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

    CenterButton = new KPushButton( this, "CenterButton" );
    CenterButton->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, CenterButton->sizePolicy().hasHeightForWidth() ) );
    layout4->addWidget( CenterButton );

    ScopeButton = new KPushButton( this, "ScopeButton" );
    ScopeButton->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, ScopeButton->sizePolicy().hasHeightForWidth() ) );
    layout4->addWidget( ScopeButton );

    DetailsButton = new KPushButton( this, "DetailsButton" );
    DetailsButton->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, DetailsButton->sizePolicy().hasHeightForWidth() ) );
    layout4->addWidget( DetailsButton );

    AVTButton = new KPushButton( this, "AVTButton" );
    AVTButton->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, AVTButton->sizePolicy().hasHeightForWidth() ) );
    layout4->addWidget( AVTButton );

    RemoveButton = new KPushButton( this, "RemoveButton" );
    RemoveButton->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, RemoveButton->sizePolicy().hasHeightForWidth() ) );
    layout4->addWidget( RemoveButton );
    spacer1 = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout4->addItem( spacer1 );
    ObservingListUILayout->addLayout( layout4 );

    TableStack = new TQWidgetStack( this, "TableStack" );
    TableStack->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)7, 0, 1, TableStack->sizePolicy().hasHeightForWidth() ) );

    WStackPage = new TQWidget( TableStack, "WStackPage" );
    WStackPageLayout = new TQVBoxLayout( WStackPage, 0, 6, "WStackPageLayout"); 

    FullTable = new TDEListView( WStackPage, "FullTable" );
    FullTable->addColumn( tr2i18n( "Name" ) );
    FullTable->addColumn( tr2i18n( "RA" ) );
    FullTable->addColumn( tr2i18n( "Dec" ) );
    FullTable->addColumn( tr2i18n( "Mag" ) );
    FullTable->addColumn( tr2i18n( "Type" ) );
    FullTable->setProperty( "selectionMode", "Extended" );
    FullTable->setAllColumnsShowFocus( true );
    FullTable->setShowSortIndicator( true );
    FullTable->setResizeMode( TDEListView::AllColumns );
    WStackPageLayout->addWidget( FullTable );
    TableStack->addWidget( WStackPage, 0 );

    WStackPage_2 = new TQWidget( TableStack, "WStackPage_2" );
    WStackPageLayout_2 = new TQVBoxLayout( WStackPage_2, 0, 6, "WStackPageLayout_2"); 

    TinyTable = new TDEListBox( WStackPage_2, "TinyTable" );
    TinyTable->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)7, 0, 4, TinyTable->sizePolicy().hasHeightForWidth() ) );
    TinyTable->setMinimumSize( TQSize( 0, 100 ) );
    WStackPageLayout_2->addWidget( TinyTable );
    TableStack->addWidget( WStackPage_2, 1 );
    ObservingListUILayout->addWidget( TableStack );

    NotesLabel = new TQLabel( this, "NotesLabel" );
    NotesLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, NotesLabel->sizePolicy().hasHeightForWidth() ) );
    TQFont NotesLabel_font(  NotesLabel->font() );
    NotesLabel_font.setItalic( true );
    NotesLabel->setFont( NotesLabel_font ); 
    NotesLabel->setAlignment( int( TQLabel::AlignVCenter ) );
    ObservingListUILayout->addWidget( NotesLabel );

    NotesEdit = new KTextEdit( this, "NotesEdit" );
    NotesEdit->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 1, NotesEdit->sizePolicy().hasHeightForWidth() ) );
    NotesEdit->setMinimumSize( TQSize( 0, 100 ) );
    NotesEdit->setMaximumSize( TQSize( 32767, 160 ) );
    ObservingListUILayout->addWidget( NotesEdit );
    languageChange();
    resize( TQSize(543, 506).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void ObservingListUI::languageChange()
{
    setCaption( tr2i18n( "Observing List" ) );
    OpenButton->setText( TQString::null );
    TQToolTip::add( OpenButton, tr2i18n( "Open observing list" ) );
    TQWhatsThis::add( OpenButton, tr2i18n( "Load an observing list from disk" ) );
    SaveButton->setText( TQString::null );
    TQToolTip::add( SaveButton, tr2i18n( "Save observing list" ) );
    TQWhatsThis::add( SaveButton, tr2i18n( "Save the current observing list to disk" ) );
    SaveAsButton->setText( TQString::null );
    TQToolTip::add( SaveAsButton, tr2i18n( "Save observing list as..." ) );
    TQWhatsThis::add( SaveAsButton, tr2i18n( "Save the current observing list to disk, specifying the filename" ) );
    WizardButton->setText( TQString::null );
    TQToolTip::add( WizardButton, tr2i18n( "Observing List Wizard" ) );
    TQWhatsThis::add( WizardButton, tr2i18n( "The list wizard helps you construct observing lists based on filtering by object type, position on the sky, and magnitude." ) );
    MiniButton->setText( TQString::null );
    TQToolTip::add( MiniButton, tr2i18n( "Make window small" ) );
    TQWhatsThis::add( MiniButton, tr2i18n( "This button toggles between large and small states.  The small state may be useful if you want the Observing list open while working in the main window." ) );
    CenterButton->setText( tr2i18n( "Ce&nter" ) );
    TQToolTip::add( CenterButton, tr2i18n( "Center sky map on highlighted object" ) );
    TQWhatsThis::add( CenterButton, tr2i18n( "Center the sky map on the highlighted object in the list" ) );
    ScopeButton->setText( tr2i18n( "Scope" ) );
    TQToolTip::add( ScopeButton, tr2i18n( "Point telescope at highlighted object" ) );
    TQWhatsThis::add( ScopeButton, tr2i18n( "Point the telescope at the highlighted object in the list" ) );
    DetailsButton->setText( tr2i18n( "Details" ) );
    TQToolTip::add( DetailsButton, tr2i18n( "Show details for highlighted object" ) );
    TQWhatsThis::add( DetailsButton, tr2i18n( "Open the Details window for the highlighted object" ) );
    AVTButton->setText( tr2i18n( "&Alt vs Time" ) );
    TQToolTip::add( AVTButton, tr2i18n( "Show altitude plot" ) );
    TQWhatsThis::add( AVTButton, tr2i18n( "Open the Altitude vs. Time tool, with curves for the highlighted objects shown" ) );
    RemoveButton->setText( tr2i18n( "Remove" ) );
    TQToolTip::add( RemoveButton, tr2i18n( "Remove from list" ) );
    TQWhatsThis::add( RemoveButton, tr2i18n( "Remove the highlighted object(s) from the observing list" ) );
    FullTable->header()->setLabel( 0, tr2i18n( "Name" ) );
    FullTable->header()->setLabel( 1, tr2i18n( "RA" ) );
    FullTable->header()->setLabel( 2, tr2i18n( "Dec" ) );
    FullTable->header()->setLabel( 3, tr2i18n( "Mag" ) );
    FullTable->header()->setLabel( 4, tr2i18n( "Type" ) );
    TQWhatsThis::add( FullTable, tr2i18n( "Table showing the current observing list.  The list can be sorted by any of the data columns" ) );
    NotesLabel->setText( tr2i18n( "observing notes for object:" ) );
    TQWhatsThis::add( NotesEdit, tr2i18n( "Your observing notes for the highlighted object" ) );
}

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

TQMetaObject *ObservingListUI::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_ObservingListUI( "ObservingListUI", &ObservingListUI::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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