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

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

#include "ksplitcorrectiondlg.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <kactivelabel.h>
#include <ntqlabel.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqframe.h>
#include <kpushbutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a KSplitCorrectionDlgDecl 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.
 */
KSplitCorrectionDlgDecl::KSplitCorrectionDlgDecl( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "KSplitCorrectionDlgDecl" );
    setMinimumSize( TQSize( 80, 0 ) );
    KSplitCorrectionDlgDeclLayout = new TQVBoxLayout( this, 11, 6, "KSplitCorrectionDlgDeclLayout"); 

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

    explanation = new KActiveLabel( this, "explanation" );
    explanation->setFocusPolicy( KActiveLabel::NoFocus );
    layout4->addWidget( explanation );

    question = new TQLabel( this, "question" );
    question->setEnabled( true );
    layout4->addWidget( question );

    buttonGroup = new TQButtonGroup( this, "buttonGroup" );
    buttonGroup->setFrameShape( TQButtonGroup::NoFrame );
    buttonGroup->setColumnLayout(0, TQt::Vertical );
    buttonGroup->layout()->setSpacing( 6 );
    buttonGroup->layout()->setMargin( 11 );
    buttonGroupLayout = new TQVBoxLayout( buttonGroup->layout() );
    buttonGroupLayout->setAlignment( TQt::AlignTop );

    continueBtn = new TQRadioButton( buttonGroup, "continueBtn" );
    continueBtn->setChecked( true );
    buttonGroupLayout->addWidget( continueBtn );

    changeBtn = new TQRadioButton( buttonGroup, "changeBtn" );
    buttonGroupLayout->addWidget( changeBtn );

    distributeBtn = new TQRadioButton( buttonGroup, "distributeBtn" );
    distributeBtn->setEnabled( false );
    buttonGroupLayout->addWidget( distributeBtn );

    leaveBtn = new TQRadioButton( buttonGroup, "leaveBtn" );
    buttonGroupLayout->addWidget( leaveBtn );
    layout4->addWidget( buttonGroup );
    KSplitCorrectionDlgDeclLayout->addLayout( layout4 );
    spacer3 = new TQSpacerItem( 20, 41, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    KSplitCorrectionDlgDeclLayout->addItem( spacer3 );

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

    layout3 = new TQHBoxLayout( 0, 0, 6, "layout3"); 
    spacer2 = new TQSpacerItem( 61, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout3->addItem( spacer2 );

    okBtn = new KPushButton( this, "okBtn" );
    okBtn->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)1, 0, 0, okBtn->sizePolicy().hasHeightForWidth() ) );
    okBtn->setMinimumSize( TQSize( 80, 0 ) );
    layout3->addWidget( okBtn );

    cancelBtn = new KPushButton( this, "cancelBtn" );
    cancelBtn->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)1, 0, 0, cancelBtn->sizePolicy().hasHeightForWidth() ) );
    cancelBtn->setMinimumSize( TQSize( 80, 0 ) );
    layout3->addWidget( cancelBtn );
    KSplitCorrectionDlgDeclLayout->addLayout( layout3 );
    languageChange();
    resize( TQSize(462, 292).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( okBtn, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
    connect( cancelBtn, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KSplitCorrectionDlgDecl::languageChange()
{
    setCaption( tr2i18n( "Correct splits" ) );
    explanation->setText( tr2i18n( "xxx" ) );
    question->setText( tr2i18n( "How do you want to proceed?" ) );
    buttonGroup->setTitle( TQString::null );
    continueBtn->setText( tr2i18n( "Continue to edit splits" ) );
    changeBtn->setText( tr2i18n( "Change total amount of transaction to %1." ) );
    distributeBtn->setText( tr2i18n( "Distribute difference of %1 among all splits." ) );
    leaveBtn->setText( tr2i18n( "Leave %1 unassigned." ) );
    okBtn->setText( tr2i18n( "OK" ) );
    cancelBtn->setText( tr2i18n( "Cancel" ) );
}

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

TQMetaObject *KSplitCorrectionDlgDecl::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KSplitCorrectionDlgDecl( "KSplitCorrectionDlgDecl", &KSplitCorrectionDlgDecl::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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