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

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

#include "kpayeesviewdecl.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <tdelistview.h>
#include <ntqtabwidget.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqlineedit.h>
#include <ntqmultilineedit.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <keditlistbox.h>
#include <ntqcheckbox.h>
#include <kpushbutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a KPayeesViewDecl as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
KPayeesViewDecl::KPayeesViewDecl( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "KPayeesViewDecl" );
    KPayeesViewDeclLayout = new TQVBoxLayout( this, 0, 6, "KPayeesViewDeclLayout"); 

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

    m_payeesList = new TDEListView( this, "m_payeesList" );
    m_payeesList->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 1, 1, m_payeesList->sizePolicy().hasHeightForWidth() ) );
    m_payeesList->setProperty( "selectionMode", "Extended" );
    m_payeesList->setAllColumnsShowFocus( true );
    m_payeesList->setShowSortIndicator( true );
    m_payeesList->setShadeSortColumn( false );
    layout10->addWidget( m_payeesList );

    m_tabWidget = new TQTabWidget( this, "m_tabWidget" );
    m_tabWidget->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 2, 1, m_tabWidget->sizePolicy().hasHeightForWidth() ) );

    tab = new TQWidget( m_tabWidget, "tab" );
    tabLayout = new TQVBoxLayout( tab, 11, 6, "tabLayout"); 

    transactionGroup = new TQGroupBox( tab, "transactionGroup" );
    transactionGroup->setColumnLayout(0, TQt::Vertical );
    transactionGroup->layout()->setSpacing( 6 );
    transactionGroup->layout()->setMargin( 11 );
    transactionGroupLayout = new TQVBoxLayout( transactionGroup->layout() );
    transactionGroupLayout->setAlignment( TQt::AlignTop );

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

    m_transactionView = new TDEListView( transactionGroup, "m_transactionView" );
    m_transactionView->addColumn( tr2i18n( "No." ) );
    m_transactionView->addColumn( tr2i18n( "Date" ) );
    m_transactionView->addColumn( tr2i18n( "Category" ) );
    m_transactionView->addColumn( tr2i18n( "Amount" ) );
    m_transactionView->setAllColumnsShowFocus( true );
    m_transactionView->setShadeSortColumn( false );
    Layout11->addWidget( m_transactionView );

    m_balanceLabel = new TQLabel( transactionGroup, "m_balanceLabel" );
    m_balanceLabel->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
    Layout11->addWidget( m_balanceLabel );
    transactionGroupLayout->addLayout( Layout11 );
    tabLayout->addWidget( transactionGroup );
    m_tabWidget->insertTab( tab, TQString::fromLatin1("") );

    tab_2 = new TQWidget( m_tabWidget, "tab_2" );
    tabLayout_2 = new TQVBoxLayout( tab_2, 11, 6, "tabLayout_2"); 

    detailsGroup = new TQGroupBox( tab_2, "detailsGroup" );
    detailsGroup->setColumnLayout(0, TQt::Vertical );
    detailsGroup->layout()->setSpacing( 6 );
    detailsGroup->layout()->setMargin( 11 );
    detailsGroupLayout = new TQGridLayout( detailsGroup->layout() );
    detailsGroupLayout->setAlignment( TQt::AlignTop );

    TextLabel7 = new TQLabel( detailsGroup, "TextLabel7" );
    TextLabel7->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)1, 0, 0, TextLabel7->sizePolicy().hasHeightForWidth() ) );
    TextLabel7->setMinimumSize( TQSize( 90, 0 ) );

    detailsGroupLayout->addWidget( TextLabel7, 3, 0 );

    TextLabel5 = new TQLabel( detailsGroup, "TextLabel5" );
    TextLabel5->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)1, 0, 0, TextLabel5->sizePolicy().hasHeightForWidth() ) );
    TextLabel5->setMinimumSize( TQSize( 90, 0 ) );

    detailsGroupLayout->addWidget( TextLabel5, 1, 0 );

    TextLabel6 = new TQLabel( detailsGroup, "TextLabel6" );
    TextLabel6->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)1, 0, 0, TextLabel6->sizePolicy().hasHeightForWidth() ) );
    TextLabel6->setMinimumSize( TQSize( 90, 0 ) );

    detailsGroupLayout->addWidget( TextLabel6, 2, 0 );

    TextLabel4_2 = new TQLabel( detailsGroup, "TextLabel4_2" );
    TextLabel4_2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)1, 0, 0, TextLabel4_2->sizePolicy().hasHeightForWidth() ) );
    TextLabel4_2->setMinimumSize( TQSize( 90, 0 ) );
    TextLabel4_2->setAlignment( int( TQLabel::AlignTop | TQLabel::AlignLeft ) );

    detailsGroupLayout->addWidget( TextLabel4_2, 4, 0 );

    postcodeEdit = new TQLineEdit( detailsGroup, "postcodeEdit" );

    detailsGroupLayout->addWidget( postcodeEdit, 1, 1 );

    telephoneEdit = new TQLineEdit( detailsGroup, "telephoneEdit" );

    detailsGroupLayout->addWidget( telephoneEdit, 2, 1 );

    emailEdit = new TQLineEdit( detailsGroup, "emailEdit" );

    detailsGroupLayout->addWidget( emailEdit, 3, 1 );

    addressEdit = new TQMultiLineEdit( detailsGroup, "addressEdit" );
    addressEdit->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 1, addressEdit->sizePolicy().hasHeightForWidth() ) );

    detailsGroupLayout->addWidget( addressEdit, 0, 1 );

    notesEdit = new TQMultiLineEdit( detailsGroup, "notesEdit" );
    notesEdit->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 1, notesEdit->sizePolicy().hasHeightForWidth() ) );

    detailsGroupLayout->addWidget( notesEdit, 4, 1 );

    TextLabel4 = new TQLabel( detailsGroup, "TextLabel4" );
    TextLabel4->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)1, 0, 0, TextLabel4->sizePolicy().hasHeightForWidth() ) );
    TextLabel4->setMinimumSize( TQSize( 90, 0 ) );
    TextLabel4->setAlignment( int( TQLabel::AlignTop | TQLabel::AlignLeft ) );

    detailsGroupLayout->addWidget( TextLabel4, 0, 0 );
    tabLayout_2->addWidget( detailsGroup );
    spacer6 = new TQSpacerItem( 21, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    tabLayout_2->addItem( spacer6 );
    m_tabWidget->insertTab( tab_2, TQString::fromLatin1("") );

    TabPage = new TQWidget( m_tabWidget, "TabPage" );
    TabPageLayout = new TQVBoxLayout( TabPage, 11, 6, "TabPageLayout"); 

    buttonGroup1 = new TQButtonGroup( TabPage, "buttonGroup1" );

    m_matchType = new TQButtonGroup( buttonGroup1, "m_matchType" );
    m_matchType->setGeometry( TQRect( 11, 25, 403, 87 ) );
    m_matchType->setFrameShape( TQButtonGroup::NoFrame );
    m_matchType->setFrameShadow( TQButtonGroup::Plain );
    m_matchType->setExclusive( true );

    radioNoMatch = new TQRadioButton( m_matchType, "radioNoMatch" );
    radioNoMatch->setGeometry( TQRect( 1, 1, 401, 24 ) );
    radioNoMatch->setChecked( true );

    radioNameMatch = new TQRadioButton( m_matchType, "radioNameMatch" );
    radioNameMatch->setGeometry( TQRect( 1, 31, 401, 24 ) );

    radioKeyMatch = new TQRadioButton( m_matchType, "radioKeyMatch" );
    radioKeyMatch->setGeometry( TQRect( 2, 62, 399, 24 ) );
    TabPageLayout->addWidget( buttonGroup1 );

    matchKeyEditList = new KEditListBox( TabPage, "matchKeyEditList" );
    matchKeyEditList->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)3, 0, 1, matchKeyEditList->sizePolicy().hasHeightForWidth() ) );
    TabPageLayout->addWidget( matchKeyEditList );

    checkMatchIgnoreCase = new TQCheckBox( TabPage, "checkMatchIgnoreCase" );
    TabPageLayout->addWidget( checkMatchIgnoreCase );
    spacer7 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    TabPageLayout->addItem( spacer7 );
    m_tabWidget->insertTab( TabPage, TQString::fromLatin1("") );

    TabPage2 = new TQWidget( m_tabWidget, "TabPage2" );
    TabPage2Layout = new TQVBoxLayout( TabPage2, 11, 6, "TabPage2Layout"); 

    checkEnableDefaultAccount = new TQCheckBox( TabPage2, "checkEnableDefaultAccount" );
    TabPage2Layout->addWidget( checkEnableDefaultAccount );

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

    labelDefaultAccount = new TQLabel( TabPage2, "labelDefaultAccount" );

    layout5->addWidget( labelDefaultAccount, 0, 0 );

    comboDefaultAccount = new KMyMoneyAccountCombo( TabPage2, "comboDefaultAccount" );

    layout5->addWidget( comboDefaultAccount, 0, 1 );

    buttonSelectMyAccount = new KPushButton( TabPage2, "buttonSelectMyAccount" );

    layout5->addWidget( buttonSelectMyAccount, 1, 1 );
    TabPage2Layout->addLayout( layout5 );
    spacer5 = new TQSpacerItem( 20, 31, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    TabPage2Layout->addItem( spacer5 );
    m_tabWidget->insertTab( TabPage2, TQString::fromLatin1("") );
    layout10->addWidget( m_tabWidget );
    KPayeesViewDeclLayout->addLayout( layout10 );

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

    m_helpButton = new KPushButton( this, "m_helpButton" );
    m_helpButton->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, m_helpButton->sizePolicy().hasHeightForWidth() ) );
    layout10_2->addWidget( m_helpButton );
    spacer14 = new TQSpacerItem( 260, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout10_2->addItem( spacer14 );

    m_updateButton = new KPushButton( this, "m_updateButton" );
    m_updateButton->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, m_updateButton->sizePolicy().hasHeightForWidth() ) );
    layout10_2->addWidget( m_updateButton );
    KPayeesViewDeclLayout->addLayout( layout10_2 );
    languageChange();
    resize( TQSize(689, 540).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KPayeesViewDecl::languageChange()
{
    transactionGroup->setTitle( tr2i18n( "Transactions" ) );
    m_transactionView->header()->setLabel( 0, tr2i18n( "No." ) );
    m_transactionView->header()->setLabel( 1, tr2i18n( "Date" ) );
    m_transactionView->header()->setLabel( 2, tr2i18n( "Category" ) );
    m_transactionView->header()->setLabel( 3, tr2i18n( "Amount" ) );
    m_balanceLabel->setText( tr2i18n( "Balance: " ) );
    m_tabWidget->changeTab( tab, tr2i18n( "Transactions" ) );
    detailsGroup->setTitle( tr2i18n( "Payee Information" ) );
    TextLabel7->setText( tr2i18n( "E-Mail:" ) );
    TextLabel5->setText( tr2i18n( "Postal Code:" ) );
    TextLabel6->setText( tr2i18n( "Telephone/Fax:" ) );
    TextLabel4_2->setText( tr2i18n( "Notes" ) );
    TextLabel4->setText( tr2i18n( "Address:" ) );
    m_tabWidget->changeTab( tab_2, tr2i18n( "Address" ) );
    buttonGroup1->setTitle( tr2i18n( "Transaction Matching" ) );
    m_matchType->setTitle( TQString::null );
    radioNoMatch->setText( tr2i18n( "No matching" ) );
    radioNameMatch->setText( tr2i18n( "Match on Payee name" ) );
    radioKeyMatch->setText( tr2i18n( "Match on a name listed below" ) );
    matchKeyEditList->setTitle( tr2i18n( "List of matching names" ) );
    TQWhatsThis::add( matchKeyEditList, tr2i18n( "This list contains the names that will match this payee if a transaction is imported from an external source. Keep in mind, that you can specify regular expressions here." ) );
    checkMatchIgnoreCase->setText( tr2i18n( "Ignore Case" ) );
    m_tabWidget->changeTab( TabPage, tr2i18n( "Matching" ) );
    checkEnableDefaultAccount->setText( tr2i18n( "Use the default account for\n"
"new transactions with this payee" ) );
    labelDefaultAccount->setText( tr2i18n( "Default category:" ) );
    buttonSelectMyAccount->setText( tr2i18n( "Suggest a category" ) );
    m_tabWidget->changeTab( TabPage2, tr2i18n( "Default Account" ) );
    m_helpButton->setText( tr2i18n( "Help" ) );
    m_updateButton->setText( TQString::null );
}

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

TQMetaObject *KPayeesViewDecl::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KPayeesViewDecl( "KPayeesViewDecl", &KPayeesViewDecl::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* KPayeesViewDecl::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 = TQWidget::staticMetaObject();
    static const TQUMethod slot_0 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"KPayeesViewDecl", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_KPayeesViewDecl.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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