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

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

#include "settingswidget.h"

#include <ntqvariant.h>
#include <klineedit.h>
#include <kurlrequester.h>
#include <tdefontrequester.h>
#include <ntqpushbutton.h>
#include <ntqcheckbox.h>
#include <ntqlabel.h>
#include <ntqcombobox.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

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

    Form2Layout->addMultiCellWidget( lastProjectCheckbox, 1, 1, 2, 3 );

    textLabel2 = new TQLabel( this, "textLabel2" );
    textLabel2->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) );

    Form2Layout->addMultiCellWidget( textLabel2, 0, 0, 0, 3 );

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

    Form2Layout->addMultiCellWidget( lineWrappingCheckBox, 6, 6, 2, 3 );

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

    compilerLabel = new TQLabel( this, "compilerLabel" );
    layout10->addWidget( compilerLabel );

    compileOutputCombo = new TQComboBox( false, this, "compileOutputCombo" );
    compileOutputCombo->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 0, 0, compileOutputCombo->sizePolicy().hasHeightForWidth() ) );
    layout10->addWidget( compileOutputCombo );

    Form2Layout->addMultiCellLayout( layout10, 5, 5, 2, 3 );

    textLabel2_2 = new TQLabel( this, "textLabel2_2" );
    textLabel2_2->setTextFormat( TQLabel::AutoText );
    textLabel2_2->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignBottom | TQLabel::AlignLeft ) );

    Form2Layout->addMultiCellWidget( textLabel2_2, 3, 3, 0, 3 );

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

    textLabel1 = new TQLabel( this, "textLabel1" );
    layout5->addWidget( textLabel1 );

    projectsURL = new KURLRequester( this, "projectsURL" );
    projectsURL->setFocusPolicy( KURLRequester::WheelFocus );
    layout5->addWidget( projectsURL );

    Form2Layout->addMultiCellLayout( layout5, 2, 2, 2, 3 );
    spacer13 = new TQSpacerItem( 20, 40, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    Form2Layout->addMultiCell( spacer13, 1, 2, 0, 0 );

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

    buttonLabel = new TQLabel( this, "buttonLabel" );
    buttonLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, buttonLabel->sizePolicy().hasHeightForWidth() ) );
    layout4->addWidget( buttonLabel );

    outputFont = new TDEFontRequester( this, "outputFont" );
    layout4->addWidget( outputFont );

    Form2Layout->addMultiCellLayout( layout4, 4, 4, 2, 3 );
    spacer13_2_2 = new TQSpacerItem( 16, 60, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    Form2Layout->addMultiCell( spacer13_2_2, 10, 10, 0, 1 );

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

    useKDETerminal = new TQRadioButton( terminalButtonGroup, "useKDETerminal" );
    useKDETerminal->setChecked( true );

    terminalButtonGroupLayout->addWidget( useKDETerminal, 0, 0 );

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

    useOtherTerminal = new TQRadioButton( terminalButtonGroup, "useOtherTerminal" );
    useOtherTerminal->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, useOtherTerminal->sizePolicy().hasHeightForWidth() ) );
    layout9->addWidget( useOtherTerminal );

    terminalEdit = new KLineEdit( terminalButtonGroup, "terminalEdit" );
    terminalEdit->setEnabled( false );
    layout9->addWidget( terminalEdit );

    terminalButtonGroupLayout->addLayout( layout9, 1, 0 );

    Form2Layout->addWidget( terminalButtonGroup, 12, 3 );

    textLabel5_2 = new TQLabel( this, "textLabel5_2" );
    textLabel5_2->setAlignment( int( TQLabel::AlignTop ) );

    Form2Layout->addMultiCellWidget( textLabel5_2, 11, 11, 0, 3 );
    spacer13_2_2_2 = new TQSpacerItem( 20, 50, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    Form2Layout->addMultiCell( spacer13_2_2_2, 12, 12, 0, 2 );
    spacer23 = new TQSpacerItem( 20, 16, TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding );
    Form2Layout->addItem( spacer23, 13, 3 );

    textLabel5 = new TQLabel( this, "textLabel5" );
    textLabel5->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignTop ) );

    Form2Layout->addMultiCellWidget( textLabel5, 9, 9, 0, 3 );

    designerButtonGroup = new TQButtonGroup( this, "designerButtonGroup" );
    designerButtonGroup->setFrameShape( TQButtonGroup::NoFrame );
    designerButtonGroup->setFlat( false );
    designerButtonGroup->setColumnLayout(0, TQt::Vertical );
    designerButtonGroup->layout()->setSpacing( 6 );
    designerButtonGroup->layout()->setMargin( 0 );
    designerButtonGroupLayout = new TQGridLayout( designerButtonGroup->layout() );
    designerButtonGroupLayout->setAlignment( TQt::AlignTop );

    embeddedDesignerRadioButton = new TQRadioButton( designerButtonGroup, "embeddedDesignerRadioButton" );

    designerButtonGroupLayout->addWidget( embeddedDesignerRadioButton, 0, 0 );

    seperateAppRadioButton = new TQRadioButton( designerButtonGroup, "seperateAppRadioButton" );

    designerButtonGroupLayout->addWidget( seperateAppRadioButton, 1, 0 );

    qtDesignerRadioButton = new TQRadioButton( designerButtonGroup, "qtDesignerRadioButton" );

    designerButtonGroupLayout->addWidget( qtDesignerRadioButton, 2, 0 );

    Form2Layout->addWidget( designerButtonGroup, 10, 3 );

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

    Form2Layout->addMultiCellWidget( dirNavigMsgCheckBox, 7, 7, 2, 3 );
    spacer13_2 = new TQSpacerItem( 16, 150, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    Form2Layout->addMultiCell( spacer13_2, 4, 8, 0, 0 );

    buttonGroup3 = new TQButtonGroup( this, "buttonGroup3" );
    buttonGroup3->setLineWidth( 0 );
    buttonGroup3->setMargin( 0 );
    buttonGroup3->setAlignment( int( TQButtonGroup::AlignAuto ) );
    buttonGroup3->setColumnLayout(0, TQt::Vertical );
    buttonGroup3->layout()->setSpacing( 6 );
    buttonGroup3->layout()->setMargin( 6 );
    buttonGroup3Layout = new TQVBoxLayout( buttonGroup3->layout() );
    buttonGroup3Layout->setAlignment( TQt::AlignTop );

    forceCLocaleRadio = new TQRadioButton( buttonGroup3, "forceCLocaleRadio" );
    buttonGroup3Layout->addWidget( forceCLocaleRadio );

    userLocaleRadio = new TQRadioButton( buttonGroup3, "userLocaleRadio" );
    buttonGroup3Layout->addWidget( userLocaleRadio );

    Form2Layout->addMultiCellWidget( buttonGroup3, 8, 8, 1, 3 );
    languageChange();
    resize( TQSize(456, 593).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( useOtherTerminal, TQ_SIGNAL( toggled(bool) ), terminalEdit, TQ_SLOT( setEnabled(bool) ) );

    // buddies
    compilerLabel->setBuddy( compileOutputCombo );
    textLabel1->setBuddy( projectsURL );
    buttonLabel->setBuddy( outputFont );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void SettingsWidget::languageChange()
{
    setCaption( tr2i18n( "Form2" ) );
    lastProjectCheckbox->setText( tr2i18n( "Lo&ad last project on startup" ) );
    TQToolTip::add( lastProjectCheckbox, tr2i18n( "Check this if you want TDevelop to load the last opened project on startup" ) );
    TQWhatsThis::add( lastProjectCheckbox, tr2i18n( "Mark this checkbox if you want to continue to work with the last project you worked on. This will cause TDevelop to automatically load this project on start-up. It will usually be shown in the state you left work so you can readily proceed." ) );
    textLabel2->setText( tr2i18n( "<qt><h3>Project Settings</h3></qt>" ) );
    lineWrappingCheckBox->setText( tr2i18n( "Line wrappin&g" ) );
    TQToolTip::add( lineWrappingCheckBox, tr2i18n( "By default, TDevelop will wrap long lines around in the Messages Output View window" ) );
    TQWhatsThis::add( lineWrappingCheckBox, tr2i18n( "By default, TDevelop will wrap long lines around in the Messages Output View window so that valuable information will not be easily overlooked. In some cases this will clutter long message lists. Remove the checkbox mark if you do not want the lines wrap around." ) );
    compilerLabel->setText( tr2i18n( "&Compiler output:" ) );
    compileOutputCombo->clear();
    compileOutputCombo->insertItem( tr2i18n( "Very Short" ) );
    compileOutputCombo->insertItem( tr2i18n( "Short" ) );
    compileOutputCombo->insertItem( tr2i18n( "Long" ) );
    TQToolTip::add( compileOutputCombo, tr2i18n( "Choose what sort of output you want from the build process" ) );
    TQWhatsThis::add( compileOutputCombo, tr2i18n( "TDevelop preprocesses the messages the Messages Output View window receives during the build processes in order to filter superfluous information. You can control the level of detail TDevelop will display using the dropdown box in this field. \n"
"<b>Very Short</b>  Displays only warnings, errors, and the filenames which are compiled. \n"
"<b>Short</b>  Suppresses all compiler flags and formats the output to be more readable. \n"
"<b>Full</b>  Displays all output messages unmodified." ) );
    textLabel2_2->setText( tr2i18n( "<qt><h3>Output View Settings</h3></qt>" ) );
    textLabel1->setText( tr2i18n( "Default pro&jects directory:" ) );
    TQToolTip::add( projectsURL, tr2i18n( "Set the directory where you want your projects in." ) );
    TQWhatsThis::add( projectsURL, tr2i18n( "By default, TDevelop uses a common parent directory for all new projects. Enter the absolute path of this common directory in the box or select it from your directory structure. TDevelop will place the any new project here as a subdirectory." ) );
    buttonLabel->setText( tr2i18n( "Window &font:" ) );
    TQToolTip::add( buttonLabel, TQString::null );
    terminalButtonGroup->setTitle( TQString::null );
    useKDETerminal->setText( tr2i18n( "Use &TDE setting" ) );
    TQToolTip::add( useKDETerminal, tr2i18n( "Use the terminal as set in KControl" ) );
    TQWhatsThis::add( useKDETerminal, tr2i18n( "If checked, TDevelop will use the default terminal as set in KControl in TDE components, Component Chooser." ) );
    useOtherTerminal->setText( tr2i18n( "&Other:" ) );
    TQToolTip::add( useOtherTerminal, tr2i18n( "Set a different terminal than the TDE default one" ) );
    TQWhatsThis::add( useOtherTerminal, tr2i18n( "Choose some other terminal different from the default one." ) );
    textLabel5_2->setText( tr2i18n( "<qt><h3>Terminal Emulation</h3></qt>" ) );
    textLabel5->setText( tr2i18n( "<qt><h3>UI Designer Integration</h3>This will only be used when no project is opened. For the project specific setting see Project Options/C++ Specific and open the Qt tab.</qt>" ) );
    designerButtonGroup->setTitle( TQString::null );
    embeddedDesignerRadioButton->setText( tr2i18n( "&Use TDevelop's embedded designer" ) );
    TQToolTip::add( embeddedDesignerRadioButton, tr2i18n( "Start TDevelop own designer embedded within TDevelop" ) );
    TQWhatsThis::add( embeddedDesignerRadioButton, tr2i18n( "TDevelop comes with its own UI designer that can either be embedded or be run as a separate program. Check this button if you wish to integrate the UI designer into TDevelop." ) );
    seperateAppRadioButton->setText( tr2i18n( "Run TDevelop's &designer as a separate application" ) );
    TQToolTip::add( seperateAppRadioButton, tr2i18n( "Start TDevelop own designer externally" ) );
    TQWhatsThis::add( seperateAppRadioButton, tr2i18n( "TDevelop comes with its own UI designer that can either be embedded or be run as a separate program. Check this button if you wish to run TDevelop's UI designer as a separate program." ) );
    qtDesignerRadioButton->setText( tr2i18n( "Run &Qt Designer" ) );
    TQToolTip::add( qtDesignerRadioButton, tr2i18n( "Use Qt Designer externally" ) );
    TQWhatsThis::add( qtDesignerRadioButton, tr2i18n( "Check this button if you wish to use Qt Designer rather than TDevelop's integrated designer." ) );
    dirNavigMsgCheckBox->setText( tr2i18n( "Directory &navigation messages" ) );
    TQToolTip::add( dirNavigMsgCheckBox, tr2i18n( "Check this if you want to know what directory make is in" ) );
    TQWhatsThis::add( dirNavigMsgCheckBox, tr2i18n( "The make tool usually will display messages like “Entering directory”, or “Leaving directory” when it switches the directories it currently works in. As this clutters the messages list in the Messages Output View window, TDevelop suppresses those messages by default. Mark the checkbox if you want to protocol which directories make worked in." ) );
    buttonGroup3->setTitle( TQString::null );
    forceCLocaleRadio->setText( tr2i18n( "Force English compiler output" ) );
    userLocaleRadio->setText( tr2i18n( "Use TDE language and disable \"jump-to-source\" functionality" ) );
}

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

TQMetaObject *SettingsWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_SettingsWidget( "SettingsWidget", &SettingsWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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