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

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

#include "walletwidget.h"

#include <ntqvariant.h>
#include <kdialog.h>
#include <kiconloader.h>
#include <ksqueezedtextlabel.h>
#include <ntqpushbutton.h>
#include <ntqsplitter.h>
#include <ntqframe.h>
#include <ntqlabel.h>
#include <ntqwidgetstack.h>
#include <ntqtextedit.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include <ntqimage.h>
#include <ntqpixmap.h>

/*
 *  Constructs a WalletWidget as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
WalletWidget::WalletWidget( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "WalletWidget" );
    WalletWidgetLayout = new TQGridLayout( this, 1, 1, 0, KDialog::spacingHint(), "WalletWidgetLayout"); 

    _splitter = new TQSplitter( this, "_splitter" );
    _splitter->setOrientation( TQSplitter::Horizontal );

    _entryListFrame = new TQFrame( _splitter, "_entryListFrame" );
    _entryListFrame->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, _entryListFrame->sizePolicy().hasHeightForWidth() ) );
    _entryListFrame->setFrameShape( TQFrame::NoFrame );
    _entryListFrame->setFrameShadow( TQFrame::Plain );

    TQWidget* privateLayoutWidget = new TQWidget( _splitter, "layout3" );
    layout3 = new TQGridLayout( privateLayoutWidget, 1, 1, KDialog::marginHint(), KDialog::spacingHint(), "layout3"); 

    _entryName = new KSqueezedTextLabel( privateLayoutWidget, "_entryName" );
    _entryName->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)1, 0, 0, _entryName->sizePolicy().hasHeightForWidth() ) );
    _entryName->setTextFormat( KSqueezedTextLabel::PlainText );

    layout3->addMultiCellWidget( _entryName, 1, 1, 0, 2 );
    spacer1 = new TQSpacerItem( 227, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout3->addItem( spacer1, 3, 0 );

    _undoChanges = new TQPushButton( privateLayoutWidget, "_undoChanges" );
    _undoChanges->setEnabled( false );
    _undoChanges->setIconSet( TQIconSet( SmallIconSet( "edit-undo" ) ) );

    layout3->addWidget( _undoChanges, 3, 1 );

    layout2 = new TQHBoxLayout( 0, 0, KDialog::spacingHint(), "layout2"); 

    _iconTitle = new TQLabel( privateLayoutWidget, "_iconTitle" );
    _iconTitle->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, 0, 0, _iconTitle->sizePolicy().hasHeightForWidth() ) );
    layout2->addWidget( _iconTitle );

    _entryTitle = new TQLabel( privateLayoutWidget, "_entryTitle" );
    _entryTitle->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)1, 0, 0, _entryTitle->sizePolicy().hasHeightForWidth() ) );
    TQFont _entryTitle_font(  _entryTitle->font() );
    _entryTitle_font.setBold( true );
    _entryTitle->setFont( _entryTitle_font ); 
    _entryTitle->setTextFormat( TQLabel::RichText );
    _entryTitle->setAlignment( int( TQLabel::AlignVCenter ) );
    layout2->addWidget( _entryTitle );

    layout3->addMultiCellLayout( layout2, 0, 0, 0, 2 );

    _saveChanges = new TQPushButton( privateLayoutWidget, "_saveChanges" );
    _saveChanges->setEnabled( false );
    _saveChanges->setIconSet( TQIconSet( SmallIconSet( "document-save" ) ) );

    layout3->addWidget( _saveChanges, 3, 2 );

    _entryStack = new TQWidgetStack( privateLayoutWidget, "_entryStack" );
    _entryStack->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 1, _entryStack->sizePolicy().hasHeightForWidth() ) );

    page = new TQWidget( _entryStack, "page" );
    _entryStack->addWidget( page, 0 );

    page_2 = new TQWidget( _entryStack, "page_2" );
    pageLayout = new TQGridLayout( page_2, 1, 1, 0, KDialog::spacingHint(), "pageLayout"); 

    _passwordValue = new TQTextEdit( page_2, "_passwordValue" );
    _passwordValue->setTextFormat( TQTextEdit::PlainText );

    pageLayout->addMultiCellWidget( _passwordValue, 1, 1, 0, 1 );
    spacer8 = new TQSpacerItem( 271, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    pageLayout->addItem( spacer8, 0, 1 );

    _hideContents = new TQPushButton( page_2, "_hideContents" );

    pageLayout->addWidget( _hideContents, 0, 0 );
    _entryStack->addWidget( page_2, 1 );

    page_3 = new TQWidget( _entryStack, "page_3" );
    _entryStack->addWidget( page_3, 2 );

    page_4 = new TQWidget( _entryStack, "page_4" );
    pageLayout_2 = new TQGridLayout( page_4, 1, 1, 0, KDialog::spacingHint(), "pageLayout_2"); 

    textLabel1_2 = new TQLabel( page_4, "textLabel1_2" );
    textLabel1_2->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) );

    pageLayout_2->addWidget( textLabel1_2, 1, 1 );
    spacer3 = new TQSpacerItem( 31, 41, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    pageLayout_2->addItem( spacer3, 0, 1 );
    spacer4 = new TQSpacerItem( 31, 41, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    pageLayout_2->addItem( spacer4, 2, 1 );
    spacer5 = new TQSpacerItem( 61, 41, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    pageLayout_2->addItem( spacer5, 1, 2 );
    spacer6 = new TQSpacerItem( 41, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    pageLayout_2->addItem( spacer6, 1, 0 );
    _entryStack->addWidget( page_4, 3 );

    page_5 = new TQWidget( _entryStack, "page_5" );
    pageLayout_3 = new TQGridLayout( page_5, 1, 1, 0, KDialog::spacingHint(), "pageLayout_3"); 
    spacer7 = new TQSpacerItem( 236, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    pageLayout_3->addItem( spacer7, 0, 1 );
    spacer6_2 = new TQSpacerItem( 31, 358, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    pageLayout_3->addItem( spacer6_2, 1, 0 );

    _showContents = new TQPushButton( page_5, "_showContents" );

    pageLayout_3->addWidget( _showContents, 0, 0 );
    _entryStack->addWidget( page_5, 4 );

    layout3->addMultiCellWidget( _entryStack, 2, 2, 0, 2 );

    WalletWidgetLayout->addWidget( _splitter, 0, 0 );
    languageChange();
    resize( TQSize(614, 507).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void WalletWidget::languageChange()
{
    _entryName->setText( TQString::null );
    _undoChanges->setText( tr2i18n( "&Undo" ) );
    _iconTitle->setText( TQString::null );
    _entryTitle->setText( TQString::null );
    _saveChanges->setText( tr2i18n( "&Save" ) );
    _hideContents->setText( tr2i18n( "Hide &Contents" ) );
    textLabel1_2->setText( tr2i18n( "This is a binary data entry.  It cannot be editted as its format is unknown and application specific." ) );
    _showContents->setText( tr2i18n( "Show &Contents" ) );
}

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

TQMetaObject *WalletWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_WalletWidget( "WalletWidget", &WalletWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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