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

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

#include "custombuildoptionswidgetbase.h"

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

/*
 *  Constructs a CustomBuildOptionsWidgetBase as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
CustomBuildOptionsWidgetBase::CustomBuildOptionsWidgetBase( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "configure_options_widget" );
    configure_options_widgetLayout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint(), "configure_options_widgetLayout"); 

    buildtool_group = new TQButtonGroup( this, "buildtool_group" );
    buildtool_group->setColumnLayout(0, TQt::Vertical );
    buildtool_group->layout()->setSpacing( KDialog::spacingHint() );
    buildtool_group->layout()->setMargin( KDialog::marginHint() );
    buildtool_groupLayout = new TQVBoxLayout( buildtool_group->layout() );
    buildtool_groupLayout->setAlignment( TQt::AlignTop );

    make_button = new TQRadioButton( buildtool_group, "make_button" );
    make_button->setChecked( true );
    buildtool_groupLayout->addWidget( make_button );

    ant_button = new TQRadioButton( buildtool_group, "ant_button" );
    buildtool_groupLayout->addWidget( ant_button );

    other_button = new TQRadioButton( buildtool_group, "other_button" );
    buildtool_groupLayout->addWidget( other_button );
    configure_options_widgetLayout->addWidget( buildtool_group );
    Spacer19 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Minimum );
    configure_options_widgetLayout->addItem( Spacer19 );

    builddir_label = new TQLabel( this, "builddir_label" );
    configure_options_widgetLayout->addWidget( builddir_label );

    layout2 = new TQHBoxLayout( 0, 0, KDialog::spacingHint(), "layout2"); 
    Spacer38 = new TQSpacerItem( 16, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout2->addItem( Spacer38 );

    builddir_edit = new KURLRequester( this, "builddir_edit" );
    layout2->addWidget( builddir_edit );
    configure_options_widgetLayout->addLayout( layout2 );
    Spacer39 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    configure_options_widgetLayout->addItem( Spacer39 );
    languageChange();
    resize( TQSize(592, 480).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // buddies
    builddir_label->setBuddy( builddir_edit );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void CustomBuildOptionsWidgetBase::languageChange()
{
    setCaption( tr2i18n( "Custom Build Options" ) );
    buildtool_group->setTitle( tr2i18n( "Build Tool" ) );
    make_button->setText( tr2i18n( "&Make" ) );
    ant_button->setText( tr2i18n( "A&nt" ) );
    other_button->setText( tr2i18n( "Other" ) );
    TQToolTip::add( other_button, tr2i18n( "other custom build tool, e.g. script" ) );
    TQWhatsThis::add( other_button, tr2i18n( "There are myriads of buildtools out there that are not ant or make. If you use one of them (or have your own scripts), select this option." ) );
    builddir_label->setText( tr2i18n( "Run &the build tool in the following directory:" ) );
}

void CustomBuildOptionsWidgetBase::makeToggled(bool)
{
    tqWarning( "CustomBuildOptionsWidgetBase::makeToggled(bool): Not implemented yet" );
}

void CustomBuildOptionsWidgetBase::otherToggled(bool)
{
    tqWarning( "CustomBuildOptionsWidgetBase::otherToggled(bool): Not implemented yet" );
}

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

TQMetaObject *CustomBuildOptionsWidgetBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_CustomBuildOptionsWidgetBase( "CustomBuildOptionsWidgetBase", &CustomBuildOptionsWidgetBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* CustomBuildOptionsWidgetBase::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 TQUParameter param_slot_1[] = {
	{ 0, &static_QUType_bool, 0, TQUParameter::In }
    };
    static const TQUMethod slot_1 = {"makeToggled", 1, param_slot_1 };
    static const TQUParameter param_slot_2[] = {
	{ 0, &static_QUType_bool, 0, TQUParameter::In }
    };
    static const TQUMethod slot_2 = {"otherToggled", 1, param_slot_2 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected },
	{ "makeToggled(bool)", &slot_1, TQMetaData::Protected },
	{ "otherToggled(bool)", &slot_2, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"CustomBuildOptionsWidgetBase", parentObject,
	slot_tbl, 3,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_CustomBuildOptionsWidgetBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool CustomBuildOptionsWidgetBase::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: languageChange(); break;
    case 1: makeToggled((bool)static_QUType_bool.get(_o+1)); break;
    case 2: otherToggled((bool)static_QUType_bool.get(_o+1)); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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