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

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

#include "latexconfigwidget.h"

#include <ntqvariant.h>
#include <klineedit.h>
#include <ntqpushbutton.h>
#include <ntqbuttongroup.h>
#include <ntqlabel.h>
#include <ntqcheckbox.h>
#include <ntqcombobox.h>
#include <ntqgroupbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "latexconfigwidget.ui.h"

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

    m_bgCommands = new TQButtonGroup( this, "m_bgCommands" );
    m_bgCommands->setColumnLayout(0, TQt::Vertical );
    m_bgCommands->layout()->setSpacing( 6 );
    m_bgCommands->layout()->setMargin( 11 );
    m_bgCommandsLayout = new TQGridLayout( m_bgCommands->layout() );
    m_bgCommandsLayout->setAlignment( TQt::AlignTop );

    m_pbCommands = new TQPushButton( m_bgCommands, "m_pbCommands" );

    m_bgCommandsLayout->addWidget( m_pbCommands, 0, 0 );

    m_tlCommands = new TQLabel( m_bgCommands, "m_tlCommands" );
    m_tlCommands->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 1, 0, m_tlCommands->sizePolicy().hasHeightForWidth() ) );

    m_bgCommandsLayout->addWidget( m_tlCommands, 0, 1 );
    KileWidgetLatexConfigLayout->addWidget( m_bgCommands );

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

    m_tlType = new TQLabel( m_bgQuotes, "m_tlType" );

    m_bgQuotesLayout->addWidget( m_tlType, 1, 0 );

    kcfg_InsertDoubleQuotes = new TQCheckBox( m_bgQuotes, "kcfg_InsertDoubleQuotes" );

    m_bgQuotesLayout->addMultiCellWidget( kcfg_InsertDoubleQuotes, 0, 0, 0, 2 );

    kcfg_DoubleQuotes = new TQComboBox( false, m_bgQuotes, "kcfg_DoubleQuotes" );
    kcfg_DoubleQuotes->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, kcfg_DoubleQuotes->sizePolicy().hasHeightForWidth() ) );

    m_bgQuotesLayout->addWidget( kcfg_DoubleQuotes, 1, 1 );
    spacer1 = new TQSpacerItem( 280, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    m_bgQuotesLayout->addItem( spacer1, 1, 2 );
    KileWidgetLatexConfigLayout->addWidget( m_bgQuotes );

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

    kcfg_autoInsertDollar = new TQCheckBox( m_bgMathmode, "kcfg_autoInsertDollar" );
    m_bgMathmodeLayout->addWidget( kcfg_autoInsertDollar );
    KileWidgetLatexConfigLayout->addWidget( m_bgMathmode );

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

    m_tlPath = new TQLabel( groupBox5, "m_tlPath" );

    groupBox5Layout->addWidget( m_tlPath, 0, 0 );

    kcfg_TeXPaths = new KLineEdit( groupBox5, "kcfg_TeXPaths" );

    groupBox5Layout->addWidget( kcfg_TeXPaths, 0, 1 );

    kcfg_BibInputPaths = new KLineEdit( groupBox5, "kcfg_BibInputPaths" );

    groupBox5Layout->addWidget( kcfg_BibInputPaths, 1, 1 );

    kcfg_BstInputPaths = new KLineEdit( groupBox5, "kcfg_BstInputPaths" );

    groupBox5Layout->addWidget( kcfg_BstInputPaths, 2, 1 );

    m_bibinputpath = new TQLabel( groupBox5, "m_bibinputpath" );

    groupBox5Layout->addWidget( m_bibinputpath, 1, 0 );

    m_bstinputpath = new TQLabel( groupBox5, "m_bstinputpath" );

    groupBox5Layout->addWidget( m_bstinputpath, 2, 0 );
    KileWidgetLatexConfigLayout->addWidget( groupBox5 );
    languageChange();
    resize( TQSize(602, 365).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( m_pbCommands, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotConfigure() ) );

    // buddies
    m_tlType->setBuddy( kcfg_DoubleQuotes );
    m_tlPath->setBuddy( kcfg_TeXPaths );
    m_bibinputpath->setBuddy( kcfg_BibInputPaths );
    m_bstinputpath->setBuddy( kcfg_BstInputPaths );
    init();
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KileWidgetLatexConfig::languageChange()
{
    setCaption( tr2i18n( "LaTeX" ) );
    m_bgCommands->setTitle( tr2i18n( "Commands" ) );
    m_pbCommands->setText( tr2i18n( "Configure..." ) );
    m_tlCommands->setText( tr2i18n( "Configure LaTeX environments and commands" ) );
    m_bgQuotes->setTitle( tr2i18n( "Double Quotes" ) );
    m_tlType->setText( tr2i18n( "&Type:" ) );
    kcfg_InsertDoubleQuotes->setText( tr2i18n( "Automatically insert opening and closing double &quotes for LaTeX" ) );
    m_bgMathmode->setTitle( tr2i18n( "Mathmode" ) );
    kcfg_autoInsertDollar->setText( tr2i18n( "Auto insert $" ) );
    groupBox5->setTitle( tr2i18n( "Environment Variables" ) );
    m_tlPath->setText( tr2i18n( "TEXINPUTS:" ) );
    TQToolTip::add( m_tlPath, TQString::null );
    m_bibinputpath->setText( tr2i18n( "BIBINPUTS:" ) );
    TQToolTip::add( m_bibinputpath, TQString::null );
    m_bstinputpath->setText( tr2i18n( "B&STINPUTS:" ) );
    TQToolTip::add( m_bstinputpath, TQString::null );
}

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

TQMetaObject *KileWidgetLatexConfig::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KileWidgetLatexConfig( "KileWidgetLatexConfig", &KileWidgetLatexConfig::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* KileWidgetLatexConfig::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 TQUMethod slot_1 = {"slotConfigure", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected },
	{ "slotConfigure()", &slot_1, TQMetaData::Private }
    };
    metaObj = TQMetaObject::new_metaobject(
	"KileWidgetLatexConfig", parentObject,
	slot_tbl, 2,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_KileWidgetLatexConfig.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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