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

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

#include "kupdatestockpricedlgdecl.h"

#include <ntqvariant.h>
#include <kmymoney/kmymoneydateinput.h>
#include <kmymoney/kmymoneycurrencyselector.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqframe.h>
#include <kpushbutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a kUpdateStockPriceDecl 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.
 */
kUpdateStockPriceDecl::kUpdateStockPriceDecl( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "kUpdateStockPriceDecl" );
    kUpdateStockPriceDeclLayout = new TQVBoxLayout( this, 11, 6, "kUpdateStockPriceDeclLayout"); 

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

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

    m_date = new kMyMoneyDateInput( this, "m_date" );
    layout37->addWidget( m_date );
    spacer25 = new TQSpacerItem( 71, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout37->addItem( spacer25 );

    layout38->addLayout( layout37, 2, 1 );

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

    m_currency = new KMyMoneySecuritySelector( this, "m_currency" );
    m_currency->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)1, 0, 0, m_currency->sizePolicy().hasHeightForWidth() ) );
    layout36->addWidget( m_currency );
    spacer26 = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout36->addItem( spacer26 );

    layout38->addLayout( layout36, 1, 1 );

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

    layout38->addWidget( textLabel2, 1, 0 );

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

    layout38->addWidget( lblDate, 2, 0 );

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

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

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

    m_security = new KMyMoneySecuritySelector( this, "m_security" );
    m_security->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)1, 0, 0, m_security->sizePolicy().hasHeightForWidth() ) );
    layout35->addWidget( m_security );
    spacer27 = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout35->addItem( spacer27 );

    layout38->addLayout( layout35, 0, 1 );
    kUpdateStockPriceDeclLayout->addLayout( layout38 );
    spacer8 = new TQSpacerItem( 31, 40, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    kUpdateStockPriceDeclLayout->addItem( spacer8 );

    line6 = new TQFrame( this, "line6" );
    line6->setFrameShape( TQFrame::HLine );
    line6->setFrameShadow( TQFrame::Sunken );
    line6->setFrameShape( TQFrame::HLine );
    kUpdateStockPriceDeclLayout->addWidget( line6 );

    layout9 = new TQHBoxLayout( 0, 0, 6, "layout9"); 
    spacer7 = new TQSpacerItem( 71, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout9->addItem( spacer7 );

    m_okButton = new KPushButton( this, "m_okButton" );
    m_okButton->setAutoDefault( true );
    m_okButton->setDefault( true );
    m_okButton->setProperty( "stdItem", 1 );
    layout9->addWidget( m_okButton );

    m_cancelButton = new KPushButton( this, "m_cancelButton" );
    m_cancelButton->setProperty( "stdItem", 2 );
    layout9->addWidget( m_cancelButton );
    kUpdateStockPriceDeclLayout->addLayout( layout9 );
    languageChange();
    resize( TQSize(457, 194).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void kUpdateStockPriceDecl::languageChange()
{
    setCaption( tr2i18n( "New price entry" ) );
    textLabel2->setText( tr2i18n( "Currency" ) );
    lblDate->setText( tr2i18n( "Date:" ) );
    textLabel1->setText( tr2i18n( "Security" ) );
    m_okButton->setText( tr2i18n( "&OK" ) );
    m_cancelButton->setText( tr2i18n( "&Cancel" ) );
}

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

TQMetaObject *kUpdateStockPriceDecl::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_kUpdateStockPriceDecl( "kUpdateStockPriceDecl", &kUpdateStockPriceDecl::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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