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

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

#include "toolconfigwidget.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <tdelistbox.h>
#include <kpushbutton.h>
#include <ntqframe.h>
#include <ntqtabwidget.h>
#include <ntqwidgetstack.h>
#include <kcombobox.h>
#include <klineedit.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a ToolConfigWidget as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
ToolConfigWidget::ToolConfigWidget( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "ToolConfigWidget" );
    setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)2, (TQSizePolicy::SizeType)2, 0, 0, sizePolicy().hasHeightForWidth() ) );
    setMinimumSize( TQSize( 0, 0 ) );
    ToolConfigWidgetLayout = new TQHBoxLayout( this, 11, 6, "ToolConfigWidgetLayout"); 

    m_groupLeft = new TQGroupBox( this, "m_groupLeft" );
    m_groupLeft->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)3, 0, 0, m_groupLeft->sizePolicy().hasHeightForWidth() ) );
    m_groupLeft->setFrameShape( TQGroupBox::NoFrame );
    m_groupLeft->setFrameShadow( TQGroupBox::Plain );
    m_groupLeft->setColumnLayout(0, TQt::Vertical );
    m_groupLeft->layout()->setSpacing( 6 );
    m_groupLeft->layout()->setMargin( 11 );
    m_groupLeftLayout = new TQVBoxLayout( m_groupLeft->layout() );
    m_groupLeftLayout->setAlignment( TQt::AlignTop );

    m_lbSelectTool = new TQLabel( m_groupLeft, "m_lbSelectTool" );
    m_groupLeftLayout->addWidget( m_lbSelectTool );

    m_lstbTools = new TDEListBox( m_groupLeft, "m_lstbTools" );
    m_lstbTools->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)2, 0, 0, m_lstbTools->sizePolicy().hasHeightForWidth() ) );
    m_lstbTools->setMinimumSize( TQSize( 150, 0 ) );
    m_groupLeftLayout->addWidget( m_lstbTools );

    m_pshbRemoveTool = new KPushButton( m_groupLeft, "m_pshbRemoveTool" );
    m_groupLeftLayout->addWidget( m_pshbRemoveTool );

    m_pshbNewTool = new KPushButton( m_groupLeft, "m_pshbNewTool" );
    m_groupLeftLayout->addWidget( m_pshbNewTool );
    ToolConfigWidgetLayout->addWidget( m_groupLeft );

    m_line = new TQFrame( this, "m_line" );
    m_line->setFrameShape( TQFrame::VLine );
    m_line->setFrameShadow( TQFrame::Sunken );
    m_line->setFrameShape( TQFrame::VLine );
    ToolConfigWidgetLayout->addWidget( m_line );

    m_groupRight = new TQGroupBox( this, "m_groupRight" );
    m_groupRight->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)3, 0, 0, m_groupRight->sizePolicy().hasHeightForWidth() ) );
    m_groupRight->setFrameShape( TQGroupBox::NoFrame );
    m_groupRight->setFrameShadow( TQGroupBox::Plain );
    m_groupRight->setColumnLayout(0, TQt::Vertical );
    m_groupRight->layout()->setSpacing( 10 );
    m_groupRight->layout()->setMargin( 11 );
    m_groupRightLayout = new TQGridLayout( m_groupRight->layout() );
    m_groupRightLayout->setAlignment( TQt::AlignTop );

    m_pshbRemoveConfig = new KPushButton( m_groupRight, "m_pshbRemoveConfig" );
    m_pshbRemoveConfig->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)1, 0, 0, m_pshbRemoveConfig->sizePolicy().hasHeightForWidth() ) );
    m_pshbRemoveConfig->setMinimumSize( TQSize( 150, 0 ) );

    m_groupRightLayout->addMultiCellWidget( m_pshbRemoveConfig, 2, 2, 1, 2 );

    m_pshbDefault = new KPushButton( m_groupRight, "m_pshbDefault" );
    m_pshbDefault->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)1, 0, 0, m_pshbDefault->sizePolicy().hasHeightForWidth() ) );

    m_groupRightLayout->addWidget( m_pshbDefault, 2, 3 );

    m_pshbNewConfig = new KPushButton( m_groupRight, "m_pshbNewConfig" );
    m_pshbNewConfig->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)1, 0, 0, m_pshbNewConfig->sizePolicy().hasHeightForWidth() ) );

    m_groupRightLayout->addWidget( m_pshbNewConfig, 2, 0 );

    m_tab = new TQTabWidget( m_groupRight, "m_tab" );
    m_tab->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)2, (TQSizePolicy::SizeType)2, 0, 0, m_tab->sizePolicy().hasHeightForWidth() ) );
    m_tab->setMinimumSize( TQSize( 400, 0 ) );

    tab = new TQWidget( m_tab, "tab" );
    tabLayout = new TQVBoxLayout( tab, 11, 6, "tabLayout"); 

    m_stackBasic = new TQWidgetStack( tab, "m_stackBasic" );
    m_stackBasic->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)2, (TQSizePolicy::SizeType)1, 0, 0, m_stackBasic->sizePolicy().hasHeightForWidth() ) );

    WStackPage = new TQWidget( m_stackBasic, "WStackPage" );
    m_stackBasic->addWidget( WStackPage, 0 );
    tabLayout->addWidget( m_stackBasic );

    m_stackExtra = new TQWidgetStack( tab, "m_stackExtra" );
    m_stackExtra->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)2, (TQSizePolicy::SizeType)1, 0, 0, m_stackExtra->sizePolicy().hasHeightForWidth() ) );

    WStackPage_2 = new TQWidget( m_stackExtra, "WStackPage_2" );
    m_stackExtra->addWidget( WStackPage_2, 0 );
    tabLayout->addWidget( m_stackExtra );
    spacer6 = new TQSpacerItem( 20, 240, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    tabLayout->addItem( spacer6 );
    m_tab->insertTab( tab, TQString::fromLatin1("") );

    tab_2 = new TQWidget( m_tab, "tab_2" );
    tabLayout_2 = new TQGridLayout( tab_2, 1, 1, 11, 6, "tabLayout_2"); 

    m_cbType = new KComboBox( false, tab_2, "m_cbType" );
    m_cbType->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)2, (TQSizePolicy::SizeType)0, 0, 0, m_cbType->sizePolicy().hasHeightForWidth() ) );

    tabLayout_2->addWidget( m_cbType, 0, 1 );

    m_lbType = new TQLabel( tab_2, "m_lbType" );

    tabLayout_2->addWidget( m_lbType, 0, 0 );

    m_leRelDir = new KLineEdit( tab_2, "m_leRelDir" );
    m_leRelDir->setEnabled( true );
    m_leRelDir->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)2, (TQSizePolicy::SizeType)0, 0, 0, m_leRelDir->sizePolicy().hasHeightForWidth() ) );

    tabLayout_2->addWidget( m_leRelDir, 6, 1 );

    textLabel2 = new TQLabel( tab_2, "textLabel2" );

    tabLayout_2->addWidget( textLabel2, 6, 0 );

    textLabel1 = new TQLabel( tab_2, "textLabel1" );

    tabLayout_2->addWidget( textLabel1, 5, 0 );

    m_lbTarget = new TQLabel( tab_2, "m_lbTarget" );

    tabLayout_2->addWidget( m_lbTarget, 4, 0 );

    m_leFile = new KLineEdit( tab_2, "m_leFile" );
    m_leFile->setEnabled( true );
    m_leFile->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)2, (TQSizePolicy::SizeType)0, 0, 0, m_leFile->sizePolicy().hasHeightForWidth() ) );

    tabLayout_2->addWidget( m_leFile, 5, 1 );

    m_leTarget = new KLineEdit( tab_2, "m_leTarget" );
    m_leTarget->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)2, (TQSizePolicy::SizeType)0, 0, 0, m_leTarget->sizePolicy().hasHeightForWidth() ) );

    tabLayout_2->addWidget( m_leTarget, 4, 1 );

    m_leSource = new KLineEdit( tab_2, "m_leSource" );
    m_leSource->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)2, (TQSizePolicy::SizeType)0, 0, 0, m_leSource->sizePolicy().hasHeightForWidth() ) );

    tabLayout_2->addWidget( m_leSource, 3, 1 );

    m_lbSource = new TQLabel( tab_2, "m_lbSource" );

    tabLayout_2->addWidget( m_lbSource, 3, 0 );

    m_lbClass = new TQLabel( tab_2, "m_lbClass" );

    tabLayout_2->addWidget( m_lbClass, 2, 0 );

    m_ckClose = new TQCheckBox( tab_2, "m_ckClose" );

    tabLayout_2->addMultiCellWidget( m_ckClose, 1, 1, 0, 1 );

    m_cbClass = new KComboBox( false, tab_2, "m_cbClass" );
    m_cbClass->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)2, (TQSizePolicy::SizeType)0, 0, 0, m_cbClass->sizePolicy().hasHeightForWidth() ) );

    tabLayout_2->addWidget( m_cbClass, 2, 1 );
    spacer2 = new TQSpacerItem( 20, 40, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    tabLayout_2->addItem( spacer2, 8, 1 );

    m_lbState = new TQLabel( tab_2, "m_lbState" );

    tabLayout_2->addWidget( m_lbState, 7, 0 );

    m_cbState = new KComboBox( false, tab_2, "m_cbState" );

    tabLayout_2->addWidget( m_cbState, 7, 1 );
    m_tab->insertTab( tab_2, TQString::fromLatin1("") );

    TabPage = new TQWidget( m_tab, "TabPage" );
    TabPageLayout = new TQGridLayout( TabPage, 1, 1, 11, 6, "TabPageLayout"); 

    m_lbMenu = new TQLabel( TabPage, "m_lbMenu" );

    TabPageLayout->addWidget( m_lbMenu, 0, 0 );

    m_cbMenu = new KComboBox( false, TabPage, "m_cbMenu" );
    m_cbMenu->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)2, (TQSizePolicy::SizeType)0, 0, 0, m_cbMenu->sizePolicy().hasHeightForWidth() ) );

    TabPageLayout->addWidget( m_cbMenu, 0, 1 );

    m_lbIcon = new TQLabel( TabPage, "m_lbIcon" );

    TabPageLayout->addWidget( m_lbIcon, 1, 0 );
    m_spacerMenu = new TQSpacerItem( 20, 100, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    TabPageLayout->addItem( m_spacerMenu, 2, 0 );

    m_pshbIcon = new KPushButton( TabPage, "m_pshbIcon" );

    TabPageLayout->addWidget( m_pshbIcon, 1, 1 );
    m_tab->insertTab( TabPage, TQString::fromLatin1("") );

    m_groupRightLayout->addMultiCellWidget( m_tab, 1, 1, 0, 3 );

    m_lbConfig = new TQLabel( m_groupRight, "m_lbConfig" );
    m_lbConfig->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)4, 0, 0, m_lbConfig->sizePolicy().hasHeightForWidth() ) );

    m_groupRightLayout->addMultiCellWidget( m_lbConfig, 0, 0, 0, 1 );

    m_cbConfig = new KComboBox( false, m_groupRight, "m_cbConfig" );
    m_cbConfig->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)4, 1, 0, m_cbConfig->sizePolicy().hasHeightForWidth() ) );

    m_groupRightLayout->addMultiCellWidget( m_cbConfig, 0, 0, 2, 3 );
    ToolConfigWidgetLayout->addWidget( m_groupRight );
    languageChange();
    resize( TQSize(669, 474).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( m_lstbTools, m_cbConfig );
    setTabOrder( m_cbConfig, m_tab );
    setTabOrder( m_tab, m_pshbRemoveTool );
    setTabOrder( m_pshbRemoveTool, m_pshbNewTool );
    setTabOrder( m_pshbNewTool, m_pshbNewConfig );
    setTabOrder( m_pshbNewConfig, m_pshbRemoveConfig );
    setTabOrder( m_pshbRemoveConfig, m_pshbDefault );
    setTabOrder( m_pshbDefault, m_cbType );
    setTabOrder( m_cbType, m_cbClass );
    setTabOrder( m_cbClass, m_leSource );
    setTabOrder( m_leSource, m_leTarget );
    setTabOrder( m_leTarget, m_leFile );
    setTabOrder( m_leFile, m_leRelDir );
    setTabOrder( m_leRelDir, m_cbMenu );

    // buddies
    m_lbSelectTool->setBuddy( m_lstbTools );
    m_lbType->setBuddy( m_cbType );
    textLabel2->setBuddy( m_leRelDir );
    textLabel1->setBuddy( m_leFile );
    m_lbTarget->setBuddy( m_leTarget );
    m_lbSource->setBuddy( m_leSource );
    m_lbClass->setBuddy( m_cbClass );
    m_lbState->setBuddy( m_cbState );
    m_lbMenu->setBuddy( m_cbMenu );
    m_lbIcon->setBuddy( m_pshbIcon );
    m_lbConfig->setBuddy( m_cbConfig );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void ToolConfigWidget::languageChange()
{
    setCaption( tr2i18n( "Configure" ) );
    m_groupLeft->setTitle( TQString::null );
    m_lbSelectTool->setText( tr2i18n( "Select a &tool:" ) );
    m_pshbRemoveTool->setText( tr2i18n( "Remove Tool" ) );
    m_pshbNewTool->setText( tr2i18n( "New Tool..." ) );
    m_groupRight->setTitle( TQString::null );
    m_pshbRemoveConfig->setText( tr2i18n( "Remove Config" ) );
    m_pshbDefault->setText( tr2i18n( "Default Settings" ) );
    m_pshbNewConfig->setText( tr2i18n( "New Config..." ) );
    m_tab->changeTab( tab, tr2i18n( "&General" ) );
    m_lbType->setText( tr2i18n( "&Type:" ) );
    textLabel2->setText( tr2i18n( "&Relative dir:" ) );
    textLabel1->setText( tr2i18n( "Target &file:" ) );
    m_lbTarget->setText( tr2i18n( "Tar&get extension:" ) );
    m_lbSource->setText( tr2i18n( "&Source extension:" ) );
    m_lbClass->setText( tr2i18n( "C&lass:" ) );
    m_ckClose->setText( tr2i18n( "Close Konsole when tool is finished" ) );
    m_lbState->setText( tr2i18n( "St&ate:" ) );
    m_tab->changeTab( tab_2, tr2i18n( "&Advanced" ) );
    m_lbMenu->setText( tr2i18n( "Add tool to Build &menu:" ) );
    m_lbIcon->setText( tr2i18n( "&Icon:" ) );
    m_pshbIcon->setText( TQString::null );
    m_tab->changeTab( TabPage, tr2i18n( "Me&nu" ) );
    m_lbConfig->setText( tr2i18n( "Select a &configuration:" ) );
}

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

TQMetaObject *ToolConfigWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_ToolConfigWidget( "ToolConfigWidget", &ToolConfigWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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