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

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

#include "addcatdialogui.h"

#include <ntqvariant.h>
#include <kpushbutton.h>
#include <kurlrequester.h>
#include <klineedit.h>
#include <tdelistbox.h>
#include <draglistbox.h>
#include <knuminput.h>
#include <kcolorbutton.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "draglistbox.h"

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

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

    DataURL = new KURLRequester( groupBox4, "DataURL" );
    groupBox4Layout->addWidget( DataURL );

    DataFileBox = new TDEListBox( groupBox4, "DataFileBox" );
    DataFileBox->setEnabled( true );
    TQFont DataFileBox_font(  DataFileBox->font() );
    DataFileBox_font.setPointSize( 7 );
    DataFileBox->setFont( DataFileBox_font ); 
    groupBox4Layout->addWidget( DataFileBox );
    AddCatDialogUILayout->addWidget( groupBox4 );

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

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

    textLabel1_3 = new TQLabel( groupBox1, "textLabel1_3" );
    TQFont textLabel1_3_font(  textLabel1_3->font() );
    textLabel1_3_font.setPointSize( 8 );
    textLabel1_3->setFont( textLabel1_3_font ); 
    layout7->addWidget( textLabel1_3 );

    FieldList = new DragListBox( groupBox1, "FieldList" );
    layout7->addWidget( FieldList );
    groupBox1Layout->addLayout( layout7 );

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

    textLabel1_3_2 = new TQLabel( groupBox1, "textLabel1_3_2" );
    TQFont textLabel1_3_2_font(  textLabel1_3_2->font() );
    textLabel1_3_2_font.setPointSize( 8 );
    textLabel1_3_2->setFont( textLabel1_3_2_font ); 
    layout8->addWidget( textLabel1_3_2 );

    FieldPool = new DragListBox( groupBox1, "FieldPool" );
    layout8->addWidget( FieldPool );
    groupBox1Layout->addLayout( layout8 );
    AddCatDialogUILayout->addWidget( groupBox1 );

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

    Prefix = new KLineEdit( this, "Prefix" );

    layout27->addWidget( Prefix, 1, 1 );

    Epoch = new KDoubleNumInput( this, "Epoch" );
    Epoch->setValue( 2000 );

    layout27->addWidget( Epoch, 0, 1 );

    textLabel4 = new TQLabel( this, "textLabel4" );

    layout27->addWidget( textLabel4, 1, 0 );

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

    textLabel1_4 = new TQLabel( this, "textLabel1_4" );
    layout13->addWidget( textLabel1_4 );

    ColorButton = new KColorButton( this, "ColorButton" );
    ColorButton->setColor( TQColor( 255, 0, 0 ) );
    layout13->addWidget( ColorButton );

    layout27->addLayout( layout13, 0, 2 );

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

    layout27->addWidget( textLabel3, 0, 0 );

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

    PreviewButton = new KPushButton( this, "PreviewButton" );
    PreviewButton->setEnabled( true );
    layout12->addWidget( PreviewButton );

    layout27->addLayout( layout12, 1, 2 );
    AddCatDialogUILayout->addLayout( layout27 );

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

    CatalogURL = new KURLRequester( this, "CatalogURL" );

    layout4->addWidget( CatalogURL, 1, 1 );

    textLabel1_2 = new TQLabel( this, "textLabel1_2" );

    layout4->addWidget( textLabel1_2, 0, 0 );

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

    layout4->addWidget( textLabel1, 1, 0 );

    CatalogName = new KLineEdit( this, "CatalogName" );

    layout4->addWidget( CatalogName, 0, 1 );
    AddCatDialogUILayout->addLayout( layout4 );
    spacer3 = new TQSpacerItem( 20, 16, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    AddCatDialogUILayout->addItem( spacer3 );
    languageChange();
    resize( TQSize(614, 652).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( DataURL, DataFileBox );
    setTabOrder( DataFileBox, Epoch );
    setTabOrder( Epoch, ColorButton );
    setTabOrder( ColorButton, Prefix );
    setTabOrder( Prefix, PreviewButton );
    setTabOrder( PreviewButton, CatalogName );
    setTabOrder( CatalogName, CatalogURL );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void AddCatDialogUI::languageChange()
{
    setCaption( tr2i18n( "AddCatDialog" ) );
    groupBox4->setTitle( tr2i18n( "Import File" ) );
    TQToolTip::add( DataURL, tr2i18n( "Enter import data filename" ) );
    TQWhatsThis::add( DataURL, tr2i18n( "To import an existing data file, enter its filename here.  You will then describe the contents of the file below.  You can leave the filename blank to construct a catalog file with a valid header, but no data." ) );
    TQToolTip::add( DataFileBox, tr2i18n( "Contents of the imported data file" ) );
    TQWhatsThis::add( DataFileBox, tr2i18n( "When you select a data file in the above line, its contents are displayed here." ) );
    groupBox1->setTitle( tr2i18n( "Describe Data Fields" ) );
    textLabel1_3->setText( tr2i18n( "<b>Catalog fields:</b>" ) );
    TQToolTip::add( FieldList, tr2i18n( "Data fields present in the import file" ) );
    TQWhatsThis::add( FieldList, tr2i18n( "Build a list of data fields for your import data file (in the correct order from left to right), by dragging items from the \"Available fields\" list." ) );
    textLabel1_3_2->setText( tr2i18n( "<b>Available fields:</b>" ) );
    TQToolTip::add( FieldPool, tr2i18n( "The list of available data fields" ) );
    TQWhatsThis::add( FieldPool, tr2i18n( "Drag items from this box to the \"Catalog fields\" box to describe the contents of your imported data file." ) );
    TQToolTip::add( Epoch, tr2i18n( "The coordinate epoch for the catalog" ) );
    textLabel4->setText( tr2i18n( "Catalog name prefix:" ) );
    textLabel1_4->setText( tr2i18n( "Symbol color:" ) );
    ColorButton->setText( TQString::null );
    textLabel3->setText( tr2i18n( "Coordinate epoch:" ) );
    PreviewButton->setText( tr2i18n( "Preview &Output" ) );
    TQToolTip::add( CatalogURL, tr2i18n( "Enter the filename for the output catalog file" ) );
    textLabel1_2->setText( tr2i18n( "Catalog name:" ) );
    textLabel1->setText( tr2i18n( "Save catalog as:" ) );
    TQToolTip::add( CatalogName, tr2i18n( "Enter a name for the catalog" ) );
}

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

TQMetaObject *AddCatDialogUI::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_AddCatDialogUI( "AddCatDialogUI", &AddCatDialogUI::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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