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

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

#include "generalconfigwidget.h"

#include <ntqvariant.h>
#include <klineedit.h>
#include <knuminput.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqcheckbox.h>
#include <ntqlabel.h>
#include <ntqlineedit.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a KileWidgetGeneralConfig as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
KileWidgetGeneralConfig::KileWidgetGeneralConfig( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "KileWidgetGeneralConfig" );
    setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 1, 0, sizePolicy().hasHeightForWidth() ) );
    setMaximumSize( TQSize( 32767, 32767 ) );
    KileWidgetGeneralConfigLayout = new TQVBoxLayout( this, 11, 6, "KileWidgetGeneralConfigLayout"); 

    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 );

    kcfg_Restore = new TQCheckBox( groupBox5, "kcfg_Restore" );

    groupBox5Layout->addMultiCellWidget( kcfg_Restore, 1, 1, 0, 1 );

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

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

    kcfg_DefaultProjectLocation = new TQLineEdit( groupBox5, "kcfg_DefaultProjectLocation" );

    groupBox5Layout->addWidget( kcfg_DefaultProjectLocation, 0, 1 );
    KileWidgetGeneralConfigLayout->addWidget( groupBox5 );

    groupBox1 = new TQGroupBox( this, "groupBox1" );
    groupBox1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)1, 0, 0, groupBox1->sizePolicy().hasHeightForWidth() ) );
    groupBox1->setColumnLayout(0, TQt::Vertical );
    groupBox1->layout()->setSpacing( 6 );
    groupBox1->layout()->setMargin( 11 );
    groupBox1Layout = new TQHBoxLayout( groupBox1->layout() );
    groupBox1Layout->setAlignment( TQt::AlignTop );

    kcfg_Autosave = new TQCheckBox( groupBox1, "kcfg_Autosave" );
    groupBox1Layout->addWidget( kcfg_Autosave );

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

    textLabel1 = new TQLabel( groupBox1, "textLabel1" );
    layout2->addWidget( textLabel1 );

    kcfg_AutosaveInterval = new KIntNumInput( groupBox1, "kcfg_AutosaveInterval" );
    kcfg_AutosaveInterval->setMinValue( 1 );
    kcfg_AutosaveInterval->setMaxValue( 9999 );
    layout2->addWidget( kcfg_AutosaveInterval );
    groupBox1Layout->addLayout( layout2 );
    KileWidgetGeneralConfigLayout->addWidget( groupBox1 );

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

    kcfg_Author = new KLineEdit( groupBox3, "kcfg_Author" );

    groupBox3Layout->addWidget( kcfg_Author, 0, 1 );

    kcfg_TemplateEncoding = new KLineEdit( groupBox3, "kcfg_TemplateEncoding" );

    groupBox3Layout->addWidget( kcfg_TemplateEncoding, 2, 1 );

    kcfg_DocumentClassOptions = new KLineEdit( groupBox3, "kcfg_DocumentClassOptions" );

    groupBox3Layout->addWidget( kcfg_DocumentClassOptions, 1, 1 );

    textLabel3 = new TQLabel( groupBox3, "textLabel3" );

    groupBox3Layout->addWidget( textLabel3, 0, 0 );

    textLabel4 = new TQLabel( groupBox3, "textLabel4" );

    groupBox3Layout->addWidget( textLabel4, 1, 0 );

    textLabel5 = new TQLabel( groupBox3, "textLabel5" );

    groupBox3Layout->addWidget( textLabel5, 2, 0 );
    KileWidgetGeneralConfigLayout->addWidget( groupBox3 );

    groupBox4 = new TQGroupBox( this, "groupBox4" );
    groupBox4->setColumnLayout(0, TQt::Vertical );
    groupBox4->layout()->setSpacing( 6 );
    groupBox4->layout()->setMargin( 11 );
    groupBox4Layout = new TQVBoxLayout( groupBox4->layout() );
    groupBox4Layout->setAlignment( TQt::AlignTop );

    kcfg_CleanUpAfterClose = new TQCheckBox( groupBox4, "kcfg_CleanUpAfterClose" );
    groupBox4Layout->addWidget( kcfg_CleanUpAfterClose );

    kcfg_CleanUpFileExtensions = new KLineEdit( groupBox4, "kcfg_CleanUpFileExtensions" );
    groupBox4Layout->addWidget( kcfg_CleanUpFileExtensions );
    KileWidgetGeneralConfigLayout->addWidget( groupBox4 );

    kcfg_UnfoldConfigTree = new TQCheckBox( this, "kcfg_UnfoldConfigTree" );
    KileWidgetGeneralConfigLayout->addWidget( kcfg_UnfoldConfigTree );

    kcfg_RunLyxServer = new TQCheckBox( this, "kcfg_RunLyxServer" );
    KileWidgetGeneralConfigLayout->addWidget( kcfg_RunLyxServer );
    languageChange();
    resize( TQSize(776, 460).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // buddies
    textLabel2_2->setBuddy( kcfg_DefaultProjectLocation );
    textLabel1->setBuddy( kcfg_AutosaveInterval );
    textLabel3->setBuddy( kcfg_Author );
    textLabel4->setBuddy( kcfg_DocumentClassOptions );
    textLabel5->setBuddy( kcfg_TemplateEncoding );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KileWidgetGeneralConfig::languageChange()
{
    setCaption( tr2i18n( "General" ) );
    groupBox5->setTitle( tr2i18n( "Project Options" ) );
    kcfg_Restore->setText( tr2i18n( "&Reopen files and projects on startup" ) );
    textLabel2_2->setText( tr2i18n( "&Default project location:" ) );
    groupBox1->setTitle( tr2i18n( "Autosave Options" ) );
    kcfg_Autosave->setText( tr2i18n( "Auto&save" ) );
    textLabel1->setText( tr2i18n( "Interval &time in minutes (1 - 9999):" ) );
    groupBox3->setTitle( tr2i18n( "Template Variables" ) );
    textLabel3->setText( tr2i18n( "&Author:" ) );
    textLabel4->setText( tr2i18n( "&Documentclass options:" ) );
    textLabel5->setText( tr2i18n( "Input &encoding:" ) );
    groupBox4->setTitle( tr2i18n( "File Clean-Up Details" ) );
    kcfg_CleanUpAfterClose->setText( tr2i18n( "Automatically clean-up files after close" ) );
    kcfg_UnfoldConfigTree->setText( tr2i18n( "Open all tree items of config pages, when calling this dialog" ) );
    TQWhatsThis::add( kcfg_UnfoldConfigTree, tr2i18n( "It's impossible to open special tree items in Kile's configuration dialog. You have the choice to open all items, which may lead to a bad size of the dialog, or none of them." ) );
    kcfg_RunLyxServer->setText( tr2i18n( "Let Kile process LyX commands sent by bibliography editors/viewers" ) );
}

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

TQMetaObject *KileWidgetGeneralConfig::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KileWidgetGeneralConfig( "KileWidgetGeneralConfig", &KileWidgetGeneralConfig::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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