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

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

#include "kxetextviewsettingspage.h"

#include <ntqvariant.h>
#include <kcolorbutton.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqspinbox.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    m_pBoxSyntaxHL = new TQGroupBox( this, "m_pBoxSyntaxHL" );
    m_pBoxSyntaxHL->setColumnLayout(0, TQt::Vertical );
    m_pBoxSyntaxHL->layout()->setSpacing( 6 );
    m_pBoxSyntaxHL->layout()->setMargin( 11 );
    m_pBoxSyntaxHLLayout = new TQGridLayout( m_pBoxSyntaxHL->layout() );
    m_pBoxSyntaxHLLayout->setAlignment( TQt::AlignTop );

    m_pLblColorDfltText = new TQLabel( m_pBoxSyntaxHL, "m_pLblColorDfltText" );

    m_pBoxSyntaxHLLayout->addWidget( m_pLblColorDfltText, 0, 0 );

    m_pColorSyntaxChars = new KColorButton( m_pBoxSyntaxHL, "m_pColorSyntaxChars" );

    m_pBoxSyntaxHLLayout->addWidget( m_pColorSyntaxChars, 4, 1 );

    m_pLblColorElemNames = new TQLabel( m_pBoxSyntaxHL, "m_pLblColorElemNames" );

    m_pBoxSyntaxHLLayout->addWidget( m_pLblColorElemNames, 1, 0 );

    m_pColorComments = new KColorButton( m_pBoxSyntaxHL, "m_pColorComments" );

    m_pBoxSyntaxHLLayout->addWidget( m_pColorComments, 5, 1 );

    m_pLblColorErrors = new TQLabel( m_pBoxSyntaxHL, "m_pLblColorErrors" );

    m_pBoxSyntaxHLLayout->addWidget( m_pLblColorErrors, 6, 0 );

    m_pLblColorAttrValues = new TQLabel( m_pBoxSyntaxHL, "m_pLblColorAttrValues" );

    m_pBoxSyntaxHLLayout->addWidget( m_pLblColorAttrValues, 3, 0 );

    m_pColorElemNames = new KColorButton( m_pBoxSyntaxHL, "m_pColorElemNames" );

    m_pBoxSyntaxHLLayout->addWidget( m_pColorElemNames, 1, 1 );

    m_pLblColorComments = new TQLabel( m_pBoxSyntaxHL, "m_pLblColorComments" );

    m_pBoxSyntaxHLLayout->addWidget( m_pLblColorComments, 5, 0 );

    m_pLblColorAttrNames = new TQLabel( m_pBoxSyntaxHL, "m_pLblColorAttrNames" );

    m_pBoxSyntaxHLLayout->addWidget( m_pLblColorAttrNames, 2, 0 );

    m_pColorDfltText = new KColorButton( m_pBoxSyntaxHL, "m_pColorDfltText" );

    m_pBoxSyntaxHLLayout->addWidget( m_pColorDfltText, 0, 1 );

    m_pColorAttrNames = new KColorButton( m_pBoxSyntaxHL, "m_pColorAttrNames" );

    m_pBoxSyntaxHLLayout->addWidget( m_pColorAttrNames, 2, 1 );

    m_pLblColorSyntaxChars = new TQLabel( m_pBoxSyntaxHL, "m_pLblColorSyntaxChars" );

    m_pBoxSyntaxHLLayout->addWidget( m_pLblColorSyntaxChars, 4, 0 );

    m_pColorAttrValues = new KColorButton( m_pBoxSyntaxHL, "m_pColorAttrValues" );

    m_pBoxSyntaxHLLayout->addWidget( m_pColorAttrValues, 3, 1 );

    m_pColorErrors = new KColorButton( m_pBoxSyntaxHL, "m_pColorErrors" );

    m_pBoxSyntaxHLLayout->addWidget( m_pColorErrors, 6, 1 );

    KXETextViewSettingsPageLayout->addWidget( m_pBoxSyntaxHL, 0, 0 );

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

    m_pLblIndentSteps = new TQLabel( this, "m_pLblIndentSteps" );
    layout2->addWidget( m_pLblIndentSteps );

    m_pIndentSteps = new TQSpinBox( this, "m_pIndentSteps" );
    layout2->addWidget( m_pIndentSteps );
    spacer2 = new TQSpacerItem( 16, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout2->addItem( spacer2 );

    KXETextViewSettingsPageLayout->addLayout( layout2, 1, 0 );
    spacer8 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    KXETextViewSettingsPageLayout->addItem( spacer8, 3, 0 );

    m_pCheckBoxWrapOn = new TQCheckBox( this, "m_pCheckBoxWrapOn" );

    KXETextViewSettingsPageLayout->addWidget( m_pCheckBoxWrapOn, 2, 0 );
    languageChange();
    resize( TQSize(254, 370).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( m_pColorDfltText, m_pColorElemNames );
    setTabOrder( m_pColorElemNames, m_pColorAttrNames );
    setTabOrder( m_pColorAttrNames, m_pColorAttrValues );
    setTabOrder( m_pColorAttrValues, m_pColorSyntaxChars );
    setTabOrder( m_pColorSyntaxChars, m_pColorComments );
    setTabOrder( m_pColorComments, m_pColorErrors );

    // buddies
    m_pLblColorDfltText->setBuddy( m_pColorDfltText );
    m_pLblColorElemNames->setBuddy( m_pColorElemNames );
    m_pLblColorErrors->setBuddy( m_pColorErrors );
    m_pLblColorAttrValues->setBuddy( m_pColorAttrValues );
    m_pLblColorComments->setBuddy( m_pColorComments );
    m_pLblColorAttrNames->setBuddy( m_pColorAttrNames );
    m_pLblColorSyntaxChars->setBuddy( m_pColorSyntaxChars );
    m_pLblIndentSteps->setBuddy( m_pIndentSteps );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KXETextViewSettingsPage::languageChange()
{
    setCaption( tr2i18n( "Text view settings" ) );
    m_pBoxSyntaxHL->setTitle( tr2i18n( "Syntax highlighting" ) );
    TQWhatsThis::add( m_pBoxSyntaxHL, tr2i18n( "<b>Syntax highlightning</b>\n"
"<br>\n"
"You can define the colors to be used, when showing your XML documents as raw text." ) );
    m_pLblColorDfltText->setText( tr2i18n( "Default &Text:" ) );
    m_pColorSyntaxChars->setText( TQString::null );
    m_pLblColorElemNames->setText( tr2i18n( "&Element names:" ) );
    m_pColorComments->setText( TQString::null );
    m_pLblColorErrors->setText( tr2i18n( "Syntax E&rrors:" ) );
    m_pLblColorAttrValues->setText( tr2i18n( "Attribute &values:" ) );
    m_pColorElemNames->setText( TQString::null );
    m_pLblColorComments->setText( tr2i18n( "Co&mments:" ) );
    m_pLblColorAttrNames->setText( tr2i18n( "Attribute &names:" ) );
    m_pColorDfltText->setText( TQString::null );
    m_pColorAttrNames->setText( TQString::null );
    m_pLblColorSyntaxChars->setText( tr2i18n( "&Syntax characters:" ) );
    m_pColorAttrValues->setText( TQString::null );
    m_pColorErrors->setText( TQString::null );
    m_pLblIndentSteps->setText( tr2i18n( "Element &indentation:" ) );
    TQWhatsThis::add( m_pLblIndentSteps, tr2i18n( "<b>Element indentation</b>\n"
"<br>\n"
"You can choose the number of characters you want to be used for indenting childnodes, when showing your XML documents as raw text." ) );
    TQWhatsThis::add( m_pIndentSteps, tr2i18n( "<b>Element indentation</b>\n"
"<br>\n"
"You can choose the number of characters you want to be used for indenting childnodes, when showing your XML documents as raw text." ) );
    m_pCheckBoxWrapOn->setText( tr2i18n( "&Wrap, instead of Hrz. Scroll bar" ) );
}

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

TQMetaObject *KXETextViewSettingsPage::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KXETextViewSettingsPage( "KXETextViewSettingsPage", &KXETextViewSettingsPage::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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