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

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

#include "ksettingsregisterdecl.h"

#include <ntqvariant.h>
#include <kmymoney/transactionsortoption.h>
#include <ntqpushbutton.h>
#include <ntqtabwidget.h>
#include <ntqcheckbox.h>
#include <ktextedit.h>
#include <kactivelabel.h>
#include <ntqlabel.h>
#include <kcombobox.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <knuminput.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

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

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

    kcfg_ShowGrid = new TQCheckBox( tab_2, "kcfg_ShowGrid" );
    tabLayout->addWidget( kcfg_ShowGrid );

    kcfg_LedgerLens = new TQCheckBox( tab_2, "kcfg_LedgerLens" );
    tabLayout->addWidget( kcfg_LedgerLens );

    kcfg_TransactionForm = new TQCheckBox( tab_2, "kcfg_TransactionForm" );
    tabLayout->addWidget( kcfg_TransactionForm );

    kcfg_AlwaysShowNrField = new TQCheckBox( tab_2, "kcfg_AlwaysShowNrField" );
    tabLayout->addWidget( kcfg_AlwaysShowNrField );

    kcfg_ShowFancyMarker = new TQCheckBox( tab_2, "kcfg_ShowFancyMarker" );
    tabLayout->addWidget( kcfg_ShowFancyMarker );

    kcfg_ShowFiscalMarker = new TQCheckBox( tab_2, "kcfg_ShowFiscalMarker" );
    tabLayout->addWidget( kcfg_ShowFiscalMarker );
    spacer6 = new TQSpacerItem( 20, 40, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    tabLayout->addItem( spacer6 );
    tab->insertTab( tab_2, TQString::fromLatin1("") );

    sorting = new TQWidget( tab, "sorting" );
    sortingLayout = new TQVBoxLayout( sorting, 11, 6, "sortingLayout"); 

    tabWidget3 = new TQTabWidget( sorting, "tabWidget3" );

    tab_3 = new TQWidget( tabWidget3, "tab_3" );
    tabLayout_2 = new TQHBoxLayout( tab_3, 11, 6, "tabLayout_2"); 

    kcfg_sortNormalView = new KTextEdit( tab_3, "kcfg_sortNormalView" );
    tabLayout_2->addWidget( kcfg_sortNormalView );

    m_sortNormalView = new TransactionSortOption( tab_3, "m_sortNormalView" );
    tabLayout_2->addWidget( m_sortNormalView );
    tabWidget3->insertTab( tab_3, TQString::fromLatin1("") );

    tab_4 = new TQWidget( tabWidget3, "tab_4" );
    tabLayout_3 = new TQHBoxLayout( tab_4, 11, 6, "tabLayout_3"); 

    kcfg_sortReconcileView = new KTextEdit( tab_4, "kcfg_sortReconcileView" );
    tabLayout_3->addWidget( kcfg_sortReconcileView );

    m_sortReconcileView = new TransactionSortOption( tab_4, "m_sortReconcileView" );
    tabLayout_3->addWidget( m_sortReconcileView );
    tabWidget3->insertTab( tab_4, TQString::fromLatin1("") );

    TabPage = new TQWidget( tabWidget3, "TabPage" );
    TabPageLayout = new TQHBoxLayout( TabPage, 11, 6, "TabPageLayout"); 

    kcfg_sortSearchView = new KTextEdit( TabPage, "kcfg_sortSearchView" );
    TabPageLayout->addWidget( kcfg_sortSearchView );

    m_sortSearchView = new TransactionSortOption( TabPage, "m_sortSearchView" );
    TabPageLayout->addWidget( m_sortSearchView );
    tabWidget3->insertTab( TabPage, TQString::fromLatin1("") );
    sortingLayout->addWidget( tabWidget3 );

    kActiveLabel2 = new KActiveLabel( sorting, "kActiveLabel2" );
    sortingLayout->addWidget( kActiveLabel2 );
    tab->insertTab( sorting, TQString::fromLatin1("") );

    TabPage_2 = new TQWidget( tab, "TabPage_2" );
    TabPageLayout_2 = new TQVBoxLayout( TabPage_2, 11, 6, "TabPageLayout_2"); 

    kcfg_CopyTypeToNr = new TQCheckBox( TabPage_2, "kcfg_CopyTypeToNr" );
    TabPageLayout_2->addWidget( kcfg_CopyTypeToNr );

    kcfg_AutoIncCheckNumber = new TQCheckBox( TabPage_2, "kcfg_AutoIncCheckNumber" );
    TabPageLayout_2->addWidget( kcfg_AutoIncCheckNumber );

    kcfg_FocusChangeIsEnter = new TQCheckBox( TabPage_2, "kcfg_FocusChangeIsEnter" );
    TabPageLayout_2->addWidget( kcfg_FocusChangeIsEnter );

    kcfg_EnterMovesBetweenFields = new TQCheckBox( TabPage_2, "kcfg_EnterMovesBetweenFields" );
    TabPageLayout_2->addWidget( kcfg_EnterMovesBetweenFields );

    kcfg_stringMatchFromStart = new TQCheckBox( TabPage_2, "kcfg_stringMatchFromStart" );
    TabPageLayout_2->addWidget( kcfg_stringMatchFromStart );

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

    textLabel2_2 = new TQLabel( TabPage_2, "textLabel2_2" );
    layout5->addWidget( textLabel2_2 );

    kcfg_defaultReconciliationState = new KComboBox( false, TabPage_2, "kcfg_defaultReconciliationState" );
    layout5->addWidget( kcfg_defaultReconciliationState );
    spacer15 = new TQSpacerItem( 31, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout5->addItem( spacer15 );
    TabPageLayout_2->addLayout( layout5 );

    kcfg_AutoFillTransaction = new TQButtonGroup( TabPage_2, "kcfg_AutoFillTransaction" );
    kcfg_AutoFillTransaction->setExclusive( false );
    kcfg_AutoFillTransaction->setProperty( "selectedId", -1 );
    kcfg_AutoFillTransaction->setColumnLayout(0, TQt::Vertical );
    kcfg_AutoFillTransaction->layout()->setSpacing( 6 );
    kcfg_AutoFillTransaction->layout()->setMargin( 11 );
    kcfg_AutoFillTransactionLayout = new TQVBoxLayout( kcfg_AutoFillTransaction->layout() );
    kcfg_AutoFillTransactionLayout->setAlignment( TQt::AlignTop );

    radioButton1 = new TQRadioButton( kcfg_AutoFillTransaction, "radioButton1" );
    kcfg_AutoFillTransactionLayout->addWidget( radioButton1 );

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

    radioButton2 = new TQRadioButton( kcfg_AutoFillTransaction, "radioButton2" );
    layout4->addWidget( radioButton2 );

    kcfg_AutoFillDifference = new KIntSpinBox( kcfg_AutoFillTransaction, "kcfg_AutoFillDifference" );
    kcfg_AutoFillDifference->setMaxValue( 100 );
    kcfg_AutoFillDifference->setValue( 10 );
    layout4->addWidget( kcfg_AutoFillDifference );

    textLabel2 = new TQLabel( kcfg_AutoFillTransaction, "textLabel2" );
    layout4->addWidget( textLabel2 );
    kcfg_AutoFillTransactionLayout->addLayout( layout4 );

    radioButton3 = new TQRadioButton( kcfg_AutoFillTransaction, "radioButton3" );
    kcfg_AutoFillTransactionLayout->addWidget( radioButton3 );
    TabPageLayout_2->addWidget( kcfg_AutoFillTransaction );
    spacer4 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    TabPageLayout_2->addItem( spacer4 );
    tab->insertTab( TabPage_2, TQString::fromLatin1("") );

    TabPage_3 = new TQWidget( tab, "TabPage_3" );
    TabPageLayout_3 = new TQVBoxLayout( TabPage_3, 11, 6, "TabPageLayout_3"); 

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

    textLabel1_2 = new TQLabel( TabPage_3, "textLabel1_2" );
    layout4_2->addWidget( textLabel1_2 );

    kcfg_matchInterval = new KIntSpinBox( TabPage_3, "kcfg_matchInterval" );
    kcfg_matchInterval->setButtonSymbols( KIntSpinBox::UpDownArrows );
    kcfg_matchInterval->setMaxValue( 99 );
    kcfg_matchInterval->setMinValue( 0 );
    kcfg_matchInterval->setValue( 4 );
    layout4_2->addWidget( kcfg_matchInterval );
    spacer13 = new TQSpacerItem( 61, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout4_2->addItem( spacer13 );
    TabPageLayout_3->addLayout( layout4_2 );

    kcfg_askForPayeeCategory = new TQCheckBox( TabPage_3, "kcfg_askForPayeeCategory" );
    TabPageLayout_3->addWidget( kcfg_askForPayeeCategory );
    spacer14 = new TQSpacerItem( 20, 60, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    TabPageLayout_3->addItem( spacer14 );
    tab->insertTab( TabPage_3, TQString::fromLatin1("") );
    KSettingsRegisterDeclLayout->addWidget( tab );
    languageChange();
    resize( TQSize(632, 403).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KSettingsRegisterDecl::languageChange()
{
    setCaption( tr2i18n( "Register settings" ) );
    kcfg_ShowGrid->setText( tr2i18n( "Show a grid in the register" ) );
    kcfg_LedgerLens->setText( tr2i18n( "Use the ledger lens" ) );
    TQWhatsThis::add( kcfg_LedgerLens, tr2i18n( "Using the ledger lens shows the details for the transaction that has focus in the ledger. Usually, when using the transaction form, only a one line summary is displayed for each transaction as the details are shown in the form." ) );
    kcfg_TransactionForm->setText( tr2i18n( "Show transaction form" ) );
    kcfg_AlwaysShowNrField->setText( tr2i18n( "Always show a No. field" ) );
    kcfg_ShowFancyMarker->setText( tr2i18n( "Show group header between transactions" ) );
    TQWhatsThis::add( kcfg_ShowFancyMarker, tr2i18n( "Draws a larger header above each group of transaction. The grouping depends on the current sort order." ) );
    kcfg_ShowFiscalMarker->setText( tr2i18n( "Show header for the previous and current fiscal year" ) );
    tab->changeTab( tab_2, tr2i18n( "Display" ) );
    tabWidget3->changeTab( tab_3, tr2i18n( "Normal view" ) );
    tabWidget3->changeTab( tab_4, tr2i18n( "Reconciliation view" ) );
    tabWidget3->changeTab( TabPage, tr2i18n( "Search view" ) );
    kActiveLabel2->setText( tr2i18n( "Use the <i>left</i> and <i>right</i> buttons to add and remove sort options. Use the <i>up</i> and <i>down</i> buttons to modify the sort order. Double-Click a selected entry to toggle the sort order between <i>ascending</i> and <i>descending</i>." ) );
    tab->changeTab( sorting, tr2i18n( "Sorting" ) );
    kcfg_CopyTypeToNr->setText( tr2i18n( "Insert transaction type into No. field for new transactions" ) );
    kcfg_AutoIncCheckNumber->setText( tr2i18n( "Auto increment check number" ) );
    kcfg_FocusChangeIsEnter->setText( tr2i18n( "Keep changes when selecting a different transaction/split" ) );
    kcfg_EnterMovesBetweenFields->setText( tr2i18n( "Use Enter to move between fields" ) );
    kcfg_stringMatchFromStart->setText( tr2i18n( "Match names from start" ) );
    TQWhatsThis::add( kcfg_stringMatchFromStart, tr2i18n( "Mark this option, if you always want to match names e.g. for payees from the start. If unset, any substring is matched." ) );
    textLabel2_2->setText( tr2i18n( "Default reconciliation state" ) );
    kcfg_defaultReconciliationState->clear();
    kcfg_defaultReconciliationState->insertItem( tr2i18n( "Not reconciled" ) );
    kcfg_defaultReconciliationState->insertItem( tr2i18n( "Cleared" ) );
    kcfg_defaultReconciliationState->insertItem( tr2i18n( "Reconciled" ) );
    TQToolTip::add( kcfg_defaultReconciliationState, tr2i18n( "Default reconciliation state for transactions entered during reconciliation of an account" ) );
    kcfg_AutoFillTransaction->setTitle( tr2i18n( "Autofill" ) );
    radioButton1->setText( tr2i18n( "No Autofill" ) );
    TQWhatsThis::add( radioButton1, tr2i18n( "Don't do autofill of transaction data at all." ) );
    radioButton2->setText( tr2i18n( "Same transaction if amount differs less than" ) );
    TQWhatsThis::add( radioButton2, tr2i18n( "Collect all transactions for the given payee. Treat all transactions that refer to the same category and have an amount with +/- X % as identical. If more than one transaction is found, a list of them is presented to the user.\n"
"\n"
"Selecting 0% will list all transactions." ) );
    TQWhatsThis::add( kcfg_AutoFillDifference, tr2i18n( "Two transactions are usually treated identical for autofill, if they refer the same accounts. They are treated as different transactions though, when their amount varies by more than the percentage given here." ) );
    textLabel2->setText( tr2i18n( "percent." ) );
    radioButton3->setText( tr2i18n( "with previously most often used transaction for the payee" ) );
    TQWhatsThis::add( radioButton3, tr2i18n( "The data of the last transaction assigned to the category used most often for this payee is autofilled into the transaction editor." ) );
    tab->changeTab( TabPage_2, tr2i18n( "Data entry" ) );
    textLabel1_2->setText( tr2i18n( "Match transactions within days" ) );
    TQWhatsThis::add( kcfg_matchInterval, tr2i18n( "Search for matching transactions within the range of the posting date of the imported transaction +/- the number of given days." ) );
    kcfg_askForPayeeCategory->setText( tr2i18n( "Ask for a new payee's default category" ) );
    TQWhatsThis::add( kcfg_askForPayeeCategory, tr2i18n( "Whenever a new payee is detected during import of a statement, the user will be asked to assign a default category for this user when this option is selected." ) );
    tab->changeTab( TabPage_3, tr2i18n( "Import" ) );
}

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

TQMetaObject *KSettingsRegisterDecl::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KSettingsRegisterDecl( "KSettingsRegisterDecl", &KSettingsRegisterDecl::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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