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

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

#include "kexportdlgdecl.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqframe.h>
#include <ntqlineedit.h>
#include <kpushbutton.h>
#include <kcombobox.h>
#include <ntqgroupbox.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "../widgets/kmymoneydateinput.h"
#include "../widgets/kmymoneyaccountcombo.h"

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

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

    TextLabel2 = new TQLabel( this, "TextLabel2" );
    TextLabel2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)7, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) );
    TextLabel2->setFrameShape( TQLabel::MShape );
    TextLabel2->setFrameShadow( TQLabel::MShadow );
    TextLabel2->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignTop | TQLabel::AlignLeft ) );
    Layout7->addWidget( TextLabel2 );
    KExportDlgDeclLayout->addLayout( Layout7 );

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

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

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

    m_qlineeditFile = new TQLineEdit( this, "m_qlineeditFile" );
    m_qlineeditFile->setFrameShape( TQLineEdit::LineEditPanel );
    m_qlineeditFile->setFrameShadow( TQLineEdit::Sunken );
    Layout45->addWidget( m_qlineeditFile );

    m_qbuttonBrowse = new KPushButton( this, "m_qbuttonBrowse" );
    Layout45->addWidget( m_qbuttonBrowse );
    KExportDlgDeclLayout->addLayout( Layout45 );

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

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

    TextLabel2_2 = new TQLabel( this, "TextLabel2_2" );
    layout10->addWidget( TextLabel2_2 );

    m_accountComboBox = new KMyMoneyAccountCombo( this, "m_accountComboBox" );
    layout10->addWidget( m_accountComboBox );
    layout11->addLayout( layout10 );

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

    TextLabel3 = new TQLabel( this, "TextLabel3" );
    Layout47->addWidget( TextLabel3 );

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

    m_profileComboBox = new KComboBox( false, this, "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 );
    Layout46->addWidget( m_profileComboBox );

    m_profileEditorButton = new KPushButton( this, "m_profileEditorButton" );
    Layout46->addWidget( m_profileEditorButton );
    Layout47->addLayout( Layout46 );
    layout11->addLayout( Layout47 );
    KExportDlgDeclLayout->addLayout( layout11 );

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

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

    m_qcheckboxAccount = new TQCheckBox( m_qgroupboxContents, "m_qcheckboxAccount" );
    m_qgroupboxContentsLayout->addWidget( m_qcheckboxAccount );

    m_qcheckboxCategories = new TQCheckBox( m_qgroupboxContents, "m_qcheckboxCategories" );
    m_qgroupboxContentsLayout->addWidget( m_qcheckboxCategories );
    layout13->addWidget( m_qgroupboxContents );

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

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

    m_kmymoneydateStart = new kMyMoneyDateInput( m_qgroupboxDates, "m_kmymoneydateStart" );

    layout12->addWidget( m_kmymoneydateStart, 0, 1 );

    lblEndDate = new TQLabel( m_qgroupboxDates, "lblEndDate" );
    lblEndDate->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)1, 0, 0, lblEndDate->sizePolicy().hasHeightForWidth() ) );
    lblEndDate->setMinimumSize( TQSize( 50, 0 ) );

    layout12->addWidget( lblEndDate, 1, 0 );

    lblStartDate = new TQLabel( m_qgroupboxDates, "lblStartDate" );
    lblStartDate->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)1, 0, 0, lblStartDate->sizePolicy().hasHeightForWidth() ) );
    lblStartDate->setMinimumSize( TQSize( 50, 0 ) );

    layout12->addWidget( lblStartDate, 0, 0 );

    m_kmymoneydateEnd = new kMyMoneyDateInput( m_qgroupboxDates, "m_kmymoneydateEnd" );
    m_kmymoneydateEnd->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)1, 0, 0, m_kmymoneydateEnd->sizePolicy().hasHeightForWidth() ) );

    layout12->addWidget( m_kmymoneydateEnd, 1, 1 );
    m_qgroupboxDatesLayout->addLayout( layout12 );
    layout13->addWidget( m_qgroupboxDates );
    Spacer7 = new TQSpacerItem( 230, 16, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout13->addItem( Spacer7 );
    KExportDlgDeclLayout->addLayout( layout13 );

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

    Layout49 = new TQHBoxLayout( 0, 0, 6, "Layout49"); 
    Spacer5 = new TQSpacerItem( 451, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    Layout49->addItem( Spacer5 );

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

    m_qbuttonCancel = new KPushButton( this, "m_qbuttonCancel" );
    m_qbuttonCancel->setAutoDefault( true );
    Layout49->addWidget( m_qbuttonCancel );
    KExportDlgDeclLayout->addLayout( Layout49 );
    languageChange();
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KExportDlgDecl::languageChange()
{
    setCaption( tr2i18n( "QIF Export" ) );
    TextLabel2->setText( tr2i18n( "From this dialog you are able to export transactions to a quicken compatible file, (known as a QIF file, because of the extension).  Please enter the path to the QIF file or select it by clicking on the Browse button.\n"
"\n"
"You can choose the file's path, the account and the format of the QIF file (profile).  Choose Account to export all the transactions between the specified dates or just categories.  You can also limit the transactions that are exported by start and ending date.  Once you have pressed the Export button a message box will appear when the export has completed detailing how many transactions, categories and payees were exported." ) );
    lblFileExport->setText( tr2i18n( "File to export to:" ) );
    m_qbuttonBrowse->setText( tr2i18n( "Browse..." ) );
    TextLabel2_2->setText( tr2i18n( "Account to export" ) );
    TextLabel3->setText( tr2i18n( "QIF Profile" ) );
    m_profileEditorButton->setText( tr2i18n( "New..." ) );
    m_qgroupboxContents->setTitle( tr2i18n( "Contents to Export" ) );
    m_qcheckboxAccount->setText( tr2i18n( "Account" ) );
    m_qcheckboxCategories->setText( tr2i18n( "Categories" ) );
    m_qgroupboxDates->setTitle( tr2i18n( "Date Range" ) );
    lblEndDate->setText( tr2i18n( "End on:" ) );
    lblStartDate->setText( tr2i18n( "Start on:" ) );
    m_qbuttonOk->setText( tr2i18n( "Export" ) );
    m_qbuttonCancel->setText( tr2i18n( "Cancel" ) );
}

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

TQMetaObject *KExportDlgDecl::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KExportDlgDecl( "KExportDlgDecl", &KExportDlgDecl::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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