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

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

#include "debuggerconfigwidgetbase.h"

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

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

    textLabel1 = new TQLabel( this, "textLabel1" );
    debugger_config_widgetLayout->addWidget( textLabel1 );

    gdbPath_label = new TQLabel( this, "gdbPath_label" );
    gdbPath_label->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, gdbPath_label->sizePolicy().hasHeightForWidth() ) );
    debugger_config_widgetLayout->addWidget( gdbPath_label );

    gdbPath_edit = new KURLRequester( this, "gdbPath_edit" );
    debugger_config_widgetLayout->addWidget( gdbPath_edit );

    debuggingShell_label = new TQLabel( this, "debuggingShell_label" );
    debuggingShell_label->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, debuggingShell_label->sizePolicy().hasHeightForWidth() ) );
    debugger_config_widgetLayout->addWidget( debuggingShell_label );

    debuggingShell_edit = new KURLRequester( this, "debuggingShell_edit" );
    debugger_config_widgetLayout->addWidget( debuggingShell_edit );

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

    groupBox2 = new TQGroupBox( this, "groupBox2" );
    groupBox2->setColumnLayout(0, TQt::Vertical );
    groupBox2->layout()->setSpacing( KDialog::spacingHint() );
    groupBox2->layout()->setMargin( KDialog::marginHint() );
    groupBox2Layout = new TQGridLayout( groupBox2->layout() );
    groupBox2Layout->setAlignment( TQt::AlignTop );

    asmDemangle_box = new TQCheckBox( groupBox2, "asmDemangle_box" );

    groupBox2Layout->addWidget( asmDemangle_box, 1, 0 );

    breakOnLoadingLibrary_box = new TQCheckBox( groupBox2, "breakOnLoadingLibrary_box" );

    groupBox2Layout->addWidget( breakOnLoadingLibrary_box, 2, 0 );

    dbgTerminal_box = new TQCheckBox( groupBox2, "dbgTerminal_box" );

    groupBox2Layout->addWidget( dbgTerminal_box, 4, 0 );

    enableFloatingToolBar_box = new TQCheckBox( groupBox2, "enableFloatingToolBar_box" );

    groupBox2Layout->addWidget( enableFloatingToolBar_box, 3, 0 );

    displayStaticMembers_box = new TQCheckBox( groupBox2, "displayStaticMembers_box" );

    groupBox2Layout->addWidget( displayStaticMembers_box, 0, 0 );
    layout4->addWidget( groupBox2 );

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

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

    outputRadixOctal = new TQRadioButton( globalOutputRadix, "outputRadixOctal" );
    globalOutputRadixLayout->addWidget( outputRadixOctal );

    outputRadixHexadecimal = new TQRadioButton( globalOutputRadix, "outputRadixHexadecimal" );
    globalOutputRadixLayout->addWidget( outputRadixHexadecimal );

    outputRadixDecimal = new TQRadioButton( globalOutputRadix, "outputRadixDecimal" );
    globalOutputRadixLayout->addWidget( outputRadixDecimal );
    layout3->addWidget( globalOutputRadix );

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

    radioFramestack = new TQRadioButton( buttonGroup2, "radioFramestack" );
    buttonGroup2Layout->addWidget( radioFramestack );

    radioGDB = new TQRadioButton( buttonGroup2, "radioGDB" );
    buttonGroup2Layout->addWidget( radioGDB );
    layout3->addWidget( buttonGroup2 );
    layout4->addLayout( layout3 );
    debugger_config_widgetLayout->addLayout( layout4 );

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

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

    runShellScript_label = new TQLabel( groupBox1, "runShellScript_label" );

    layout1->addWidget( runShellScript_label, 1, 0 );

    runGdbScript_edit = new KURLRequester( groupBox1, "runGdbScript_edit" );

    layout1->addWidget( runGdbScript_edit, 2, 1 );

    runShellScript_edit = new KURLRequester( groupBox1, "runShellScript_edit" );

    layout1->addWidget( runShellScript_edit, 1, 1 );

    runGdbScript_label = new TQLabel( groupBox1, "runGdbScript_label" );

    layout1->addWidget( runGdbScript_label, 2, 0 );

    configGdbScript_label = new TQLabel( groupBox1, "configGdbScript_label" );

    layout1->addWidget( configGdbScript_label, 0, 0 );

    configGdbScript_edit = new KURLRequester( groupBox1, "configGdbScript_edit" );

    layout1->addWidget( configGdbScript_edit, 0, 1 );
    groupBox1Layout->addLayout( layout1 );
    debugger_config_widgetLayout->addWidget( groupBox1 );
    spacer1 = new TQSpacerItem( 20, 16, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    debugger_config_widgetLayout->addItem( spacer1 );
    languageChange();
    resize( TQSize(558, 627).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( debuggingShell_edit, gdbPath_edit );
    setTabOrder( gdbPath_edit, displayStaticMembers_box );
    setTabOrder( displayStaticMembers_box, asmDemangle_box );
    setTabOrder( asmDemangle_box, breakOnLoadingLibrary_box );
    setTabOrder( breakOnLoadingLibrary_box, enableFloatingToolBar_box );
    setTabOrder( enableFloatingToolBar_box, dbgTerminal_box );
    setTabOrder( dbgTerminal_box, outputRadixOctal );
    setTabOrder( outputRadixOctal, outputRadixDecimal );
    setTabOrder( outputRadixDecimal, outputRadixHexadecimal );
    setTabOrder( outputRadixHexadecimal, configGdbScript_edit );
    setTabOrder( configGdbScript_edit, runShellScript_edit );
    setTabOrder( runShellScript_edit, runGdbScript_edit );

    // buddies
    gdbPath_label->setBuddy( gdbPath_edit );
    debuggingShell_label->setBuddy( debuggingShell_edit );
    runShellScript_label->setBuddy( runShellScript_edit );
    runGdbScript_label->setBuddy( runGdbScript_edit );
    configGdbScript_label->setBuddy( configGdbScript_edit );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void DebuggerConfigWidgetBase::languageChange()
{
    setCaption( tr2i18n( "Debugger Configuration" ) );
    TQToolTip::add( this, TQString::null );
    TQWhatsThis::add( this, TQString::null );
    textLabel1->setText( tr2i18n( "Debug arguments can be set on the Run Options page\n"
" or directly in the project manager" ) );
    gdbPath_label->setText( tr2i18n( "Debugger executable:" ) );
    TQToolTip::add( gdbPath_edit, tr2i18n( "Gdb executable" ) );
    TQWhatsThis::add( gdbPath_edit, tr2i18n( "To run \"gdb\" binary from $PATH, leave this field empty. To run custom gdb, for example, for a different architecture, enter the executable name here. You can either run gdb from $PATH, but with a different name (say, \"arm-gdb\"), by typing the name here, or specify full path to the gdb executable." ) );
    debuggingShell_label->setText( tr2i18n( "Debugging &shell:" ) );
    TQToolTip::add( debuggingShell_label, tr2i18n( "Run gdb in a special shell (mainly for automake projects)" ) );
    TQWhatsThis::add( debuggingShell_label, tr2i18n( "If you want gdb to be executed by a special shell or tool insert it here. The main use-case is for Automake based projects where the application is actually only a script and libtool is needed to get it to run inside gdb." ) );
    TQToolTip::add( debuggingShell_edit, tr2i18n( "Run gdb in a special shell (mainly for automake projects)" ) );
    TQWhatsThis::add( debuggingShell_edit, tr2i18n( "If you want gdb to be executed by a special shell or tool insert it here. The main use-case is for Automake based projects where the application is actually only a script and <b>libtool</b> is needed to get it to run inside gdb." ) );
    groupBox2->setTitle( tr2i18n( "Options" ) );
    asmDemangle_box->setText( tr2i18n( "Display &demangled names" ) );
    TQWhatsThis::add( asmDemangle_box, tr2i18n( "When displaying the disassembled code you\n"
"can select to see the methods' mangled names.\n"
"However, non-mangled names are easier to read." ) );
    breakOnLoadingLibrary_box->setText( tr2i18n( "Try settings &breakpoints on library loading" ) );
    TQWhatsThis::add( breakOnLoadingLibrary_box, tr2i18n( "If GDB has not seen a library that will be loaded via\n"
"\"dlopen\" then it will refuse to set a breakpoint in that code.\n"
"We can get GDB to stop on a library load and hence\n"
"try to set the pending breakpoints. See the documentation\n"
"for more details relating to this behavior.\n"
"\n"
"If you are not \"dlopen\"ing libs then leave this unchecked." ) );
    dbgTerminal_box->setText( tr2i18n( "Enable separate terminal for application &IO" ) );
    TQWhatsThis::add( dbgTerminal_box, tr2i18n( "This allows you to enter terminal input when your\n"
"application contains terminal input code (e.g. cin, fgets, etc.).\n"
"If you use terminal input in your application then check this option.\n"
"Otherwise leave it unchecked." ) );
    enableFloatingToolBar_box->setText( tr2i18n( "E&nable floating toolbar" ) );
    TQWhatsThis::add( enableFloatingToolBar_box, tr2i18n( "Use the floating toolbar. This toolbar always stays\n"
"on top of all windows so that if the app covers TDevelop\n"
"you have control of the app through the small toolbar. It\n"
"can also be docked into the panel.\n"
"\n"
"This toolbar is in addition to the toolbar in TDevelop." ) );
    displayStaticMembers_box->setText( tr2i18n( "Display static &members" ) );
    TQWhatsThis::add( displayStaticMembers_box, tr2i18n( "Displaying static members makes GDB slower in\n"
"producing data within TDE and TQt.\n"
"It may change the \"signature\" of the data\n"
"which TQString and friends rely on,\n"
"but if you need to debug into these values then\n"
"check this option." ) );
    globalOutputRadix->setTitle( tr2i18n( "Global Output Radix" ) );
    outputRadixOctal->setText( tr2i18n( "Oct&al" ) );
    outputRadixHexadecimal->setText( tr2i18n( "He&xadecimal" ) );
    outputRadixDecimal->setText( tr2i18n( "Decimal" ) );
    buttonGroup2->setTitle( tr2i18n( "Start Debugger With" ) );
    radioFramestack->setText( tr2i18n( "Framestack" ) );
    radioGDB->setText( tr2i18n( "GDB Output" ) );
    groupBox1->setTitle( tr2i18n( "Remote Debugging" ) );
    TQWhatsThis::add( groupBox1, tr2i18n( "This script is intended for the actual commands needed to connect to a remotely running executable.\n"
"	shell sleep 5	wait for remote program to start\n"
"	target remote ...	connect to the remote debugger\n"
"	continue	[optional] run debugging to the first breakpoint." ) );
    runShellScript_label->setText( tr2i18n( "R&un shell script:", "Shell script to be executed at run time" ) );
    TQToolTip::add( runShellScript_label, TQString::null );
    TQToolTip::add( runGdbScript_edit, tr2i18n( "Script to connect with remote application" ) );
    TQWhatsThis::add( runGdbScript_edit, tr2i18n( "This script is sourced by gdb after the two preceding scripts have been executed.\n"
"This script is intended for the actual commands needed to connect to a remotely running executable.\n"
"	shell sleep 5	wait for remote program to start\n"
"	target remote ...	connect to the remote debugger\n"
"	continue	[optional] run debugging to the first breakpoint." ) );
    TQToolTip::add( runShellScript_edit, tr2i18n( "Script to start remote application" ) );
    TQWhatsThis::add( runShellScript_edit, tr2i18n( "This shell script is run after the Config gdb script has been sourced by gdb.\n"
"When debugging remotely this script is intended to actually start the remote process.\n"
"[It is expected that the debug executable can be reached on the target, maybe by downloading it as a final build step]\n"
"1) Find a way to execute a command remotely - rsh, ssh, telnet, ...\n"
"2a) Execute \"gdbserver ... application\" on target.\n"
"or if your executable contains the gdb stub\n"
"2b) Execute \"application\" on target." ) );
    runGdbScript_label->setText( tr2i18n( "Run &gdb script:", "Gdb script to be executed at run time." ) );
    configGdbScript_label->setText( tr2i18n( "&Config gdb script:" ) );
    TQToolTip::add( configGdbScript_edit, tr2i18n( "Gdb configure script" ) );
    TQWhatsThis::add( configGdbScript_edit, tr2i18n( "This script is sourced by gdb when the debugging starts." ) );
}

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

TQMetaObject *DebuggerConfigWidgetBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_DebuggerConfigWidgetBase( "DebuggerConfigWidgetBase", &DebuggerConfigWidgetBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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