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

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

#include "kcategoryreassigndlgdecl.h"

#include <ntqvariant.h>
#include <kmymoney/kmymoneycategory.h>
#include <ntqlabel.h>
#include <ntqframe.h>
#include <kpushbutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    textLabel1 = new TQLabel( this, "textLabel1" );
    textLabel1->setMinimumSize( TQSize( 300, 0 ) );
    textLabel1->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignJustify | TQLabel::AlignTop ) );
    KCategoryeReassignDlgDeclLayout->addWidget( textLabel1 );
    spacer8 = new TQSpacerItem( 20, 16, TQSizePolicy::Minimum, TQSizePolicy::Fixed );
    KCategoryeReassignDlgDeclLayout->addItem( spacer8 );

    textLabel2 = new TQLabel( this, "textLabel2" );
    KCategoryeReassignDlgDeclLayout->addWidget( textLabel2 );

    m_category = new KMyMoneyCategory( this, "m_category" );
    KCategoryeReassignDlgDeclLayout->addWidget( m_category );
    spacer9 = new TQSpacerItem( 20, 16, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    KCategoryeReassignDlgDeclLayout->addItem( spacer9 );

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

    layout2 = new TQHBoxLayout( 0, 0, 6, "layout2"); 
    Horizontal_Spacing2 = new TQSpacerItem( 305, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout2->addItem( Horizontal_Spacing2 );

    buttonOk = new KPushButton( this, "buttonOk" );
    buttonOk->setAutoDefault( true );
    buttonOk->setDefault( true );
    layout2->addWidget( buttonOk );

    buttonCancel = new KPushButton( this, "buttonCancel" );
    buttonCancel->setAutoDefault( true );
    layout2->addWidget( buttonCancel );
    KCategoryeReassignDlgDeclLayout->addLayout( layout2 );
    languageChange();
    resize( TQSize(392, 308).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

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

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KCategoryReassignDlgDecl::languageChange()
{
    setCaption( tr2i18n( "Reassign categories" ) );
    textLabel1->setText( tr2i18n( "The transactions, schedules and budgets associated with the selected category need to be re-assigned to a different category before the selected category can be deleted. Please select a category from the list below." ) );
    textLabel2->setText( tr2i18n( "Available categories:" ) );
    buttonOk->setText( tr2i18n( "OK" ) );
    buttonCancel->setText( tr2i18n( "Cancel" ) );
}

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

TQMetaObject *KCategoryReassignDlgDecl::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KCategoryReassignDlgDecl( "KCategoryReassignDlgDecl", &KCategoryReassignDlgDecl::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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