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

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

#include "indiconf.h"

#include <ntqvariant.h>
#include <klineedit.h>
#include <kpushbutton.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqcheckbox.h>
#include <ntqcombobox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a INDIConf as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The qdialog will by default be modeless, unless you set 'modal' to
 *  true to construct a modal qdialog.
 */
INDIConf::INDIConf( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "INDIConf" );
    setSizeGripEnabled( true );
    INDIConfLayout = new TQGridLayout( this, 1, 1, 11, 6, "INDIConfLayout"); 

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

    fitsLabel = new TQLabel( generalGroup, "fitsLabel" );
    generalGroupLayout->addWidget( fitsLabel );

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

    fitsDIR_IN = new KLineEdit( generalGroup, "fitsDIR_IN" );
    layout4->addWidget( fitsDIR_IN );

    selectDirB = new KPushButton( generalGroup, "selectDirB" );
    selectDirB->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, selectDirB->sizePolicy().hasHeightForWidth() ) );
    selectDirB->setMinimumSize( TQSize( 28, 28 ) );
    selectDirB->setMaximumSize( TQSize( 28, 28 ) );
    layout4->addWidget( selectDirB );
    generalGroupLayout->addLayout( layout4 );

    fitsAutoDisplayCheck = new TQCheckBox( generalGroup, "fitsAutoDisplayCheck" );
    fitsAutoDisplayCheck->setChecked( true );
    generalGroupLayout->addWidget( fitsAutoDisplayCheck );

    telescopeLabel = new TQLabel( generalGroup, "telescopeLabel" );
    generalGroupLayout->addWidget( telescopeLabel );

    telPort_IN = new KLineEdit( generalGroup, "telPort_IN" );
    generalGroupLayout->addWidget( telPort_IN );

    videoLabel = new TQLabel( generalGroup, "videoLabel" );
    generalGroupLayout->addWidget( videoLabel );

    vidPort_IN = new KLineEdit( generalGroup, "vidPort_IN" );
    generalGroupLayout->addWidget( vidPort_IN );

    INDIConfLayout->addMultiCellWidget( generalGroup, 0, 0, 0, 1 );

    Layout1 = new TQHBoxLayout( 0, 0, 6, "Layout1"); 
    Horizontal_Spacing2 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    Layout1->addItem( Horizontal_Spacing2 );

    buttonOk = new TQPushButton( this, "buttonOk" );
    buttonOk->setAutoDefault( true );
    buttonOk->setDefault( true );
    Layout1->addWidget( buttonOk );

    buttonCancel = new TQPushButton( this, "buttonCancel" );
    buttonCancel->setAutoDefault( true );
    Layout1->addWidget( buttonCancel );

    INDIConfLayout->addMultiCellLayout( Layout1, 3, 3, 0, 1 );

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

    crosshairCheck = new TQCheckBox( displayGroup, "crosshairCheck" );
    crosshairCheck->setChecked( true );
    displayGroupLayout->addWidget( crosshairCheck );

    messagesCheck = new TQCheckBox( displayGroup, "messagesCheck" );
    messagesCheck->setChecked( true );
    displayGroupLayout->addWidget( messagesCheck );

    INDIConfLayout->addWidget( displayGroup, 1, 1 );
    spacer2 = new TQSpacerItem( 200, 21, TQSizePolicy::Preferred, TQSizePolicy::Minimum );
    INDIConfLayout->addItem( spacer2, 2, 1 );

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

    timeCheck = new TQCheckBox( autoGroup, "timeCheck" );
    timeCheck->setChecked( false );
    autoGroupLayout->addWidget( timeCheck );

    GeoCheck = new TQCheckBox( autoGroup, "GeoCheck" );
    GeoCheck->setChecked( false );
    autoGroupLayout->addWidget( GeoCheck );

    INDIConfLayout->addWidget( autoGroup, 1, 0 );

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

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

    textLabel1 = new TQLabel( autoGroup_2, "textLabel1" );
    layout3->addWidget( textLabel1 );

    textLabel2 = new TQLabel( autoGroup_2, "textLabel2" );
    layout3->addWidget( textLabel2 );
    autoGroup_2Layout->addLayout( layout3 );

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

    filterCombo = new TQComboBox( false, autoGroup_2, "filterCombo" );
    filterCombo->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, filterCombo->sizePolicy().hasHeightForWidth() ) );
    layout4_2->addWidget( filterCombo );

    filterAlias = new KLineEdit( autoGroup_2, "filterAlias" );
    filterAlias->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, filterAlias->sizePolicy().hasHeightForWidth() ) );
    layout4_2->addWidget( filterAlias );
    autoGroup_2Layout->addLayout( layout4_2 );
    spacer3 = new TQSpacerItem( 61, 20, TQSizePolicy::Preferred, TQSizePolicy::Minimum );
    autoGroup_2Layout->addItem( spacer3 );

    INDIConfLayout->addWidget( autoGroup_2, 2, 0 );
    languageChange();
    resize( TQSize(544, 413).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( buttonOk, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
    connect( buttonCancel, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );

    // tab order
    setTabOrder( timeCheck, GeoCheck );
    setTabOrder( GeoCheck, crosshairCheck );
    setTabOrder( crosshairCheck, messagesCheck );
    setTabOrder( messagesCheck, buttonOk );
    setTabOrder( buttonOk, buttonCancel );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void INDIConf::languageChange()
{
    setCaption( tr2i18n( "Configure INDI" ) );
    generalGroup->setTitle( tr2i18n( "General" ) );
    fitsLabel->setText( tr2i18n( "Default FITS directory:" ) );
    selectDirB->setText( TQString::null );
    fitsAutoDisplayCheck->setText( tr2i18n( "&Automatic display of FITS upon capture" ) );
    telescopeLabel->setText( tr2i18n( "Telescope port:" ) );
    TQToolTip::add( telescopeLabel, tr2i18n( "Default INDI telescope port" ) );
    videoLabel->setText( tr2i18n( "Video port:" ) );
    TQToolTip::add( videoLabel, tr2i18n( "Default INDI video port" ) );
    buttonOk->setText( tr2i18n( "&OK" ) );
    buttonCancel->setText( tr2i18n( "&Cancel" ) );
    displayGroup->setTitle( tr2i18n( "Display" ) );
    crosshairCheck->setText( tr2i18n( "&Device target crosshair" ) );
    TQToolTip::add( crosshairCheck, tr2i18n( "Display the telescope position on the sky map" ) );
    messagesCheck->setText( tr2i18n( "INDI messages in status &bar" ) );
    TQToolTip::add( messagesCheck, tr2i18n( "Display INDI status messages in the status bar" ) );
    autoGroup->setTitle( tr2i18n( "Automatic Device Updates" ) );
    timeCheck->setText( tr2i18n( "Time" ) );
    TQToolTip::add( timeCheck, tr2i18n( "Update telescope clock upon connection" ) );
    GeoCheck->setText( tr2i18n( "&Geographic location" ) );
    TQToolTip::add( GeoCheck, tr2i18n( "Update telescope geographical location upon connection" ) );
    autoGroup_2->setTitle( tr2i18n( "Filter Wheel" ) );
    TQToolTip::add( autoGroup_2, tr2i18n( "Assign color values for your filter wheel slots" ) );
    textLabel1->setText( tr2i18n( "Slot:" ) );
    textLabel2->setText( tr2i18n( "Alias:" ) );
}

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

TQMetaObject *INDIConf::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_INDIConf( "INDIConf", &INDIConf::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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