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

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

#include "kxeprocinstrdialogbase.h"

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

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

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

    m_pLblTarget = new TQLabel( this, "m_pLblTarget" );
    layout4->addWidget( m_pLblTarget );

    m_pEditTarget = new TQLineEdit( this, "m_pEditTarget" );
    layout4->addWidget( m_pEditTarget );
    Spacer2 = new TQSpacerItem( 60, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout4->addItem( Spacer2 );

    m_pLblInsert = new TQLabel( this, "m_pLblInsert" );
    layout4->addWidget( m_pLblInsert );

    m_pComboInsert = new TQComboBox( false, this, "m_pComboInsert" );
    layout4->addWidget( m_pComboInsert );

    KXEProcInstrDialogBaseLayout->addLayout( layout4, 0, 0 );

    m_pEditData = new TQTextEdit( this, "m_pEditData" );
    m_pEditData->setWordWrap( TQTextEdit::NoWrap );

    KXEProcInstrDialogBaseLayout->addWidget( m_pEditData, 1, 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 );

    KXEProcInstrDialogBaseLayout->addLayout( Layout1, 3, 0 );

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

    KXEProcInstrDialogBaseLayout->addWidget( m_pTextLabelMessage, 2, 0 );
    languageChange();
    resize( TQSize(367, 244).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

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

    // tab order
    setTabOrder( m_pEditTarget, m_pComboInsert );
    setTabOrder( m_pComboInsert, m_pEditData );
    setTabOrder( m_pEditData, m_pBtnOK );
    setTabOrder( m_pBtnOK, m_pBtnCancel );

    // buddies
    m_pLblTarget->setBuddy( m_pEditTarget );
    m_pLblInsert->setBuddy( m_pComboInsert );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KXEProcInstrDialogBase::languageChange()
{
    setCaption( tr2i18n( "Processing Instruction" ) );
    m_pLblTarget->setText( tr2i18n( "&Target:" ) );
    TQWhatsThis::add( m_pLblTarget, tr2i18n( "<b>Target</b><br/>\n"
"Define the target of this processing instruction here." ) );
    TQWhatsThis::add( m_pEditTarget, tr2i18n( "<b>Target</b><br/>\n"
"Define the target of this processing instruction here." ) );
    m_pLblInsert->setText( tr2i18n( "&Insert:" ) );
    TQWhatsThis::add( m_pLblInsert, tr2i18n( "<b>Insert</b>\n"
"<br/>\n"
"Choose, where to place this processing instruction in the parent elements list." ) );
    m_pComboInsert->clear();
    m_pComboInsert->insertItem( tr2i18n( "at bottom" ) );
    m_pComboInsert->insertItem( tr2i18n( "at top" ) );
    TQWhatsThis::add( m_pComboInsert, tr2i18n( "<b>Insert</b>\n"
"<br/>\n"
"Choose, where to place this processing instruction in the parent elements list." ) );
    TQWhatsThis::add( m_pEditData, tr2i18n( "Here you can enter the data (the instructions) of this XML processing instruction." ) );
    m_pBtnOK->setText( tr2i18n( "&OK" ) );
    m_pBtnCancel->setText( tr2i18n( "&Cancel" ) );
}

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

TQMetaObject *KXEProcInstrDialogBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KXEProcInstrDialogBase( "KXEProcInstrDialogBase", &KXEProcInstrDialogBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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