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

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

#include "kcurrencyeditdlgdecl.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <tdelistview.h>
#include <ntqframe.h>
#include <kpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "../widgets/kmymoneylineedit.h"

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

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

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

    m_currencyList = new TDEListView( this, "m_currencyList" );
    layout5->addWidget( m_currencyList );

    m_baseCurrencyFrame = new TQFrame( this, "m_baseCurrencyFrame" );
    m_baseCurrencyFrame->setFrameShape( TQFrame::NoFrame );
    m_baseCurrencyFrame->setFrameShadow( TQFrame::Plain );
    m_baseCurrencyFrameLayout = new TQVBoxLayout( m_baseCurrencyFrame, 0, 6, "m_baseCurrencyFrameLayout"); 

    layout4 = new TQHBoxLayout( 0, 0, 6, "layout4"); 
    spacer2 = new TQSpacerItem( 51, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout4->addItem( spacer2 );

    m_baseCurrencyButton = new KPushButton( m_baseCurrencyFrame, "m_baseCurrencyButton" );
    layout4->addWidget( m_baseCurrencyButton );
    spacer3 = new TQSpacerItem( 61, 31, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout4->addItem( spacer3 );
    m_baseCurrencyFrameLayout->addLayout( layout4 );
    layout5->addWidget( m_baseCurrencyFrame );
    layout6->addLayout( layout5 );

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

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

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

    layout4_2->addWidget( textLabel3, 1, 0 );

    m_idLabel = new TQLabel( m_detailGroup, "m_idLabel" );

    layout4_2->addWidget( m_idLabel, 0, 1 );

    m_symbolEdit = new kMyMoneyLineEdit( m_detailGroup, "m_symbolEdit" );

    layout4_2->addWidget( m_symbolEdit, 1, 1 );

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

    layout4_2->addWidget( textLabel1, 0, 0 );
    m_detailGroupLayout->addLayout( layout4_2 );

    m_description = new TQLabel( m_detailGroup, "m_description" );
    m_detailGroupLayout->addWidget( m_description );

    m_onlineSourceTable = new TDEListView( m_detailGroup, "m_onlineSourceTable" );
    m_onlineSourceTable->addColumn( tr2i18n( "Currency" ) );
    m_onlineSourceTable->addColumn( tr2i18n( "Online Source" ) );
    m_detailGroupLayout->addWidget( m_onlineSourceTable );
    layout6->addWidget( m_detailGroup );
    KCurrencyEditDlgDeclLayout->addLayout( layout6 );

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

    buttonHelp = new TQPushButton( this, "buttonHelp" );
    buttonHelp->setEnabled( true );
    buttonHelp->setAutoDefault( true );
    Layout1->addWidget( buttonHelp );
    Horizontal_Spacing2 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    Layout1->addItem( Horizontal_Spacing2 );

    buttonClose = new TQPushButton( this, "buttonClose" );
    buttonClose->setAutoDefault( true );
    buttonClose->setDefault( true );
    Layout1->addWidget( buttonClose );
    KCurrencyEditDlgDeclLayout->addLayout( Layout1 );
    languageChange();
    resize( TQSize(666, 516).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KCurrencyEditDlgDecl::languageChange()
{
    setCaption( tr2i18n( "Currencies" ) );
    m_baseCurrencyButton->setText( tr2i18n( "Select as base currency" ) );
    m_detailGroup->setTitle( tr2i18n( "Details" ) );
    textLabel3->setText( tr2i18n( "Symbol" ) );
    m_idLabel->setText( tr2i18n( "real ID" ) );
    textLabel1->setText( tr2i18n( "ID" ) );
    m_description->setText( tr2i18n( "X" ) );
    m_onlineSourceTable->header()->setLabel( 0, tr2i18n( "Currency" ) );
    m_onlineSourceTable->header()->setLabel( 1, tr2i18n( "Online Source" ) );
    buttonHelp->setText( tr2i18n( "Help" ) );
    buttonHelp->setAccel( TQKeySequence( tr2i18n( "F1" ) ) );
    buttonClose->setText( tr2i18n( "Close" ) );
    TQToolTip::add( buttonClose, tr2i18n( "If this button is not activated, select the base currency first." ) );
    TQWhatsThis::add( buttonClose, tr2i18n( "Press this button to close the dialog. If the button is not activated, select your base currency." ) );
}

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

TQMetaObject *KCurrencyEditDlgDecl::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KCurrencyEditDlgDecl( "KCurrencyEditDlgDecl", &KCurrencyEditDlgDecl::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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