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

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

#include "pgmargsbase.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqtabwidget.h>
#include <ntqwidget.h>
#include <ntqlabel.h>
#include <ntqlineedit.h>
#include <ntqheader.h>
#include <ntqlistview.h>
#include <ntqlistbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a PgmArgsBase as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The qdialog will by default be modeless, unless you set 'modal' to
 *  true to construct a modal qdialog.
 */
PgmArgsBase::PgmArgsBase( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "PgmArgsBase" );
    setSizeGripEnabled( true );
    PgmArgsBaseLayout = new TQHBoxLayout( this, 11, 6, "PgmArgsBaseLayout"); 

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

    tabWidget = new TQTabWidget( this, "tabWidget" );

    argsPage = new TQWidget( tabWidget, "argsPage" );
    argsPageLayout = new TQHBoxLayout( argsPage, 11, 6, "argsPageLayout"); 

    layout2 = new TQVBoxLayout( 0, 0, 6, "layout2"); 

    labelArgs = new TQLabel( argsPage, "labelArgs" );
    layout2->addWidget( labelArgs );

    programArgs = new TQLineEdit( argsPage, "programArgs" );
    layout2->addWidget( programArgs );

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

    insertFile = new TQPushButton( argsPage, "insertFile" );
    layout3->addWidget( insertFile );

    insertDir = new TQPushButton( argsPage, "insertDir" );
    layout3->addWidget( insertDir );
    spacer1 = new TQSpacerItem( 61, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout3->addItem( spacer1 );
    layout2->addLayout( layout3 );
    spacer2 = new TQSpacerItem( 81, 180, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    layout2->addItem( spacer2 );
    argsPageLayout->addLayout( layout2 );
    tabWidget->insertTab( argsPage, TQString::fromLatin1("") );

    wdPage = new TQWidget( tabWidget, "wdPage" );
    wdPageLayout = new TQHBoxLayout( wdPage, 11, 6, "wdPageLayout"); 

    layout6 = new TQVBoxLayout( 0, 0, 6, "layout6"); 

    wdEdit = new TQLineEdit( wdPage, "wdEdit" );
    layout6->addWidget( wdEdit );

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

    wdBrowse = new TQPushButton( wdPage, "wdBrowse" );
    layout5->addWidget( wdBrowse );
    spacer4 = new TQSpacerItem( 321, 31, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout5->addItem( spacer4 );
    layout6->addLayout( layout5 );
    spacer5 = new TQSpacerItem( 111, 161, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    layout6->addItem( spacer5 );
    wdPageLayout->addLayout( layout6 );
    tabWidget->insertTab( wdPage, TQString::fromLatin1("") );

    envPage = new TQWidget( tabWidget, "envPage" );
    envPageLayout = new TQHBoxLayout( envPage, 11, 6, "envPageLayout"); 

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

    layout7 = new TQVBoxLayout( 0, 0, 6, "layout7"); 

    envLabel = new TQLabel( envPage, "envLabel" );
    layout7->addWidget( envLabel );

    envVar = new TQLineEdit( envPage, "envVar" );
    layout7->addWidget( envVar );

    envList = new TQListView( envPage, "envList" );
    envList->addColumn( tr2i18n( "Name" ) );
    envList->header()->setClickEnabled( false, envList->header()->count() - 1 );
    envList->addColumn( tr2i18n( "Value" ) );
    envList->header()->setClickEnabled( false, envList->header()->count() - 1 );
    envList->setSelectionMode( TQListView::Single );
    layout7->addWidget( envList );
    layout9->addLayout( layout7 );

    layout8 = new TQVBoxLayout( 0, 0, 6, "layout8"); 

    buttonModify = new TQPushButton( envPage, "buttonModify" );
    layout8->addWidget( buttonModify );

    buttonDelete = new TQPushButton( envPage, "buttonDelete" );
    layout8->addWidget( buttonDelete );
    spacer6 = new TQSpacerItem( 51, 141, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    layout8->addItem( spacer6 );
    layout9->addLayout( layout8 );
    envPageLayout->addLayout( layout9 );
    tabWidget->insertTab( envPage, TQString::fromLatin1("") );

    xsldbgOptionsPage = new TQWidget( tabWidget, "xsldbgOptionsPage" );
    xsldbgOptionsPageLayout = new TQHBoxLayout( xsldbgOptionsPage, 11, 6, "xsldbgOptionsPageLayout"); 

    xsldbgOptions = new TQListBox( xsldbgOptionsPage, "xsldbgOptions" );
    xsldbgOptions->setSelectionMode( TQListBox::Multi );
    xsldbgOptionsPageLayout->addWidget( xsldbgOptions );
    tabWidget->insertTab( xsldbgOptionsPage, TQString::fromLatin1("") );
    layout1->addWidget( tabWidget );

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

    buttonHelp = new TQPushButton( this, "buttonHelp" );
    buttonHelp->setAutoDefault( true );
    layout4->addWidget( buttonHelp );
    spacer3 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout4->addItem( spacer3 );

    buttonOk = new TQPushButton( this, "buttonOk" );
    buttonOk->setAutoDefault( true );
    buttonOk->setDefault( true );
    layout4->addWidget( buttonOk );

    buttonCancel = new TQPushButton( this, "buttonCancel" );
    buttonCancel->setAutoDefault( true );
    layout4->addWidget( buttonCancel );
    layout1->addLayout( layout4 );
    PgmArgsBaseLayout->addLayout( layout1 );
    languageChange();
    resize( TQSize(528, 410).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( buttonOk, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
    connect( buttonCancel, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
    connect( insertFile, TQ_SIGNAL( clicked() ), this, TQ_SLOT( browseArgFile() ) );
    connect( wdBrowse, TQ_SIGNAL( clicked() ), this, TQ_SLOT( browseWd() ) );
    connect( buttonModify, TQ_SIGNAL( clicked() ), this, TQ_SLOT( modifyVar() ) );
    connect( buttonDelete, TQ_SIGNAL( clicked() ), this, TQ_SLOT( deleteVar() ) );
    connect( envList, TQ_SIGNAL( selectionChanged() ), this, TQ_SLOT( envListCurrentChanged() ) );
    connect( buttonHelp, TQ_SIGNAL( clicked() ), this, TQ_SLOT( invokeHelp() ) );
    connect( insertDir, TQ_SIGNAL( clicked() ), this, TQ_SLOT( browseArgDir() ) );

    // tab order
    setTabOrder( envVar, envList );
    setTabOrder( envList, buttonModify );
    setTabOrder( buttonModify, buttonDelete );
    setTabOrder( buttonDelete, programArgs );
    setTabOrder( programArgs, insertFile );
    setTabOrder( insertFile, insertDir );
    setTabOrder( insertDir, buttonHelp );
    setTabOrder( buttonHelp, buttonOk );
    setTabOrder( buttonOk, buttonCancel );
    setTabOrder( buttonCancel, tabWidget );
    setTabOrder( tabWidget, wdEdit );
    setTabOrder( wdEdit, wdBrowse );

    // buddies
    labelArgs->setBuddy( programArgs );
    envLabel->setBuddy( envVar );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void PgmArgsBase::languageChange()
{
    setCaption( tr2i18n( "Program Arguments" ) );
    labelArgs->setText( tr2i18n( "Run <i>%1</i> with these arguments:" ) );
    TQWhatsThis::add( programArgs, tr2i18n( "Specify the arguments with which the program shall be invoked for this debugging session. You specify the arguments just as you would on the command line, that is, you can even use quotes and environment variables, for example:<p><tt>--message 'start in: ' $HOME</tt>" ) );
    insertFile->setText( tr2i18n( "Insert &file name..." ) );
    TQWhatsThis::add( insertFile, tr2i18n( "Browse for a file; the full path name will be inserted at the current cursor location in the edit box above." ) );
    insertDir->setText( tr2i18n( "Insert &directory name..." ) );
    TQWhatsThis::add( insertDir, tr2i18n( "Browse for a directory; the full path name will be inserted at the current cursor location in the edit box above." ) );
    tabWidget->changeTab( argsPage, tr2i18n( "&Arguments" ) );
    TQWhatsThis::add( wdEdit, tr2i18n( "Specify here the initial working directory where the program is run." ) );
    wdBrowse->setText( tr2i18n( "&Browse..." ) );
    TQWhatsThis::add( wdBrowse, tr2i18n( "Browse for the initial working directory where the program is run." ) );
    tabWidget->changeTab( wdPage, tr2i18n( "&Working Directory" ) );
    envLabel->setText( tr2i18n( "Environment variables (<tt>NAME=value</tt>):" ) );
    TQWhatsThis::add( envVar, tr2i18n( "To add a new environment variable or to modify one, specify it here in the form <tt>NAME=value</tt> and click <b>Modify</b>." ) );
    envList->header()->setLabel( 0, tr2i18n( "Name" ) );
    envList->header()->setLabel( 1, tr2i18n( "Value" ) );
    TQWhatsThis::add( envList, tr2i18n( "Environment variables that are set <i>in addition</i> to those that are inherited are listed in this table. To add new environment variables, specify them as <tt>NAME=value</tt> in the edit box above and click <b>Modify</b>. To modify a value, select it in this list and click <b>Modify</b>. To delete an environment variable, select it in this list and click <b>Delete</b>." ) );
    buttonModify->setText( tr2i18n( "&Modify" ) );
    TQWhatsThis::add( buttonModify, tr2i18n( "Enters the environment variable that is currently specified in the edit box into the list. If the named variable is already in the list, it receives a new value; otherwise, a new entry is created." ) );
    buttonDelete->setText( tr2i18n( "&Delete" ) );
    TQWhatsThis::add( buttonDelete, tr2i18n( "Deletes the selected environment variable from the list. This cannot be used to delete environment variables that are inherited." ) );
    tabWidget->changeTab( envPage, tr2i18n( "&Environment" ) );
    tabWidget->changeTab( xsldbgOptionsPage, tr2i18n( "&xsldbg Options" ) );
    buttonHelp->setText( tr2i18n( "&Help" ) );
    buttonHelp->setAccel( TQKeySequence( tr2i18n( "F1" ) ) );
    buttonOk->setText( tr2i18n( "&OK" ) );
    buttonCancel->setText( tr2i18n( "&Cancel" ) );
}

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

TQMetaObject *PgmArgsBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_PgmArgsBase( "PgmArgsBase", &PgmArgsBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* PgmArgsBase::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 = TQDialog::staticMetaObject();
    static const TQUMethod slot_0 = {"browseArgFile", 0, 0 };
    static const TQUMethod slot_1 = {"browseWd", 0, 0 };
    static const TQUMethod slot_2 = {"modifyVar", 0, 0 };
    static const TQUMethod slot_3 = {"deleteVar", 0, 0 };
    static const TQUMethod slot_4 = {"envListCurrentChanged", 0, 0 };
    static const TQUMethod slot_5 = {"invokeHelp", 0, 0 };
    static const TQUMethod slot_6 = {"browseArgDir", 0, 0 };
    static const TQUMethod slot_7 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "browseArgFile()", &slot_0, TQMetaData::Public },
	{ "browseWd()", &slot_1, TQMetaData::Public },
	{ "modifyVar()", &slot_2, TQMetaData::Public },
	{ "deleteVar()", &slot_3, TQMetaData::Public },
	{ "envListCurrentChanged()", &slot_4, TQMetaData::Public },
	{ "invokeHelp()", &slot_5, TQMetaData::Public },
	{ "browseArgDir()", &slot_6, TQMetaData::Public },
	{ "languageChange()", &slot_7, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"PgmArgsBase", parentObject,
	slot_tbl, 8,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_PgmArgsBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool PgmArgsBase::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: browseArgFile(); break;
    case 1: browseWd(); break;
    case 2: modifyVar(); break;
    case 3: deleteVar(); break;
    case 4: envListCurrentChanged(); break;
    case 5: invokeHelp(); break;
    case 6: browseArgDir(); break;
    case 7: languageChange(); break;
    default:
	return TQDialog::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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