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

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

#include "qmakeoptionswidgetbase.h"

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

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

    textLabel1_2 = new TQLabel( this, "textLabel1_2" );
    QMakeOptionsWidgetBaseLayout->addWidget( textLabel1_2 );

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

    textLabel1_3 = new TQLabel( this, "textLabel1_3" );
    layout1->addWidget( textLabel1_3 );

    qmakeProjectFile = new KURLRequester( this, "qmakeProjectFile" );
    layout1->addWidget( qmakeProjectFile );
    QMakeOptionsWidgetBaseLayout->addLayout( layout1 );

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

    textLabel1 = new TQLabel( groupBehaviour, "textLabel1" );
    textLabel1->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) );
    groupBehaviourLayout->addWidget( textLabel1 );

    radioAlwaysSave = new TQRadioButton( groupBehaviour, "radioAlwaysSave" );
    groupBehaviourLayout->addWidget( radioAlwaysSave );

    radioNeverSave = new TQRadioButton( groupBehaviour, "radioNeverSave" );
    groupBehaviourLayout->addWidget( radioNeverSave );

    radioAsk = new TQRadioButton( groupBehaviour, "radioAsk" );
    radioAsk->setChecked( true );
    groupBehaviourLayout->addWidget( radioAsk );
    QMakeOptionsWidgetBaseLayout->addWidget( groupBehaviour );

    checkReplacePaths = new TQCheckBox( this, "checkReplacePaths" );
    checkReplacePaths->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, checkReplacePaths->sizePolicy().hasHeightForWidth() ) );
    checkReplacePaths->setChecked( false );
    QMakeOptionsWidgetBaseLayout->addWidget( checkReplacePaths );

    showVariablesInTree = new TQCheckBox( this, "showVariablesInTree" );
    QMakeOptionsWidgetBaseLayout->addWidget( showVariablesInTree );

    checkFilenamesOnly = new TQCheckBox( this, "checkFilenamesOnly" );
    QMakeOptionsWidgetBaseLayout->addWidget( checkFilenamesOnly );

    checkDisableDefaultOpts = new TQCheckBox( this, "checkDisableDefaultOpts" );
    QMakeOptionsWidgetBaseLayout->addWidget( checkDisableDefaultOpts );

    checkShowParseErrors = new TQCheckBox( this, "checkShowParseErrors" );
    checkShowParseErrors->setChecked( true );
    QMakeOptionsWidgetBaseLayout->addWidget( checkShowParseErrors );
    spacer1 = new TQSpacerItem( 20, 50, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    QMakeOptionsWidgetBaseLayout->addItem( spacer1 );
    languageChange();
    resize( TQSize(738, 523).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // buddies
    textLabel1_3->setBuddy( qmakeProjectFile );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void QMakeOptionsWidgetBase::languageChange()
{
    setCaption( tr2i18n( "QMake Manager Options" ) );
    textLabel1_2->setText( tr2i18n( "- Also look into C++/Qt to define the QMake, Qt and Designer paths.\n"
"- Environment variables that should be resolved during parsing can be set on the Make Options page.\n"
"- For changes on this page to take effect the project needs to be reloaded." ) );
    textLabel1_3->setText( tr2i18n( "QMake Project File:" ) );
    TQToolTip::add( qmakeProjectFile, tr2i18n( "This is the top level qmake project file, from which the project manager will be populated.\n"
"Leave this empty to automatically search for a .pro file in the project directory." ) );
    groupBehaviour->setTitle( tr2i18n( "Behaviour on Subproject Change" ) );
    textLabel1->setText( tr2i18n( "The following settings determine what the project configuration dialog should do when another subproject is selected while the dialog is still open." ) );
    radioAlwaysSave->setText( tr2i18n( "&Always Save" ) );
    TQToolTip::add( radioAlwaysSave, tr2i18n( "Always save the configuration when changing the project." ) );
    TQWhatsThis::add( radioAlwaysSave, tr2i18n( "Always save the project configuration when selecting a another sub project." ) );
    radioNeverSave->setText( tr2i18n( "&Never Save (Warning: This can lead to loss of setting changes)" ) );
    TQToolTip::add( radioNeverSave, tr2i18n( "Never save the configuration when changing the project." ) );
    TQWhatsThis::add( radioNeverSave, tr2i18n( "Never save the project configuration when selecting a another sub project." ) );
    radioAsk->setText( tr2i18n( "As&k" ) );
    TQToolTip::add( radioAsk, tr2i18n( "Ask whether the configuration should be saved when switching the project." ) );
    TQWhatsThis::add( radioAsk, tr2i18n( "Always ask whether the configuration should be saved when selecting another subproject." ) );
    checkReplacePaths->setText( tr2i18n( "Repla&ce File Paths with matching Variables when adding files" ) );
    TQToolTip::add( checkReplacePaths, tr2i18n( "This replaces the relative paths of added files with existing custom variables if the value assigned to it is the same as the path." ) );
    showVariablesInTree->setText( tr2i18n( "Show variables in filenames in the QMake projectmanager view." ) );
    checkFilenamesOnly->setText( tr2i18n( "Display only filenames in the QMake Manager (Project reload is needed after changing this setting)" ) );
    checkDisableDefaultOpts->setText( tr2i18n( "Do not use the QMake Default Options\n"
"This disables the reading of any .qmake.cache files or mkspecs." ) );
    checkShowParseErrors->setText( tr2i18n( "Show parse error in message box" ) );
}

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

TQMetaObject *QMakeOptionsWidgetBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_QMakeOptionsWidgetBase( "QMakeOptionsWidgetBase", &QMakeOptionsWidgetBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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