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

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

#include "mymoneyqifprofileeditordecl.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqlistbox.h>
#include <ntqtabwidget.h>
#include <ntqwidget.h>
#include <ntqlabel.h>
#include <klineedit.h>
#include <ntqcheckbox.h>
#include <kcombobox.h>
#include <ntqheader.h>
#include <ntqlistview.h>
#include <kurlrequester.h>
#include <ntqlineedit.h>
#include <kpushbutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include <ntqimage.h>
#include <ntqpixmap.h>


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

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

    m_profileListBox = new TQListBox( this, "m_profileListBox" );
    m_profileListBox->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)7, 0, 0, m_profileListBox->sizePolicy().hasHeightForWidth() ) );
    m_profileListBox->setVariableWidth( true );
    layout15->addWidget( m_profileListBox );

    profileTabs = new TQTabWidget( this, "profileTabs" );

    tabGeneral = new TQWidget( profileTabs, "tabGeneral" );
    tabGeneralLayout = new TQVBoxLayout( tabGeneral, 11, 6, "tabGeneralLayout"); 

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

    TextLabel2_2_3 = new TQLabel( tabGeneral, "TextLabel2_2_3" );
    TextLabel2_2_3->setMinimumSize( TQSize( 140, 0 ) );

    layout9->addWidget( TextLabel2_2_3, 4, 0 );

    TextLabel2_2 = new TQLabel( tabGeneral, "TextLabel2_2" );
    TextLabel2_2->setMinimumSize( TQSize( 140, 0 ) );

    layout9->addWidget( TextLabel2_2, 2, 0 );

    m_editOpeningBalance = new KLineEdit( tabGeneral, "m_editOpeningBalance" );

    layout9->addWidget( m_editOpeningBalance, 2, 1 );

    TextLabel2 = new TQLabel( tabGeneral, "TextLabel2" );
    TextLabel2->setMinimumSize( TQSize( 140, 0 ) );

    layout9->addWidget( TextLabel2, 1, 0 );

    m_editAccountDelimiter = new KLineEdit( tabGeneral, "m_editAccountDelimiter" );

    layout9->addWidget( m_editAccountDelimiter, 3, 1 );

    m_editVoidMark = new KLineEdit( tabGeneral, "m_editVoidMark" );

    layout9->addWidget( m_editVoidMark, 4, 1 );

    TextLabel2_2_2 = new TQLabel( tabGeneral, "TextLabel2_2_2" );
    TextLabel2_2_2->setMinimumSize( TQSize( 140, 0 ) );

    layout9->addWidget( TextLabel2_2_2, 3, 0 );

    m_editType = new KLineEdit( tabGeneral, "m_editType" );

    layout9->addWidget( m_editType, 1, 1 );

    m_editDescription = new KLineEdit( tabGeneral, "m_editDescription" );

    layout9->addWidget( m_editDescription, 0, 1 );

    TextLabel1 = new TQLabel( tabGeneral, "TextLabel1" );
    TextLabel1->setMinimumSize( TQSize( 140, 0 ) );

    layout9->addWidget( TextLabel1, 0, 0 );
    tabGeneralLayout->addLayout( layout9 );

    m_attemptMatch = new TQCheckBox( tabGeneral, "m_attemptMatch" );
    tabGeneralLayout->addWidget( m_attemptMatch );
    Spacer12 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    tabGeneralLayout->addItem( Spacer12 );
    profileTabs->insertTab( tabGeneral, TQString::fromLatin1("") );

    tabDate = new TQWidget( profileTabs, "tabDate" );
    tabDateLayout = new TQVBoxLayout( tabDate, 11, 6, "tabDateLayout"); 

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

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

    m_editDateFormat = new KComboBox( false, tabDate, "m_editDateFormat" );

    layout36->addWidget( m_editDateFormat, 0, 1 );

    TextLabel3 = new TQLabel( tabDate, "TextLabel3" );
    TextLabel3->setMinimumSize( TQSize( 140, 0 ) );

    layout36->addWidget( TextLabel3, 0, 0 );

    m_editApostrophe = new KComboBox( false, tabDate, "m_editApostrophe" );

    layout36->addWidget( m_editApostrophe, 1, 1 );

    TextLabel4 = new TQLabel( tabDate, "TextLabel4" );
    TextLabel4->setMinimumSize( TQSize( 140, 0 ) );

    layout36->addWidget( TextLabel4, 1, 0 );
    layout43->addLayout( layout36 );
    Spacer9 = new TQSpacerItem( 90, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout43->addItem( Spacer9 );
    tabDateLayout->addLayout( layout43 );
    Spacer8 = new TQSpacerItem( 20, 80, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    tabDateLayout->addItem( Spacer8 );
    profileTabs->insertTab( tabDate, TQString::fromLatin1("") );

    tabMoney = new TQWidget( profileTabs, "tabMoney" );
    tabMoneyLayout = new TQVBoxLayout( tabMoney, 11, 6, "tabMoneyLayout"); 

    m_editAmounts = new TQListView( tabMoney, "m_editAmounts" );
    m_editAmounts->addColumn( tr2i18n( "Field" ) );
    m_editAmounts->header()->setClickEnabled( false, m_editAmounts->header()->count() - 1 );
    m_editAmounts->header()->setResizeEnabled( false, m_editAmounts->header()->count() - 1 );
    m_editAmounts->addColumn( tr2i18n( "QIF-Record" ) );
    m_editAmounts->header()->setClickEnabled( false, m_editAmounts->header()->count() - 1 );
    m_editAmounts->header()->setResizeEnabled( false, m_editAmounts->header()->count() - 1 );
    m_editAmounts->addColumn( tr2i18n( "Decimal Symbol" ) );
    m_editAmounts->header()->setClickEnabled( false, m_editAmounts->header()->count() - 1 );
    m_editAmounts->header()->setResizeEnabled( false, m_editAmounts->header()->count() - 1 );
    m_editAmounts->addColumn( tr2i18n( "Thousand Delimiter" ) );
    m_editAmounts->header()->setClickEnabled( false, m_editAmounts->header()->count() - 1 );
    m_editAmounts->header()->setResizeEnabled( false, m_editAmounts->header()->count() - 1 );
    m_editAmounts->addColumn( tr2i18n( "SortColumnInvisible" ) );
    m_editAmounts->setHScrollBarMode( TQListView::AlwaysOff );
    m_editAmounts->setAllColumnsShowFocus( true );
    m_editAmounts->setDefaultRenameAction( TQListView::Accept );
    tabMoneyLayout->addWidget( m_editAmounts );

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

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

    m_thousandsBox = new KComboBox( false, tabMoney, "m_thousandsBox" );

    layout40->addWidget( m_thousandsBox, 1, 1 );

    TextLabel1_2 = new TQLabel( tabMoney, "TextLabel1_2" );
    TextLabel1_2->setMinimumSize( TQSize( 150, 0 ) );

    layout40->addWidget( TextLabel1_2, 0, 0 );

    TextLabel1_3 = new TQLabel( tabMoney, "TextLabel1_3" );
    TextLabel1_3->setMinimumSize( TQSize( 150, 0 ) );

    layout40->addWidget( TextLabel1_3, 1, 0 );

    m_decimalBox = new KComboBox( false, tabMoney, "m_decimalBox" );

    layout40->addWidget( m_decimalBox, 0, 1 );
    layout41->addLayout( layout40 );
    Spacer7 = new TQSpacerItem( 100, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout41->addItem( Spacer7 );
    tabMoneyLayout->addLayout( layout41 );
    Spacer8_2 = new TQSpacerItem( 16, 16, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    tabMoneyLayout->addItem( Spacer8_2 );
    profileTabs->insertTab( tabMoney, TQString::fromLatin1("") );

    tabFilter = new TQWidget( profileTabs, "tabFilter" );
    tabFilterLayout = new TQVBoxLayout( tabFilter, 11, 6, "tabFilterLayout"); 

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

    TextLabel1_4_2 = new TQLabel( tabFilter, "TextLabel1_4_2" );
    TextLabel1_4_2->setMinimumSize( TQSize( 140, 0 ) );

    layout14->addWidget( TextLabel1_4_2, 2, 0 );

    m_editInputFilterLocation = new KURLRequester( tabFilter, "m_editInputFilterLocation" );

    layout14->addWidget( m_editInputFilterLocation, 0, 1 );

    m_editOutputFilterLocation = new KURLRequester( tabFilter, "m_editOutputFilterLocation" );
    m_editOutputFilterLocation->setEnabled( false );

    layout14->addWidget( m_editOutputFilterLocation, 2, 1 );

    TextLabel1_4_3 = new TQLabel( tabFilter, "TextLabel1_4_3" );
    TextLabel1_4_3->setMinimumSize( TQSize( 140, 0 ) );

    layout14->addWidget( TextLabel1_4_3, 1, 0 );

    m_editInputFilterFileType = new TQLineEdit( tabFilter, "m_editInputFilterFileType" );

    layout14->addWidget( m_editInputFilterFileType, 1, 1 );

    TextLabel1_4 = new TQLabel( tabFilter, "TextLabel1_4" );
    TextLabel1_4->setMinimumSize( TQSize( 140, 0 ) );

    layout14->addWidget( TextLabel1_4, 0, 0 );
    tabFilterLayout->addLayout( layout14 );
    Spacer9_2 = new TQSpacerItem( 20, 90, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    tabFilterLayout->addItem( Spacer9_2 );
    profileTabs->insertTab( tabFilter, TQString::fromLatin1("") );
    layout15->addWidget( profileTabs );
    MyMoneyQifProfileEditorDeclLayout->addLayout( layout15 );

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

    m_helpButton = new KPushButton( this, "m_helpButton" );
    m_helpButton->setProperty( "stdItem", 11 );
    Layout14->addWidget( m_helpButton );

    m_newButton = new KPushButton( this, "m_newButton" );
    Layout14->addWidget( m_newButton );

    m_deleteButton = new KPushButton( this, "m_deleteButton" );
    m_deleteButton->setProperty( "stdItem", 22 );
    Layout14->addWidget( m_deleteButton );

    m_renameButton = new KPushButton( this, "m_renameButton" );
    Layout14->addWidget( m_renameButton );
    Horizontal_Spacing2 = new TQSpacerItem( 104, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    Layout14->addItem( Horizontal_Spacing2 );

    m_resetButton = new KPushButton( this, "m_resetButton" );
    m_resetButton->setProperty( "stdItem", 21 );
    Layout14->addWidget( m_resetButton );

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

    m_cancelButton = new KPushButton( this, "m_cancelButton" );
    m_cancelButton->setAutoDefault( true );
    m_cancelButton->setProperty( "stdItem", 2 );
    Layout14->addWidget( m_cancelButton );
    MyMoneyQifProfileEditorDeclLayout->addLayout( Layout14 );
    languageChange();
    resize( TQSize(736, 300).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( m_profileListBox, profileTabs );
    setTabOrder( profileTabs, m_editDescription );
    setTabOrder( m_editDescription, m_editType );
    setTabOrder( m_editType, m_editOpeningBalance );
    setTabOrder( m_editOpeningBalance, m_editAccountDelimiter );
    setTabOrder( m_editAccountDelimiter, m_editVoidMark );
    setTabOrder( m_editVoidMark, m_helpButton );
    setTabOrder( m_helpButton, m_newButton );
    setTabOrder( m_newButton, m_deleteButton );
    setTabOrder( m_deleteButton, m_renameButton );
    setTabOrder( m_renameButton, m_resetButton );
    setTabOrder( m_resetButton, m_okButton );
    setTabOrder( m_okButton, m_cancelButton );
    setTabOrder( m_cancelButton, m_editDateFormat );
    setTabOrder( m_editDateFormat, m_editApostrophe );
    setTabOrder( m_editApostrophe, m_decimalBox );
    setTabOrder( m_decimalBox, m_thousandsBox );
    setTabOrder( m_thousandsBox, m_editAmounts );
    setTabOrder( m_editAmounts, m_editInputFilterLocation );
    setTabOrder( m_editInputFilterLocation, m_editOutputFilterLocation );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void MyMoneyQifProfileEditorDecl::languageChange()
{
    setCaption( tr2i18n( "QIF Profile Editor" ) );
    m_profileListBox->clear();
    m_profileListBox->insertItem( TQString::null );
    TextLabel2_2_3->setText( tr2i18n( "Void mark" ) );
    TextLabel2_2->setText( tr2i18n( "Opening Balance text" ) );
    TextLabel2->setText( tr2i18n( "Type field text" ) );
    TextLabel2_2_2->setText( tr2i18n( "Account delimiter" ) );
    TextLabel1->setText( tr2i18n( "Description" ) );
    m_attemptMatch->setText( tr2i18n( "Attempt to match similar transactions" ) );
    profileTabs->changeTab( tabGeneral, tr2i18n( "General" ) );
    TQWhatsThis::add( m_editDateFormat, tr2i18n( "The format of the dates in the QIF file." ) );
    TextLabel3->setText( tr2i18n( "Date Format" ) );
    TQWhatsThis::add( TextLabel3, tr2i18n( "The format of the dates in the QIF file." ) );
    TQWhatsThis::add( m_editApostrophe, tr2i18n( "If a QIF file contains date entries with years represented with two digits then either an apostrophe or a slash may be used to delimit the year in the dates for certain centuries.  This enables 1905 to be distinguished from 2005.  Specify here which range of years will have year delimited by an apostrophe (eg. for Quicken this is usually 1900-1949)." ) );
    TextLabel4->setText( tr2i18n( "Apostrophe Handling" ) );
    TQWhatsThis::add( TextLabel4, tr2i18n( "If a QIF file contains date entries with years represented with two digits then either an apostrophe or a slash may be used to delimit the year in the dates for certain centuries.  This enables 1905 to be distinguished from 2005.  Specify here which range of years will have year delimited by an apostrophe (eg. for Quicken this is usually 1900-1949)." ) );
    profileTabs->changeTab( tabDate, tr2i18n( "Date" ) );
    m_editAmounts->header()->setLabel( 0, tr2i18n( "Field" ) );
    m_editAmounts->header()->setLabel( 1, tr2i18n( "QIF-Record" ) );
    m_editAmounts->header()->setLabel( 2, tr2i18n( "Decimal Symbol" ) );
    m_editAmounts->header()->setLabel( 3, tr2i18n( "Thousand Delimiter" ) );
    m_editAmounts->header()->setLabel( 4, tr2i18n( "SortColumnInvisible" ) );
    m_editAmounts->clear();
    TQListViewItem * item = new TQListViewItem( m_editAmounts, 0 );
    item->setText( 0, tr2i18n( "Value" ) );
    item->setText( 1, tr2i18n( "T" ) );
    item->setText( 4, tr2i18n( "0" ) );

    item = new TQListViewItem( m_editAmounts, item );
    item->setText( 0, tr2i18n( "Split-Value" ) );
    item->setText( 1, tr2i18n( "$" ) );
    item->setText( 4, tr2i18n( "1" ) );

    item = new TQListViewItem( m_editAmounts, item );
    item->setText( 0, tr2i18n( "Commission" ) );
    item->setText( 1, tr2i18n( "O" ) );
    item->setText( 4, tr2i18n( "2" ) );

    item = new TQListViewItem( m_editAmounts, item );
    item->setText( 0, tr2i18n( "Price" ) );
    item->setText( 1, tr2i18n( "I" ) );
    item->setText( 4, tr2i18n( "3" ) );

    item = new TQListViewItem( m_editAmounts, item );
    item->setText( 0, tr2i18n( "Quantity" ) );
    item->setText( 1, tr2i18n( "Q" ) );
    item->setText( 4, tr2i18n( "4" ) );

    TextLabel1_2->setText( tr2i18n( "Decimal Symbol" ) );
    TextLabel1_3->setText( tr2i18n( "Thousands Separator" ) );
    profileTabs->changeTab( tabMoney, tr2i18n( "Amounts" ) );
    TextLabel1_4_2->setText( tr2i18n( "Output filter location" ) );
    TextLabel1_4_3->setText( tr2i18n( "Input filter file type" ) );
    m_editInputFilterFileType->setText( tr2i18n( "*.qif" ) );
    TextLabel1_4->setText( tr2i18n( "Input filter location" ) );
    profileTabs->changeTab( tabFilter, tr2i18n( "Filter" ) );
    m_helpButton->setText( tr2i18n( "&Help" ) );
    m_newButton->setText( tr2i18n( "New" ) );
    m_deleteButton->setText( tr2i18n( "&Delete" ) );
    m_renameButton->setText( tr2i18n( "Rename" ) );
    m_resetButton->setText( tr2i18n( "&Reset" ) );
    m_okButton->setText( tr2i18n( "&OK" ) );
    m_cancelButton->setText( tr2i18n( "&Cancel" ) );
}

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

TQMetaObject *MyMoneyQifProfileEditorDecl::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_MyMoneyQifProfileEditorDecl( "MyMoneyQifProfileEditorDecl", &MyMoneyQifProfileEditorDecl::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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