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

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

#include "kxespecprocinstrdialogbase.h"

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

/*
 *  Constructs a KXESpecProcInstrDialogBase 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.
 */
KXESpecProcInstrDialogBase::KXESpecProcInstrDialogBase( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "KXESpecProcInstrDialogBase" );
    setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, sizePolicy().hasHeightForWidth() ) );
    KXESpecProcInstrDialogBaseLayout = new TQGridLayout( this, 1, 1, 11, 6, "KXESpecProcInstrDialogBaseLayout"); 

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

    KXESpecProcInstrDialogBaseLayout->addWidget( m_pTextLabel1, 0, 0 );

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

    KXESpecProcInstrDialogBaseLayout->addWidget( m_pLineEditVersion, 1, 0 );

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

    KXESpecProcInstrDialogBaseLayout->addWidget( m_pTextLabel2, 2, 0 );

    m_pComboBoxEncoding = new TQComboBox( false, this, "m_pComboBoxEncoding" );
    m_pComboBoxEncoding->setEditable( true );

    KXESpecProcInstrDialogBaseLayout->addWidget( m_pComboBoxEncoding, 3, 0 );

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

    m_pDontShowAgain = new TQCheckBox( this, "m_pDontShowAgain" );
    layout4->addWidget( m_pDontShowAgain );

    KXESpecProcInstrDialogBaseLayout->addLayout( layout4, 4, 0 );

    m_pHLine = new TQFrame( this, "m_pHLine" );
    m_pHLine->setFrameShape( TQFrame::HLine );
    m_pHLine->setFrameShadow( TQFrame::Raised );

    KXESpecProcInstrDialogBaseLayout->addWidget( m_pHLine, 5, 0 );

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

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

    m_pBtnCancel = new TQPushButton( this, "m_pBtnCancel" );
    m_pBtnCancel->setAutoDefault( false );
    layout2->addWidget( m_pBtnCancel );

    KXESpecProcInstrDialogBaseLayout->addLayout( layout2, 6, 0 );
    languageChange();
    resize( TQSize(216, 191).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

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

    // tab order
    setTabOrder( m_pLineEditVersion, m_pComboBoxEncoding );
    setTabOrder( m_pComboBoxEncoding, m_pDontShowAgain );
    setTabOrder( m_pDontShowAgain, m_pBtnOK );
    setTabOrder( m_pBtnOK, m_pBtnCancel );

    // buddies
    m_pTextLabel1->setBuddy( m_pLineEditVersion );
    m_pTextLabel2->setBuddy( m_pComboBoxEncoding );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KXESpecProcInstrDialogBase::languageChange()
{
    setCaption( tr2i18n( "Special processing instruction" ) );
    m_pTextLabel1->setText( tr2i18n( "XML &version:" ) );
    TQWhatsThis::add( m_pTextLabel1, tr2i18n( "<b>XML version</b><br/>\n"
"You can determine the XML version for XML document." ) );
    TQWhatsThis::add( m_pLineEditVersion, tr2i18n( "<b>XML version</b><br/>\n"
"You can determine the XML version for XML document." ) );
    m_pTextLabel2->setText( tr2i18n( "&Encoding:" ) );
    TQWhatsThis::add( m_pTextLabel2, tr2i18n( "<b>Encoding</b><br/>\n"
"You can determine the encoding used while saving this XML document." ) );
    TQWhatsThis::add( m_pComboBoxEncoding, tr2i18n( "<b>Encoding</b><br/>\n"
"You can determine the encoding used while saving this XML document." ) );
    m_pDontShowAgain->setText( tr2i18n( "Do not show this dialog again" ) );
    m_pDontShowAgain->setAccel( TQKeySequence( tr2i18n( "Ctrl+T" ) ) );
    TQWhatsThis::add( m_pDontShowAgain, tr2i18n( "<b>Do not show this dialog again</b><br/>\n"
"If you select this option, your choice will be remembered. Next time you create a new file, you won't be disturbed by this dialog box." ) );
    m_pBtnOK->setText( tr2i18n( "&OK" ) );
    m_pBtnCancel->setText( tr2i18n( "&Cancel" ) );
}

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

TQMetaObject *KXESpecProcInstrDialogBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KXESpecProcInstrDialogBase( "KXESpecProcInstrDialogBase", &KXESpecProcInstrDialogBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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