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

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

#include "opscatalogui.h"

#include <ntqvariant.h>
#include <kpushbutton.h>
#include <magnitudespinbox.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqcheckbox.h>
#include <ntqlabel.h>
#include <ntqheader.h>
#include <ntqlistview.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "magnitudespinbox.h"

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

    groupBox1 = new TQGroupBox( this, "groupBox1" );
    groupBox1->setFrameShape( TQGroupBox::GroupBoxPanel );
    groupBox1->setFrameShadow( TQGroupBox::Sunken );
    groupBox1->setColumnLayout(0, TQt::Vertical );
    groupBox1->layout()->setSpacing( 6 );
    groupBox1->layout()->setMargin( 11 );
    groupBox1Layout = new TQVBoxLayout( groupBox1->layout() );
    groupBox1Layout->setAlignment( TQt::AlignTop );

    kcfg_ShowStars = new TQCheckBox( groupBox1, "kcfg_ShowStars" );
    groupBox1Layout->addWidget( kcfg_ShowStars );

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

    kcfg_MagLimitDrawStar = new MagnitudeSpinBox( groupBox1, "kcfg_MagLimitDrawStar" );
    kcfg_MagLimitDrawStar->setFocusPolicy( MagnitudeSpinBox::StrongFocus );

    layout8->addWidget( kcfg_MagLimitDrawStar, 0, 1 );

    textLabelMag1 = new TQLabel( groupBox1, "textLabelMag1" );

    layout8->addWidget( textLabelMag1, 0, 2 );

    textLabelMagStarsZoomOut = new TQLabel( groupBox1, "textLabelMagStarsZoomOut" );

    layout8->addWidget( textLabelMagStarsZoomOut, 1, 0 );

    textLabelMag3 = new TQLabel( groupBox1, "textLabelMag3" );

    layout8->addWidget( textLabelMag3, 1, 2 );

    kcfg_MagLimitDrawStarZoomOut = new MagnitudeSpinBox( groupBox1, "kcfg_MagLimitDrawStarZoomOut" );
    kcfg_MagLimitDrawStarZoomOut->setFocusPolicy( MagnitudeSpinBox::StrongFocus );

    layout8->addWidget( kcfg_MagLimitDrawStarZoomOut, 1, 1 );

    textLabelMagStars = new TQLabel( groupBox1, "textLabelMagStars" );

    layout8->addWidget( textLabelMagStars, 0, 0 );
    spacer9 = new TQSpacerItem( 65, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout8->addItem( spacer9, 0, 3 );
    spacer7 = new TQSpacerItem( 65, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout8->addItem( spacer7, 1, 3 );
    groupBox1Layout->addLayout( layout8 );
    spacer8 = new TQSpacerItem( 20, 16, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    groupBox1Layout->addItem( spacer8 );

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

    textLabelMagStarInfo = new TQLabel( groupBox1, "textLabelMagStarInfo" );
    layout9->addWidget( textLabelMagStarInfo );

    kcfg_MagLimitDrawStarInfo = new MagnitudeSpinBox( groupBox1, "kcfg_MagLimitDrawStarInfo" );
    kcfg_MagLimitDrawStarInfo->setFocusPolicy( MagnitudeSpinBox::StrongFocus );
    layout9->addWidget( kcfg_MagLimitDrawStarInfo );

    textLabelMag2 = new TQLabel( groupBox1, "textLabelMag2" );
    layout9->addWidget( textLabelMag2 );
    spacer10 = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout9->addItem( spacer10 );
    groupBox1Layout->addLayout( layout9 );

    layout7 = new TQHBoxLayout( 0, 0, 6, "layout7"); 
    spacer3 = new TQSpacerItem( 20, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout7->addItem( spacer3 );

    kcfg_ShowStarNames = new TQCheckBox( groupBox1, "kcfg_ShowStarNames" );
    layout7->addWidget( kcfg_ShowStarNames );
    groupBox1Layout->addLayout( layout7 );

    layout8_2 = new TQHBoxLayout( 0, 0, 6, "layout8_2"); 
    spacer3_2 = new TQSpacerItem( 20, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout8_2->addItem( spacer3_2 );

    kcfg_ShowStarMagnitudes = new TQCheckBox( groupBox1, "kcfg_ShowStarMagnitudes" );
    layout8_2->addWidget( kcfg_ShowStarMagnitudes );
    groupBox1Layout->addLayout( layout8_2 );
    OpsCatalogUILayout->addWidget( groupBox1 );

    groupBox2 = new TQGroupBox( this, "groupBox2" );
    groupBox2->setColumnLayout(0, TQt::Vertical );
    groupBox2->layout()->setSpacing( 6 );
    groupBox2->layout()->setMargin( 11 );
    groupBox2Layout = new TQVBoxLayout( groupBox2->layout() );
    groupBox2Layout->setAlignment( TQt::AlignTop );

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

    CatalogList = new TQListView( groupBox2, "CatalogList" );
    CatalogList->addColumn( tr2i18n( "Show Catalog" ) );
    CatalogList->setVScrollBarMode( TQListView::AlwaysOn );
    layout15->addWidget( CatalogList );

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

    AddCatalog = new KPushButton( groupBox2, "AddCatalog" );
    layout14->addWidget( AddCatalog );

    LoadCatalog = new KPushButton( groupBox2, "LoadCatalog" );
    layout14->addWidget( LoadCatalog );

    RemoveCatalog = new KPushButton( groupBox2, "RemoveCatalog" );
    RemoveCatalog->setEnabled( false );
    layout14->addWidget( RemoveCatalog );
    spacer10_2 = new TQSpacerItem( 20, 68, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    layout14->addItem( spacer10_2 );
    layout15->addLayout( layout14 );
    groupBox2Layout->addLayout( layout15 );

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

    kcfg_MagLimitDrawDeepSky = new MagnitudeSpinBox( groupBox2, "kcfg_MagLimitDrawDeepSky" );
    kcfg_MagLimitDrawDeepSky->setEnabled( false );
    kcfg_MagLimitDrawDeepSky->setFocusPolicy( MagnitudeSpinBox::StrongFocus );

    layout8_2_2->addWidget( kcfg_MagLimitDrawDeepSky, 0, 1 );

    textLabelMag1_2 = new TQLabel( groupBox2, "textLabelMag1_2" );

    layout8_2_2->addWidget( textLabelMag1_2, 0, 2 );

    textLabelMagStarsZoomOut_2 = new TQLabel( groupBox2, "textLabelMagStarsZoomOut_2" );

    layout8_2_2->addWidget( textLabelMagStarsZoomOut_2, 1, 0 );

    textLabelMag3_2 = new TQLabel( groupBox2, "textLabelMag3_2" );

    layout8_2_2->addWidget( textLabelMag3_2, 1, 2 );

    kcfg_MagLimitDrawDeepSkyZoomOut = new MagnitudeSpinBox( groupBox2, "kcfg_MagLimitDrawDeepSkyZoomOut" );
    kcfg_MagLimitDrawDeepSkyZoomOut->setEnabled( false );
    kcfg_MagLimitDrawDeepSkyZoomOut->setFocusPolicy( MagnitudeSpinBox::StrongFocus );

    layout8_2_2->addWidget( kcfg_MagLimitDrawDeepSkyZoomOut, 1, 1 );

    textLabelMagStars_2 = new TQLabel( groupBox2, "textLabelMagStars_2" );

    layout8_2_2->addWidget( textLabelMagStars_2, 0, 0 );
    spacer9_2 = new TQSpacerItem( 65, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout8_2_2->addItem( spacer9_2, 0, 3 );
    spacer7_2 = new TQSpacerItem( 65, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout8_2_2->addItem( spacer7_2, 1, 3 );
    groupBox2Layout->addLayout( layout8_2_2 );
    OpsCatalogUILayout->addWidget( groupBox2 );
    spacer2 = new TQSpacerItem( 20, 16, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    OpsCatalogUILayout->addItem( spacer2 );
    languageChange();
    resize( TQSize(542, 586).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void OpsCatalogUI::languageChange()
{
    setCaption( tr2i18n( "OpsCatalog" ) );
    groupBox1->setTitle( tr2i18n( "Stars" ) );
    kcfg_ShowStars->setText( tr2i18n( "Hipparcos star catalog" ) );
    TQToolTip::add( kcfg_ShowStars, tr2i18n( "Draw stars?" ) );
    TQWhatsThis::add( kcfg_ShowStars, tr2i18n( "When selected, stars are drawn in the skymap.  Use the other options in this box to control how many stars are drawn." ) );
    TQToolTip::add( kcfg_MagLimitDrawStar, tr2i18n( "The faint limit when zoomed in" ) );
    TQWhatsThis::add( kcfg_MagLimitDrawStar, tr2i18n( "Set the faintest magnitude that will be drawn at the maximum zoom level.  The faint limit varies smoothly between these two values, as the zoom level changes.\n"
"\n"
"Magnitude is a measure of brightness; the larger the number, the fainter the object.  Magnitude 6.0 is about as faint as the unaided human eye can see." ) );
    textLabelMag1->setText( tr2i18n( "mag" ) );
    textLabelMagStarsZoomOut->setText( tr2i18n( "Faint limit zoomed out:" ) );
    textLabelMag3->setText( tr2i18n( "mag" ) );
    TQToolTip::add( kcfg_MagLimitDrawStarZoomOut, tr2i18n( "The faint limit when zoomed out" ) );
    TQWhatsThis::add( kcfg_MagLimitDrawStarZoomOut, tr2i18n( "Set the faintest magnitude that will be drawn at the minimum zoom level.  The faint limit varies smoothly between these two values, as the zoom level changes.\n"
"\n"
"Magnitude is a measure of brightness; the larger the number, the fainter the object.  Magnitude 6.0 is about as faint as the unaided human eye can see." ) );
    textLabelMagStars->setText( tr2i18n( "Faint limit zoomed in:" ) );
    textLabelMagStarInfo->setText( tr2i18n( "For stars brighter than:" ) );
    TQToolTip::add( kcfg_MagLimitDrawStarInfo, tr2i18n( "Faint limit for name labels" ) );
    TQWhatsThis::add( kcfg_MagLimitDrawStarInfo, tr2i18n( "Sets the faintest <b>magnitude</b> for which name and magnitude labels may be attached to stars.  Magnitude is a measure of brightness; the larger the number, the fainter the object.  Magnitude 6.0 is about as faint as the unaided human eye can see." ) );
    textLabelMag2->setText( tr2i18n( "mag" ) );
    kcfg_ShowStarNames->setText( tr2i18n( "Show &name" ) );
    TQToolTip::add( kcfg_ShowStarNames, tr2i18n( "Attach name labels to bright stars?" ) );
    TQWhatsThis::add( kcfg_ShowStarNames, tr2i18n( "When checked, name labels are attached to the brighter stars." ) );
    kcfg_ShowStarMagnitudes->setText( tr2i18n( "Show ma&gnitude" ) );
    TQToolTip::add( kcfg_ShowStarMagnitudes, tr2i18n( "Attach magnitude labels to bright stars?" ) );
    TQWhatsThis::add( kcfg_ShowStarMagnitudes, tr2i18n( "When checked, magnitude labels are attached to the brighter stars." ) );
    groupBox2->setTitle( tr2i18n( "Deep-Sky Objects" ) );
    CatalogList->header()->setLabel( 0, tr2i18n( "Show Catalog" ) );
    TQToolTip::add( CatalogList, tr2i18n( "List of other catalogs" ) );
    TQWhatsThis::add( CatalogList, tr2i18n( "The list of catalogs available, other than the star catalog.  By default, the list includes the Messier, NGC and IC catalogs.  You can add your own object catalogs as well." ) );
    AddCatalog->setText( tr2i18n( "Import Catalog..." ) );
    TQToolTip::add( AddCatalog, tr2i18n( "Create a custom object catalog" ) );
    TQWhatsThis::add( AddCatalog, tr2i18n( "Press this button to create a custom object catalog.  Use this button instead of \"Load Catalog\", even if you already have a data file.  We will add a header to your data file to create the catalog." ) );
    LoadCatalog->setText( tr2i18n( "Load Catalog..." ) );
    TQToolTip::add( LoadCatalog, tr2i18n( "Load an existing user catalog" ) );
    TQWhatsThis::add( LoadCatalog, tr2i18n( "Load an existing custom catalog.  Only use this button if you have a catalog file that was created by KStars (or one that has the proper header)." ) );
    RemoveCatalog->setText( tr2i18n( "Remove Catalog" ) );
    TQToolTip::add( RemoveCatalog, tr2i18n( "Remove a custom catalog" ) );
    TQWhatsThis::add( RemoveCatalog, tr2i18n( "Press this button to remove a custom object catalog that you had added previously.  You cannot remove the Messier, NGC or IC catalogs with this button." ) );
    TQToolTip::add( kcfg_MagLimitDrawDeepSky, tr2i18n( "The faint limit when zoomed in" ) );
    TQWhatsThis::add( kcfg_MagLimitDrawDeepSky, tr2i18n( "Set the faintest magnitude that will be drawn at the maximum zoom level.  The faint limit varies smoothly between these two values, as the zoom level changes.\n"
"\n"
"Magnitude is a measure of brightness; the larger the number, the fainter the object.  Magnitude 6.0 is about as faint as the unaided human eye can see." ) );
    textLabelMag1_2->setText( tr2i18n( "mag" ) );
    textLabelMagStarsZoomOut_2->setText( tr2i18n( "Faint limit zoomed out:" ) );
    textLabelMag3_2->setText( tr2i18n( "mag" ) );
    TQToolTip::add( kcfg_MagLimitDrawDeepSkyZoomOut, tr2i18n( "The faint limit when zoomed out" ) );
    TQWhatsThis::add( kcfg_MagLimitDrawDeepSkyZoomOut, tr2i18n( "Set the faintest magnitude that will be drawn at the minimum zoom level.  The faint limit varies smoothly between these two values, as the zoom level changes.\n"
"\n"
"Magnitude is a measure of brightness; the larger the number, the fainter the object.  Magnitude 6.0 is about as faint as the unaided human eye can see." ) );
    textLabelMagStars_2->setText( tr2i18n( "Faint limit zoomed in:" ) );
}

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

TQMetaObject *OpsCatalogUI::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_OpsCatalogUI( "OpsCatalogUI", &OpsCatalogUI::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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