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

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

#include "kimportdlgdecl.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <kactivelabel.h>
#include <ntqlabel.h>
#include <ntqgroupbox.h>
#include <kcombobox.h>
#include <kpushbutton.h>
#include <ntqlineedit.h>
#include <ntqframe.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    kActiveLabel1 = new KActiveLabel( this, "kActiveLabel1" );
    kActiveLabel1->setFocusPolicy( KActiveLabel::NoFocus );
    kActiveLabel1->setResizePolicy( KActiveLabel::Manual );
    kActiveLabel1->setWordWrap( KActiveLabel::WidgetWidth );
    kActiveLabel1->setAutoFormatting( int( KActiveLabel::AutoAll ) );
    KImportDlgDeclLayout->addWidget( kActiveLabel1 );

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

    lblImportFile = new TQLabel( this, "lblImportFile" );
    lblImportFile->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)1, 0, 0, lblImportFile->sizePolicy().hasHeightForWidth() ) );

    layout15->addWidget( lblImportFile, 0, 0 );

    m_optionGroupBox = new TQGroupBox( this, "m_optionGroupBox" );
    m_optionGroupBox->setColumnLayout(0, TQt::Vertical );
    m_optionGroupBox->layout()->setSpacing( 6 );
    m_optionGroupBox->layout()->setMargin( 11 );
    m_optionGroupBoxLayout = new TQGridLayout( m_optionGroupBox->layout() );
    m_optionGroupBoxLayout->setAlignment( TQt::AlignTop );

    m_typeComboBox = new KComboBox( false, m_optionGroupBox, "m_typeComboBox" );

    m_optionGroupBoxLayout->addWidget( m_typeComboBox, 1, 1 );

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

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

    TextLabel3_2 = new TQLabel( m_optionGroupBox, "TextLabel3_2" );

    m_optionGroupBoxLayout->addWidget( TextLabel3_2, 0, 0 );

    m_profileComboBox = new KComboBox( false, m_optionGroupBox, "m_profileComboBox" );
    m_profileComboBox->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 0, 0, m_profileComboBox->sizePolicy().hasHeightForWidth() ) );
    m_profileComboBox->setMinimumSize( TQSize( 200, 0 ) );
    m_profileComboBox->setDuplicatesEnabled( false );

    m_optionGroupBoxLayout->addWidget( m_profileComboBox, 0, 1 );

    m_profileEditorButton = new KPushButton( m_optionGroupBox, "m_profileEditorButton" );

    m_optionGroupBoxLayout->addWidget( m_profileEditorButton, 0, 2 );

    layout15->addMultiCellWidget( m_optionGroupBox, 1, 1, 0, 2 );

    m_qbuttonBrowse = new KPushButton( this, "m_qbuttonBrowse" );

    layout15->addWidget( m_qbuttonBrowse, 0, 2 );

    m_qlineeditFile = new TQLineEdit( this, "m_qlineeditFile" );

    layout15->addWidget( m_qlineeditFile, 0, 1 );
    KImportDlgDeclLayout->addLayout( layout15 );

    Line1 = new TQFrame( this, "Line1" );
    Line1->setFrameShape( TQFrame::HLine );
    Line1->setFrameShadow( TQFrame::Raised );
    Line1->setFrameShape( TQFrame::HLine );
    KImportDlgDeclLayout->addWidget( Line1 );

    Layout90 = new TQHBoxLayout( 0, 0, 6, "Layout90"); 
    Spacer1 = new TQSpacerItem( 411, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    Layout90->addItem( Spacer1 );

    m_qbuttonOk = new KPushButton( this, "m_qbuttonOk" );
    m_qbuttonOk->setAutoDefault( true );
    m_qbuttonOk->setDefault( true );
    Layout90->addWidget( m_qbuttonOk );

    m_qbuttonCancel = new KPushButton( this, "m_qbuttonCancel" );
    m_qbuttonCancel->setAutoDefault( true );
    Layout90->addWidget( m_qbuttonCancel );
    KImportDlgDeclLayout->addLayout( Layout90 );
    languageChange();
    resize( TQSize(476, 303).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KImportDlgDecl::languageChange()
{
    setCaption( tr2i18n( "QIF Import" ) );
    kActiveLabel1->setText( tr2i18n( "From this dialog you are able to import transactions from a Quicken<b>&trade;</b> compatible file, (known as a QIF file, because of the extension).<p>\n"
"\n"
"Please enter the path to the QIF file or select it by clicking on the Browse button. Once you have the file's path press the Import button and KMyMoney will import all the transactions, categories and payees it finds." ) );
    lblImportFile->setText( tr2i18n( "QIF File to Import:" ) );
    m_optionGroupBox->setTitle( tr2i18n( "Import options" ) );
    m_typeComboBox->clear();
    m_typeComboBox->insertItem( tr2i18n( "Bank statement" ) );
    m_typeComboBox->insertItem( tr2i18n( "Other application" ) );
    TQWhatsThis::add( m_typeComboBox, tr2i18n( "Select <b>Bank statement</b> turns on automatic category matching which is turned off in case of <b>Historic data</b>. Use the latter if you import files from other Personal Finance Management software." ) );
    textLabel1->setText( tr2i18n( "Source of QIF" ) );
    TextLabel3_2->setText( tr2i18n( "QIF Profile" ) );
    m_profileEditorButton->setText( tr2i18n( "New..." ) );
    m_qbuttonBrowse->setText( tr2i18n( "Browse..." ) );
    m_qbuttonOk->setText( tr2i18n( "Import" ) );
    m_qbuttonCancel->setText( tr2i18n( "Cancel" ) );
}

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

TQMetaObject *KImportDlgDecl::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KImportDlgDecl( "KImportDlgDecl", &KImportDlgDecl::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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