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

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

#include "kxeattributedialogbase.h"

#include <ntqvariant.h>
#include <ntqlineedit.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a KXEAttributeDialogBase 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.
 */
KXEAttributeDialogBase::KXEAttributeDialogBase( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "KXEAttributeDialogBase" );
    setSizeGripEnabled( true );
    KXEAttributeDialogBaseLayout = new TQGridLayout( this, 1, 1, 11, 6, "KXEAttributeDialogBaseLayout"); 
    Spacer3 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    KXEAttributeDialogBaseLayout->addItem( Spacer3, 1, 1 );
    Spacer4 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    KXEAttributeDialogBaseLayout->addItem( Spacer4, 5, 1 );
    Spacer4_2 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    KXEAttributeDialogBaseLayout->addItem( Spacer4_2, 3, 1 );

    m_pEditNamespace = new TQLineEdit( this, "m_pEditNamespace" );

    KXEAttributeDialogBaseLayout->addWidget( m_pEditNamespace, 1, 0 );

    m_pEditValue = new TQLineEdit( this, "m_pEditValue" );

    KXEAttributeDialogBaseLayout->addWidget( m_pEditValue, 5, 0 );

    m_pEditQName = new TQLineEdit( this, "m_pEditQName" );

    KXEAttributeDialogBaseLayout->addWidget( m_pEditQName, 3, 0 );

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

    m_pBtnOK = new TQPushButton( this, "m_pBtnOK" );
    m_pBtnOK->setAutoDefault( true );
    m_pBtnOK->setDefault( true );
    Layout1->addWidget( m_pBtnOK );

    m_pBtnCancel = new TQPushButton( this, "m_pBtnCancel" );
    m_pBtnCancel->setAutoDefault( true );
    Layout1->addWidget( m_pBtnCancel );

    KXEAttributeDialogBaseLayout->addMultiCellLayout( Layout1, 7, 7, 0, 1 );

    m_pLblValue = new TQLabel( this, "m_pLblValue" );

    KXEAttributeDialogBaseLayout->addWidget( m_pLblValue, 4, 0 );

    m_pLblQName = new TQLabel( this, "m_pLblQName" );

    KXEAttributeDialogBaseLayout->addWidget( m_pLblQName, 2, 0 );

    m_pLblNamespace = new TQLabel( this, "m_pLblNamespace" );

    KXEAttributeDialogBaseLayout->addWidget( m_pLblNamespace, 0, 0 );

    m_pTextLabelMessage = new TQLabel( this, "m_pTextLabelMessage" );
    m_pTextLabelMessage->setPaletteForegroundColor( TQColor( 255, 0, 0 ) );
    m_pTextLabelMessage->setTextFormat( TQLabel::PlainText );

    KXEAttributeDialogBaseLayout->addWidget( m_pTextLabelMessage, 6, 0 );
    languageChange();
    resize( TQSize(339, 262).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( m_pBtnOK, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
    connect( m_pBtnCancel, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );

    // tab order
    setTabOrder( m_pEditQName, m_pEditValue );
    setTabOrder( m_pEditValue, m_pBtnOK );
    setTabOrder( m_pBtnOK, m_pBtnCancel );
    setTabOrder( m_pBtnCancel, m_pEditNamespace );

    // buddies
    m_pLblValue->setBuddy( m_pEditValue );
    m_pLblQName->setBuddy( m_pEditQName );
    m_pLblNamespace->setBuddy( m_pEditNamespace );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KXEAttributeDialogBase::languageChange()
{
    setCaption( tr2i18n( "XML Attribute" ) );
    TQWhatsThis::add( m_pEditNamespace, tr2i18n( "<b>Namespace URI</b>\n"
"<br/>\n"
"Enter the namespace URI for this attribute here." ) );
    TQWhatsThis::add( m_pEditValue, tr2i18n( "<b>Value</b>\n"
"<br/>\n"
"Enter the attribute's value here." ) );
    TQWhatsThis::add( m_pEditQName, tr2i18n( "<b>Qualified Name</b>\n"
"<br/>\n"
"Enter a qualified name for the attribute here." ) );
    m_pBtnOK->setText( tr2i18n( "&OK" ) );
    m_pBtnCancel->setText( tr2i18n( "&Cancel" ) );
    m_pLblValue->setText( tr2i18n( "&Value:" ) );
    TQWhatsThis::add( m_pLblValue, tr2i18n( "<b>Value</b>\n"
"<br/>\n"
"Enter the attribute's value here." ) );
    m_pLblQName->setText( tr2i18n( "Qualified &Name:" ) );
    TQWhatsThis::add( m_pLblQName, tr2i18n( "<b>Qualified Name</b>\n"
"<br/>\n"
"Enter a qualified name for the attribute here." ) );
    m_pLblNamespace->setText( tr2i18n( "Namespace &URI:" ) );
    TQWhatsThis::add( m_pLblNamespace, tr2i18n( "<b>Namespace URI</b>\n"
"<br/>\n"
"Enter the namespace URI for this attribute here." ) );
}

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

TQMetaObject *KXEAttributeDialogBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KXEAttributeDialogBase( "KXEAttributeDialogBase", &KXEAttributeDialogBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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