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

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

#include "argsetgeolocation.h"

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

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

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

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

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

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

    layout34->addWidget( textLabel1_2, 1, 0 );

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

    layout34->addWidget( CountryName, 2, 1 );

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

    layout34->addWidget( textLabel1, 0, 0 );

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

    layout34->addWidget( textLabel1_2_3, 2, 0 );

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

    layout34->addWidget( CityName, 0, 1 );

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

    layout34->addWidget( ProvinceName, 1, 1 );
    layout35->addLayout( layout34 );

    layout33 = new TQHBoxLayout( 0, 0, 6, "layout33"); 
    spacer23_3 = new TQSpacerItem( 49, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout33->addItem( spacer23_3 );

    FindCityButton = new KPushButton( this, "FindCityButton" );
    layout33->addWidget( FindCityButton );
    layout35->addLayout( layout33 );
    layout36->addLayout( layout35 );
    spacer23 = new TQSpacerItem( 49, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout36->addItem( spacer23 );
    ArgSetGeoLocationLayout->addLayout( layout36 );
    spacer27 = new TQSpacerItem( 20, 40, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    ArgSetGeoLocationLayout->addItem( spacer27 );
    languageChange();
    resize( TQSize(316, 208).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( CityName, ProvinceName );
    setTabOrder( ProvinceName, CountryName );
    setTabOrder( CountryName, FindCityButton );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void ArgSetGeoLocation::languageChange()
{
    textLabel1_2->setProperty( "text", tr2i18n( "Province:" ) );
    TQToolTip::add( CountryName, tr2i18n( "Country name" ) );
    TQWhatsThis::add( CountryName, tr2i18n( "Enter the Country name for the desired location.  It might be easier to use the \"Find City\" location to choose your location from the list of predefined cities." ) );
    textLabel1->setProperty( "text", tr2i18n( "City:" ) );
    textLabel1_2_3->setProperty( "text", tr2i18n( "Country:" ) );
    TQToolTip::add( CityName, tr2i18n( "City name" ) );
    TQWhatsThis::add( CityName, tr2i18n( "Enter the City name for the desired location.  It might be easier to use the \"Find City\" location to choose your location from the list of predefined cities." ) );
    TQToolTip::add( ProvinceName, tr2i18n( "Province name" ) );
    TQWhatsThis::add( ProvinceName, tr2i18n( "Enter the Province name for the desired location.  It might be easier to use the \"Find City\" location to choose your location from the list of predefined cities." ) );
    FindCityButton->setProperty( "text", tr2i18n( "Find City" ) );
    TQToolTip::add( FindCityButton, tr2i18n( "Open the Set Location tool" ) );
    TQWhatsThis::add( FindCityButton, tr2i18n( "Press this button to open the Set Location dialog, which will allow you to choose a location from our list of over 2500 cities around the word.  Once a location has been selected, the City, Province and Country fields will be filled in." ) );
}

void ArgSetGeoLocation::slotFindCity()
{
    tqWarning( "ArgSetGeoLocation::slotFindCity(): Not implemented yet" );
}

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

TQMetaObject *ArgSetGeoLocation::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_ArgSetGeoLocation( "ArgSetGeoLocation", &ArgSetGeoLocation::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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