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

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

#include "customotherconfigwidgetbase.h"

#include <ntqvariant.h>
#include <kdialog.h>
#include <ntqpushbutton.h>
#include <ntqlineedit.h>
#include <ntqlabel.h>
#include <ntqspinbox.h>
#include <ntqcombobox.h>
#include <ntqgroupbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    layout3 = new TQGridLayout( 0, 1, 1, 0, KDialog::spacingHint(), "layout3"); 

    defaultTarget_edit = new TQLineEdit( this, "defaultTarget_edit" );

    layout3->addWidget( defaultTarget_edit, 0, 1 );

    makebin_edit = new TQLineEdit( this, "makebin_edit" );

    layout3->addWidget( makebin_edit, 1, 1 );

    makeoptions_label = new TQLabel( this, "makeoptions_label" );

    layout3->addWidget( makeoptions_label, 2, 0 );

    makeoptions_edit = new TQLineEdit( this, "makeoptions_edit" );

    layout3->addWidget( makeoptions_edit, 2, 1 );

    makebin_label = new TQLabel( this, "makebin_label" );

    layout3->addWidget( makebin_label, 1, 0 );

    defTarget_label = new TQLabel( this, "defTarget_label" );

    layout3->addWidget( defTarget_label, 0, 0 );
    CustomOtherConfigWidgetBaseLayout->addLayout( layout3 );

    layout2 = new TQHBoxLayout( 0, 0, KDialog::spacingHint(), "layout2"); 

    prio_label = new TQLabel( this, "prio_label" );
    layout2->addWidget( prio_label );

    prio_box = new TQSpinBox( this, "prio_box" );
    prio_box->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, prio_box->sizePolicy().hasHeightForWidth() ) );
    prio_box->setMaxValue( 19 );
    prio_box->setMinValue( -20 );
    prio_box->setValue( 0 );
    layout2->addWidget( prio_box );
    spacer2 = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout2->addItem( spacer2 );
    CustomOtherConfigWidgetBaseLayout->addLayout( layout2 );

    layout3_2 = new TQHBoxLayout( 0, 0, KDialog::spacingHint(), "layout3_2"); 

    envs_label = new TQLabel( this, "envs_label" );
    envs_label->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)5, 0, 0, envs_label->sizePolicy().hasHeightForWidth() ) );
    layout3_2->addWidget( envs_label );

    envs_combo = new TQComboBox( false, this, "envs_combo" );
    envs_combo->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 0, 0, envs_combo->sizePolicy().hasHeightForWidth() ) );
    envs_combo->setEditable( true );
    layout3_2->addWidget( envs_combo );

    addenvs_button = new TQPushButton( this, "addenvs_button" );
    addenvs_button->setAutoDefault( false );
    layout3_2->addWidget( addenvs_button );

    copyenvs_button = new TQPushButton( this, "copyenvs_button" );
    copyenvs_button->setAutoDefault( false );
    layout3_2->addWidget( copyenvs_button );

    removeenvs_button = new TQPushButton( this, "removeenvs_button" );
    removeenvs_button->setAutoDefault( false );
    layout3_2->addWidget( removeenvs_button );
    CustomOtherConfigWidgetBaseLayout->addLayout( layout3_2 );

    env_var_group = new TQGroupBox( this, "env_var_group" );
    env_var_group->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)3, 0, 0, env_var_group->sizePolicy().hasHeightForWidth() ) );
    CustomOtherConfigWidgetBaseLayout->addWidget( env_var_group );
    languageChange();
    resize( TQSize(659, 600).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( envs_combo, TQ_SIGNAL( textChanged(const TQString&) ), this, TQ_SLOT( envNameChanged(const TQString&) ) );
    connect( envs_combo, TQ_SIGNAL( activated(const TQString&) ), this, TQ_SLOT( envChanged(const TQString&) ) );
    connect( copyenvs_button, TQ_SIGNAL( clicked() ), this, TQ_SLOT( envCopied() ) );
    connect( addenvs_button, TQ_SIGNAL( clicked() ), this, TQ_SLOT( envAdded() ) );
    connect( removeenvs_button, TQ_SIGNAL( clicked() ), this, TQ_SLOT( envRemoved() ) );

    // tab order
    setTabOrder( makebin_edit, makeoptions_edit );
    setTabOrder( makeoptions_edit, envs_combo );
    setTabOrder( envs_combo, addenvs_button );
    setTabOrder( addenvs_button, copyenvs_button );
    setTabOrder( copyenvs_button, removeenvs_button );

    // buddies
    makeoptions_label->setBuddy( makeoptions_edit );
    makebin_label->setBuddy( makebin_edit );
    defTarget_label->setBuddy( defaultTarget_edit );
    envs_label->setBuddy( envs_combo );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void CustomOtherConfigWidgetBase::languageChange()
{
    setCaption( tr2i18n( "Make Options" ) );
    makeoptions_label->setText( tr2i18n( "Add&itional options:" ) );
    makebin_label->setText( tr2i18n( "Name of build &script" ) );
    defTarget_label->setText( tr2i18n( "Default &target:" ) );
    prio_label->setText( tr2i18n( "Run with priority:" ) );
    envs_label->setText( tr2i18n( "E&nvironment:" ) );
    addenvs_button->setText( tr2i18n( "&Add" ) );
    copyenvs_button->setText( tr2i18n( "&Copy" ) );
    removeenvs_button->setText( tr2i18n( "Re&move" ) );
    env_var_group->setTitle( tr2i18n( "Environment &Variables" ) );
}

void CustomOtherConfigWidgetBase::envNameChanged(const TQString&)
{
    tqWarning( "CustomOtherConfigWidgetBase::envNameChanged(const TQString&): Not implemented yet" );
}

void CustomOtherConfigWidgetBase::envChanged(const TQString&)
{
    tqWarning( "CustomOtherConfigWidgetBase::envChanged(const TQString&): Not implemented yet" );
}

void CustomOtherConfigWidgetBase::envAdded()
{
    tqWarning( "CustomOtherConfigWidgetBase::envAdded(): Not implemented yet" );
}

void CustomOtherConfigWidgetBase::envRemoved()
{
    tqWarning( "CustomOtherConfigWidgetBase::envRemoved(): Not implemented yet" );
}

void CustomOtherConfigWidgetBase::envCopied()
{
    tqWarning( "CustomOtherConfigWidgetBase::envCopied(): Not implemented yet" );
}

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

TQMetaObject *CustomOtherConfigWidgetBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_CustomOtherConfigWidgetBase( "CustomOtherConfigWidgetBase", &CustomOtherConfigWidgetBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* CustomOtherConfigWidgetBase::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_TQString, 0, TQUParameter::In }
    };
    static const TQUMethod slot_1 = {"envNameChanged", 1, param_slot_1 };
    static const TQUParameter param_slot_2[] = {
	{ 0, &static_QUType_TQString, 0, TQUParameter::In }
    };
    static const TQUMethod slot_2 = {"envChanged", 1, param_slot_2 };
    static const TQUMethod slot_3 = {"envAdded", 0, 0 };
    static const TQUMethod slot_4 = {"envRemoved", 0, 0 };
    static const TQUMethod slot_5 = {"envCopied", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected },
	{ "envNameChanged(const TQString&)", &slot_1, TQMetaData::Protected },
	{ "envChanged(const TQString&)", &slot_2, TQMetaData::Protected },
	{ "envAdded()", &slot_3, TQMetaData::Protected },
	{ "envRemoved()", &slot_4, TQMetaData::Protected },
	{ "envCopied()", &slot_5, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"CustomOtherConfigWidgetBase", parentObject,
	slot_tbl, 6,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_CustomOtherConfigWidgetBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool CustomOtherConfigWidgetBase::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: languageChange(); break;
    case 1: envNameChanged((const TQString&)static_QUType_TQString.get(_o+1)); break;
    case 2: envChanged((const TQString&)static_QUType_TQString.get(_o+1)); break;
    case 3: envAdded(); break;
    case 4: envRemoved(); break;
    case 5: envCopied(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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