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

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

#include "envconfigwidget.h"

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

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

    m_bgEnv = new TQButtonGroup( this, "m_bgEnv" );
    m_bgEnv->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, m_bgEnv->sizePolicy().hasHeightForWidth() ) );
    m_bgEnv->setColumnLayout(0, TQt::Vertical );
    m_bgEnv->layout()->setSpacing( 6 );
    m_bgEnv->layout()->setMargin( 11 );
    m_bgEnvLayout = new TQVBoxLayout( m_bgEnv->layout() );
    m_bgEnvLayout->setAlignment( TQt::AlignTop );

    kcfg_CompleteEnvironment = new TQCheckBox( m_bgEnv, "kcfg_CompleteEnvironment" );
    m_bgEnvLayout->addWidget( kcfg_CompleteEnvironment );
    KileWidgetEnvironmentConfigLayout->addWidget( m_bgEnv );

    m_bgGraphics = new TQButtonGroup( this, "m_bgGraphics" );
    m_bgGraphics->setColumnLayout(0, TQt::Vertical );
    m_bgGraphics->layout()->setSpacing( 6 );
    m_bgGraphics->layout()->setMargin( 11 );
    m_bgGraphicsLayout = new TQVBoxLayout( m_bgGraphics->layout() );
    m_bgGraphicsLayout->setAlignment( TQt::AlignTop );

    kcfg_envIndentation = new TQCheckBox( m_bgGraphics, "kcfg_envIndentation" );
    m_bgGraphicsLayout->addWidget( kcfg_envIndentation );

    kcfg_envIndentSpaces = new TQCheckBox( m_bgGraphics, "kcfg_envIndentSpaces" );
    m_bgGraphicsLayout->addWidget( kcfg_envIndentSpaces );

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

    m_lbNumSpaces = new TQLabel( m_bgGraphics, "m_lbNumSpaces" );
    layout2->addWidget( m_lbNumSpaces );
    spacer1 = new TQSpacerItem( 20, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout2->addItem( spacer1 );

    kcfg_envIndentNumSpaces = new TQSpinBox( m_bgGraphics, "kcfg_envIndentNumSpaces" );
    kcfg_envIndentNumSpaces->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, kcfg_envIndentNumSpaces->sizePolicy().hasHeightForWidth() ) );
    kcfg_envIndentNumSpaces->setMinimumSize( TQSize( 0, 0 ) );
    kcfg_envIndentNumSpaces->setMaxValue( 9 );
    kcfg_envIndentNumSpaces->setMinValue( 1 );
    layout2->addWidget( kcfg_envIndentNumSpaces );
    spacer2 = new TQSpacerItem( 300, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout2->addItem( spacer2 );
    m_bgGraphicsLayout->addLayout( layout2 );
    KileWidgetEnvironmentConfigLayout->addWidget( m_bgGraphics );
    languageChange();
    resize( TQSize(586, 200).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // buddies
    m_lbNumSpaces->setBuddy( kcfg_envIndentNumSpaces );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KileWidgetEnvironmentConfig::languageChange()
{
    setCaption( tr2i18n( "LaTeX" ) );
    m_bgEnv->setTitle( tr2i18n( "Complete Environments" ) );
    kcfg_CompleteEnvironment->setText( tr2i18n( "Automatically complete \\begin{env} with \\end{env}" ) );
    m_bgGraphics->setTitle( tr2i18n( "Automatic Indentation Inside Environments" ) );
    kcfg_envIndentation->setText( tr2i18n( "Activated" ) );
    TQWhatsThis::add( kcfg_envIndentation, tr2i18n( "Enable auto indentation of environments." ) );
    kcfg_envIndentSpaces->setText( tr2i18n( "Use spaces instead of tabs to indent" ) );
    TQWhatsThis::add( kcfg_envIndentSpaces, tr2i18n( "Use spaces instead of a tabulator to autoindent environments." ) );
    m_lbNumSpaces->setText( tr2i18n( "Number of spaces:" ) );
    TQWhatsThis::add( kcfg_envIndentNumSpaces, tr2i18n( "Use this number of spaces to autoindent environments." ) );
}

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

TQMetaObject *KileWidgetEnvironmentConfig::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KileWidgetEnvironmentConfig( "KileWidgetEnvironmentConfig", &KileWidgetEnvironmentConfig::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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