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

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

#include "obslistwizardui.h"

#include <ntqvariant.h>
#include <tdelistview.h>
#include <knuminput.h>
#include <kpushbutton.h>
#include <tdelistbox.h>
#include <magnitudespinbox.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqwidgetstack.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include <ntqimage.h>
#include <ntqpixmap.h>

#include "libtdeedu/extdate/extdatetimeedit.h"
#include "dmsbox.h"
#include "magnitudespinbox.h"

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

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

    layout55 = new TQVBoxLayout( 0, 0, 6, "layout55"); 

    textLabel1 = new TQLabel( this, "textLabel1" );
    layout55->addWidget( textLabel1 );

    FilterList = new TDEListView( this, "FilterList" );
    FilterList->addColumn( tr2i18n( "Filter" ) );
    FilterList->setFullWidth( true );
    FilterList->setItemsMovable( false );
    layout55->addWidget( FilterList );
    layout79->addLayout( layout55 );

    layout12 = new TQVBoxLayout( 0, 0, 6, "layout12"); 

    textLabel1_2 = new TQLabel( this, "textLabel1_2" );
    textLabel1_2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, textLabel1_2->sizePolicy().hasHeightForWidth() ) );
    layout12->addWidget( textLabel1_2 );

    FilterStack = new TQWidgetStack( this, "FilterStack" );

    ObjTypePage = new TQWidget( FilterStack, "ObjTypePage" );
    ObjTypePageLayout = new TQVBoxLayout( ObjTypePage, 11, 6, "ObjTypePageLayout"); 

    textLabel2 = new TQLabel( ObjTypePage, "textLabel2" );
    ObjTypePageLayout->addWidget( textLabel2 );

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

    TypeList = new TDEListBox( ObjTypePage, "TypeList" );
    TypeList->setSelectionMode( TDEListBox::Multi );
    layout13->addWidget( TypeList );

    layout12_2 = new TQVBoxLayout( 0, 0, 6, "layout12_2"); 

    AllButton = new KPushButton( ObjTypePage, "AllButton" );
    layout12_2->addWidget( AllButton );

    NoneButton = new KPushButton( ObjTypePage, "NoneButton" );
    layout12_2->addWidget( NoneButton );

    DeepSkyButton = new KPushButton( ObjTypePage, "DeepSkyButton" );
    layout12_2->addWidget( DeepSkyButton );

    SolarSystemButton = new KPushButton( ObjTypePage, "SolarSystemButton" );
    layout12_2->addWidget( SolarSystemButton );
    spacer2 = new TQSpacerItem( 20, 90, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    layout12_2->addItem( spacer2 );
    layout13->addLayout( layout12_2 );
    ObjTypePageLayout->addLayout( layout13 );
    FilterStack->addWidget( ObjTypePage, 0 );

    ConstellationPage = new TQWidget( FilterStack, "ConstellationPage" );
    ConstellationPageLayout = new TQVBoxLayout( ConstellationPage, 11, 6, "ConstellationPageLayout"); 

    SelectByConstellation = new TQCheckBox( ConstellationPage, "SelectByConstellation" );
    ConstellationPageLayout->addWidget( SelectByConstellation );

    ConstellationList = new TDEListBox( ConstellationPage, "ConstellationList" );
    ConstellationList->setEnabled( false );
    ConstellationList->setSelectionMode( TDEListBox::Multi );
    ConstellationPageLayout->addWidget( ConstellationList );
    FilterStack->addWidget( ConstellationPage, 1 );

    RectRegionPage = new TQWidget( FilterStack, "RectRegionPage" );
    RectRegionPageLayout = new TQVBoxLayout( RectRegionPage, 11, 6, "RectRegionPageLayout"); 

    SelectByRect = new TQCheckBox( RectRegionPage, "SelectByRect" );
    RectRegionPageLayout->addWidget( SelectByRect );

    layout48 = new TQGridLayout( 0, 1, 1, 0, 6, "layout48"); 

    textLabel4_2_2 = new TQLabel( RectRegionPage, "textLabel4_2_2" );

    layout48->addWidget( textLabel4_2_2, 1, 2 );

    RAMin = new dmsBox( RectRegionPage, "RAMin" );
    RAMin->setEnabled( false );
    RAMin->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, RAMin->sizePolicy().hasHeightForWidth() ) );
    RAMin->setMinimumSize( TQSize( 0, 20 ) );

    layout48->addWidget( RAMin, 0, 1 );

    RAMax = new dmsBox( RectRegionPage, "RAMax" );
    RAMax->setEnabled( false );
    RAMax->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, RAMax->sizePolicy().hasHeightForWidth() ) );
    RAMax->setMinimumSize( TQSize( 0, 20 ) );

    layout48->addWidget( RAMax, 0, 3 );

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

    layout48->addWidget( textLabel4, 0, 0 );

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

    layout48->addWidget( textLabel4_3, 1, 0 );

    textLabel4_2 = new TQLabel( RectRegionPage, "textLabel4_2" );

    layout48->addWidget( textLabel4_2, 0, 2 );

    DecMin = new dmsBox( RectRegionPage, "DecMin" );
    DecMin->setEnabled( false );
    DecMin->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, DecMin->sizePolicy().hasHeightForWidth() ) );
    DecMin->setMinimumSize( TQSize( 0, 20 ) );

    layout48->addWidget( DecMin, 1, 1 );

    DecMax = new dmsBox( RectRegionPage, "DecMax" );
    DecMax->setEnabled( false );
    DecMax->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, DecMax->sizePolicy().hasHeightForWidth() ) );
    DecMax->setMinimumSize( TQSize( 0, 20 ) );

    layout48->addWidget( DecMax, 1, 3 );
    RectRegionPageLayout->addLayout( layout48 );
    spacer1 = new TQSpacerItem( 20, 215, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    RectRegionPageLayout->addItem( spacer1 );
    FilterStack->addWidget( RectRegionPage, 2 );

    CircRegionPage = new TQWidget( FilterStack, "CircRegionPage" );
    CircRegionPageLayout = new TQVBoxLayout( CircRegionPage, 11, 6, "CircRegionPageLayout"); 

    SelectByCirc = new TQCheckBox( CircRegionPage, "SelectByCirc" );
    CircRegionPageLayout->addWidget( SelectByCirc );

    layout9 = new TQGridLayout( 0, 1, 1, 0, 6, "layout9"); 

    textLabel1_4 = new TQLabel( CircRegionPage, "textLabel1_4" );

    layout9->addWidget( textLabel1_4, 0, 0 );

    textLabel2_3 = new TQLabel( CircRegionPage, "textLabel2_3" );

    layout9->addWidget( textLabel2_3, 1, 0 );

    textLabel3_3 = new TQLabel( CircRegionPage, "textLabel3_3" );

    layout9->addWidget( textLabel3_3, 2, 0 );

    RA = new dmsBox( CircRegionPage, "RA" );
    RA->setEnabled( false );
    RA->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, RA->sizePolicy().hasHeightForWidth() ) );
    RA->setMinimumSize( TQSize( 0, 20 ) );

    layout9->addWidget( RA, 0, 1 );

    Dec = new dmsBox( CircRegionPage, "Dec" );
    Dec->setEnabled( false );
    Dec->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, Dec->sizePolicy().hasHeightForWidth() ) );
    Dec->setMinimumSize( TQSize( 0, 20 ) );

    layout9->addWidget( Dec, 1, 1 );

    Radius = new KDoubleNumInput( CircRegionPage, "Radius" );
    Radius->setEnabled( false );
    Radius->setValue( 1 );
    Radius->setMaxValue( 180 );

    layout9->addWidget( Radius, 2, 1 );
    CircRegionPageLayout->addLayout( layout9 );
    spacer9 = new TQSpacerItem( 20, 170, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    CircRegionPageLayout->addItem( spacer9 );
    FilterStack->addWidget( CircRegionPage, 3 );

    ObsDatePage = new TQWidget( FilterStack, "ObsDatePage" );
    ObsDatePageLayout = new TQVBoxLayout( ObsDatePage, 11, 6, "ObsDatePageLayout"); 

    SelectByDate = new TQCheckBox( ObsDatePage, "SelectByDate" );
    ObsDatePageLayout->addWidget( SelectByDate );

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

    Date = new ExtDateEdit( ObsDatePage, "Date" );
    Date->setMinimumSize( TQSize( 160, 0 ) );
    layout6->addWidget( Date );
    spacer6 = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout6->addItem( spacer6 );
    ObsDatePageLayout->addLayout( layout6 );

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

    textLabel2_2 = new TQLabel( ObsDatePage, "textLabel2_2" );
    textLabel2_2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)5, 0, 0, textLabel2_2->sizePolicy().hasHeightForWidth() ) );
    layout4->addWidget( textLabel2_2 );

    LocationLabel = new TQLabel( ObsDatePage, "LocationLabel" );
    TQFont LocationLabel_font(  LocationLabel->font() );
    LocationLabel_font.setBold( true );
    LocationLabel->setFont( LocationLabel_font ); 
    layout4->addWidget( LocationLabel );
    ObsDatePageLayout->addLayout( layout4 );

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

    LocationButton = new KPushButton( ObsDatePage, "LocationButton" );
    LocationButton->setEnabled( false );
    layout5_2->addWidget( LocationButton );
    spacer4 = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout5_2->addItem( spacer4 );
    ObsDatePageLayout->addLayout( layout5_2 );
    spacer5 = new TQSpacerItem( 20, 176, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    ObsDatePageLayout->addItem( spacer5 );
    FilterStack->addWidget( ObsDatePage, 4 );

    MagLimitPage = new TQWidget( FilterStack, "MagLimitPage" );
    MagLimitPageLayout = new TQVBoxLayout( MagLimitPage, 11, 6, "MagLimitPageLayout"); 

    SelectByMag = new TQCheckBox( MagLimitPage, "SelectByMag" );
    MagLimitPageLayout->addWidget( SelectByMag );

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

    Mag = new MagnitudeSpinBox( MagLimitPage, "Mag" );
    Mag->setEnabled( false );
    layout36->addWidget( Mag );

    textLabel4_4 = new TQLabel( MagLimitPage, "textLabel4_4" );
    layout36->addWidget( textLabel4_4 );
    spacer8 = new TQSpacerItem( 295, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout36->addItem( spacer8 );
    MagLimitPageLayout->addLayout( layout36 );

    ExcludeNoMag = new TQCheckBox( MagLimitPage, "ExcludeNoMag" );
    ExcludeNoMag->setEnabled( false );
    ExcludeNoMag->setChecked( true );
    MagLimitPageLayout->addWidget( ExcludeNoMag );
    spacer7 = new TQSpacerItem( 20, 179, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    MagLimitPageLayout->addItem( spacer7 );
    FilterStack->addWidget( MagLimitPage, 5 );

    RegionPage = new TQWidget( FilterStack, "RegionPage" );
    RegionPageLayout = new TQVBoxLayout( RegionPage, 11, 6, "RegionPageLayout"); 

    textLabel3 = new TQLabel( RegionPage, "textLabel3" );
    textLabel3->setAlignment( int( TQLabel::AlignTop ) );
    RegionPageLayout->addWidget( textLabel3 );
    FilterStack->addWidget( RegionPage, 6 );
    layout12->addWidget( FilterStack );
    layout79->addLayout( layout12 );
    ObsListWizardUILayout->addLayout( layout79 );

    CountLabel = new TQLabel( this, "CountLabel" );
    CountLabel->setFrameShape( TQLabel::Box );
    CountLabel->setFrameShadow( TQLabel::Sunken );
    ObsListWizardUILayout->addWidget( CountLabel );
    languageChange();
    resize( TQSize(763, 403).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void ObsListWizardUI::languageChange()
{
    setCaption( tr2i18n( "Observing List Wizard" ) );
    textLabel1->setText( tr2i18n( "Selection filters:" ) );
    FilterList->header()->setLabel( 0, tr2i18n( "Filter" ) );
    FilterList->clear();
    TQListViewItem * item = new TQListViewItem( FilterList, 0 );
    item->setText( 0, tr2i18n( "1. Object type(s)" ) );

    TQListViewItem * item_2 = new TQListViewItem( FilterList, item );
    item_2->setOpen( true );
    item = new TQListViewItem( item_2, item );
    item->setText( 0, tr2i18n( "a. In constellation(s)" ) );
    item_2->setOpen( true );
    item = new TQListViewItem( item_2, item );
    item->setText( 0, tr2i18n( "b. Rectangular" ) );
    item_2->setOpen( true );
    item = new TQListViewItem( item_2, item );
    item->setText( 0, tr2i18n( "c. Circular" ) );
    item_2->setText( 0, tr2i18n( "2. Region" ) );

    item = new TQListViewItem( FilterList, item_2 );
    item->setText( 0, tr2i18n( "3. Magnitude limit" ) );

    textLabel1_2->setText( tr2i18n( "Filter arguments:" ) );
    textLabel2->setText( tr2i18n( "Select object types:" ) );
    TypeList->clear();
    TypeList->insertItem( tr2i18n( "Stars" ) );
    TypeList->insertItem( tr2i18n( "Sun, Moon, Planets" ) );
    TypeList->insertItem( tr2i18n( "Comets" ) );
    TypeList->insertItem( tr2i18n( "Asteroids" ) );
    TypeList->insertItem( tr2i18n( "Open Clusters" ) );
    TypeList->insertItem( tr2i18n( "Globular Clusters" ) );
    TypeList->insertItem( tr2i18n( "Gaseous Nebulae" ) );
    TypeList->insertItem( tr2i18n( "Planetary Nebulae" ) );
    TypeList->insertItem( tr2i18n( "Galaxies" ) );
    AllButton->setText( tr2i18n( "All" ) );
    NoneButton->setText( tr2i18n( "&None" ) );
    DeepSkyButton->setText( tr2i18n( "Deep-Sk&y" ) );
    SolarSystemButton->setText( tr2i18n( "Sol&ar System" ) );
    SelectByConstellation->setText( tr2i18n( "Select objects in constell&ation(s):" ) );
    SelectByRect->setText( tr2i18n( "Select objects in region:" ) );
    textLabel4_2_2->setText( tr2i18n( "to" ) );
    textLabel4->setText( tr2i18n( "RA:" ) );
    textLabel4_3->setText( tr2i18n( "Dec:" ) );
    textLabel4_2->setText( tr2i18n( "to" ) );
    SelectByCirc->setText( tr2i18n( "Select objects within circle:" ) );
    textLabel1_4->setText( tr2i18n( "Center RA:" ) );
    textLabel2_3->setText( tr2i18n( "Center Dec:" ) );
    textLabel3_3->setText( tr2i18n( "Radius (degrees):" ) );
    SelectByDate->setText( tr2i18n( "Select objects observ&able on:" ) );
    textLabel2_2->setText( tr2i18n( "from" ) );
    LocationLabel->setText( tr2i18n( "Tucson, Arizona, USA" ) );
    LocationButton->setText( tr2i18n( "Cha&nge Location" ) );
    SelectByMag->setText( tr2i18n( "Select objects &brighter than:" ) );
    textLabel4_4->setText( tr2i18n( "mag" ) );
    ExcludeNoMag->setText( tr2i18n( "Exclude objects which\n"
"have &no magnitude" ) );
    textLabel3->setText( tr2i18n( "There are three ways to select objects from\n"
"a specific region on the sky:\n"
"\n"
"a. select objects in a constellation\n"
"b. select objects in a rectangular region\n"
"c. select objects in a circular region\n"
"\n"
"Choose one of these sub-items to\n"
"select from a region on the sky." ) );
    CountLabel->setText( tr2i18n( "Current selection: 100 objects" ) );
}

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

TQMetaObject *ObsListWizardUI::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_ObsListWizardUI( "ObsListWizardUI", &ObsListWizardUI::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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