KDevelop API Documentation

debuggerconfigwidgetbase.cpp

Go to the documentation of this file.
00001 #include <kdialog.h>
00002 #include <klocale.h>
00003 /****************************************************************************
00004 ** Form implementation generated from reading ui file './debuggerconfigwidgetbase.ui'
00005 **
00006 ** Created: Tue Mar 22 23:52:28 2005
00007 **      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.4   edited Nov 24 2003 $)
00008 **
00009 ** WARNING! All changes made in this file will be lost!
00010 ****************************************************************************/
00011 
00012 #include "debuggerconfigwidgetbase.h"
00013 
00014 #include <qvariant.h>
00015 #include <kdialog.h>
00016 #include <qpushbutton.h>
00017 #include <qlabel.h>
00018 #include <qlineedit.h>
00019 #include <kurlrequester.h>
00020 #include <qcheckbox.h>
00021 #include <qbuttongroup.h>
00022 #include <qradiobutton.h>
00023 #include <qgroupbox.h>
00024 #include <qlayout.h>
00025 #include <qtooltip.h>
00026 #include <qwhatsthis.h>
00027 
00028 /*
00029  *  Constructs a DebuggerConfigWidgetBase as a child of 'parent', with the
00030  *  name 'name' and widget flags set to 'f'.
00031  */
00032 DebuggerConfigWidgetBase::DebuggerConfigWidgetBase( QWidget* parent, const char* name, WFlags fl )
00033     : QWidget( parent, name, fl )
00034 {
00035     if ( !name )
00036     setName( "debugger_config_widget" );
00037     debugger_config_widgetLayout = new QGridLayout( this, 1, 1, KDialog::marginHint(), KDialog::spacingHint(), "debugger_config_widgetLayout"); 
00038 
00039     programArgs_label = new QLabel( this, "programArgs_label" );
00040     programArgs_label->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4, (QSizePolicy::SizeType)5, 0, 0, programArgs_label->sizePolicy().hasHeightForWidth() ) );
00041     programArgs_label->setFrameShape( QLabel::NoFrame );
00042     programArgs_label->setFrameShadow( QLabel::Plain );
00043 
00044     debugger_config_widgetLayout->addWidget( programArgs_label, 0, 0 );
00045 
00046     debuggingShell_label = new QLabel( this, "debuggingShell_label" );
00047     debuggingShell_label->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4, (QSizePolicy::SizeType)5, 0, 0, debuggingShell_label->sizePolicy().hasHeightForWidth() ) );
00048 
00049     debugger_config_widgetLayout->addWidget( debuggingShell_label, 1, 0 );
00050 
00051     gdbPath_label = new QLabel( this, "gdbPath_label" );
00052     gdbPath_label->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4, (QSizePolicy::SizeType)5, 0, 0, gdbPath_label->sizePolicy().hasHeightForWidth() ) );
00053 
00054     debugger_config_widgetLayout->addWidget( gdbPath_label, 2, 0 );
00055 
00056     programArgs_edit = new QLineEdit( this, "programArgs_edit" );
00057 
00058     debugger_config_widgetLayout->addMultiCellWidget( programArgs_edit, 0, 0, 1, 2 );
00059 
00060     debuggingShell_edit = new KURLRequester( this, "debuggingShell_edit" );
00061 
00062     debugger_config_widgetLayout->addMultiCellWidget( debuggingShell_edit, 1, 1, 1, 2 );
00063 
00064     gdbPath_edit = new KURLRequester( this, "gdbPath_edit" );
00065 
00066     debugger_config_widgetLayout->addMultiCellWidget( gdbPath_edit, 2, 2, 1, 2 );
00067 
00068     displayStaticMembers_box = new QCheckBox( this, "displayStaticMembers_box" );
00069 
00070     debugger_config_widgetLayout->addMultiCellWidget( displayStaticMembers_box, 4, 4, 0, 2 );
00071 
00072     breakOnLoadingLibrary_box = new QCheckBox( this, "breakOnLoadingLibrary_box" );
00073 
00074     debugger_config_widgetLayout->addMultiCellWidget( breakOnLoadingLibrary_box, 6, 6, 0, 2 );
00075 
00076     asmDemangle_box = new QCheckBox( this, "asmDemangle_box" );
00077 
00078     debugger_config_widgetLayout->addMultiCellWidget( asmDemangle_box, 5, 5, 0, 2 );
00079 
00080     enableFloatingToolBar_box = new QCheckBox( this, "enableFloatingToolBar_box" );
00081 
00082     debugger_config_widgetLayout->addMultiCellWidget( enableFloatingToolBar_box, 7, 7, 0, 2 );
00083 
00084     dbgTerminal_box = new QCheckBox( this, "dbgTerminal_box" );
00085 
00086     debugger_config_widgetLayout->addMultiCellWidget( dbgTerminal_box, 8, 8, 0, 2 );
00087 
00088     globalOutputRadix = new QButtonGroup( this, "globalOutputRadix" );
00089     globalOutputRadix->setColumnLayout(0, Qt::Vertical );
00090     globalOutputRadix->layout()->setSpacing( KDialog::spacingHint() );
00091     globalOutputRadix->layout()->setMargin( KDialog::marginHint() );
00092     globalOutputRadixLayout = new QHBoxLayout( globalOutputRadix->layout() );
00093     globalOutputRadixLayout->setAlignment( Qt::AlignTop );
00094 
00095     outputRadixOctal = new QRadioButton( globalOutputRadix, "outputRadixOctal" );
00096     globalOutputRadixLayout->addWidget( outputRadixOctal );
00097 
00098     outputRadixDecimal = new QRadioButton( globalOutputRadix, "outputRadixDecimal" );
00099     globalOutputRadixLayout->addWidget( outputRadixDecimal );
00100 
00101     outputRadixHexadecimal = new QRadioButton( globalOutputRadix, "outputRadixHexadecimal" );
00102     globalOutputRadixLayout->addWidget( outputRadixHexadecimal );
00103 
00104     debugger_config_widgetLayout->addMultiCellWidget( globalOutputRadix, 10, 10, 0, 2 );
00105 
00106     groupBox1 = new QGroupBox( this, "groupBox1" );
00107     groupBox1->setColumnLayout(0, Qt::Vertical );
00108     groupBox1->layout()->setSpacing( KDialog::spacingHint() );
00109     groupBox1->layout()->setMargin( KDialog::marginHint() );
00110     groupBox1Layout = new QGridLayout( groupBox1->layout() );
00111     groupBox1Layout->setAlignment( Qt::AlignTop );
00112 
00113     runShellScript_label = new QLabel( groupBox1, "runShellScript_label" );
00114 
00115     groupBox1Layout->addWidget( runShellScript_label, 1, 0 );
00116 
00117     configGdbScript_label = new QLabel( groupBox1, "configGdbScript_label" );
00118 
00119     groupBox1Layout->addWidget( configGdbScript_label, 0, 0 );
00120 
00121     configGdbScript_edit = new QLineEdit( groupBox1, "configGdbScript_edit" );
00122 
00123     groupBox1Layout->addWidget( configGdbScript_edit, 0, 1 );
00124 
00125     runShellScript_edit = new QLineEdit( groupBox1, "runShellScript_edit" );
00126 
00127     groupBox1Layout->addWidget( runShellScript_edit, 1, 1 );
00128 
00129     runGdbScript_edit = new QLineEdit( groupBox1, "runGdbScript_edit" );
00130 
00131     groupBox1Layout->addWidget( runGdbScript_edit, 2, 1 );
00132 
00133     runGdbScript_label = new QLabel( groupBox1, "runGdbScript_label" );
00134 
00135     groupBox1Layout->addWidget( runGdbScript_label, 2, 0 );
00136 
00137     debugger_config_widgetLayout->addMultiCellWidget( groupBox1, 12, 12, 0, 2 );
00138     languageChange();
00139     resize( QSize(469, 412).expandedTo(minimumSizeHint()) );
00140     clearWState( WState_Polished );
00141 
00142     // tab order
00143     setTabOrder( programArgs_edit, debuggingShell_edit );
00144     setTabOrder( debuggingShell_edit, gdbPath_edit );
00145     setTabOrder( gdbPath_edit, displayStaticMembers_box );
00146     setTabOrder( displayStaticMembers_box, asmDemangle_box );
00147     setTabOrder( asmDemangle_box, breakOnLoadingLibrary_box );
00148     setTabOrder( breakOnLoadingLibrary_box, enableFloatingToolBar_box );
00149     setTabOrder( enableFloatingToolBar_box, dbgTerminal_box );
00150     setTabOrder( dbgTerminal_box, configGdbScript_edit );
00151     setTabOrder( configGdbScript_edit, runShellScript_edit );
00152     setTabOrder( runShellScript_edit, runGdbScript_edit );
00153 
00154     // buddies
00155     programArgs_label->setBuddy( programArgs_edit );
00156     debuggingShell_label->setBuddy( debuggingShell_edit );
00157     gdbPath_label->setBuddy( gdbPath_edit );
00158     runShellScript_label->setBuddy( debuggingShell_edit );
00159     configGdbScript_label->setBuddy( programArgs_edit );
00160     runGdbScript_label->setBuddy( gdbPath_edit );
00161 }
00162 
00163 /*
00164  *  Destroys the object and frees any allocated resources
00165  */
00166 DebuggerConfigWidgetBase::~DebuggerConfigWidgetBase()
00167 {
00168     // no need to delete child widgets, Qt does it all for us
00169 }
00170 
00171 /*
00172  *  Sets the strings of the subwidgets using the current
00173  *  language.
00174  */
00175 void DebuggerConfigWidgetBase::languageChange()
00176 {
00177     setCaption( tr2i18n( "Debugger Configuration" ) );
00178     programArgs_label->setText( tr2i18n( "Program &arguments:" ) );
00179     QWhatsThis::add( programArgs_label, tr2i18n( "Arguments that are given to the application when it is debugged." ) );
00180     debuggingShell_label->setText( tr2i18n( "Debugging &shell:" ) );
00181     gdbPath_label->setText( tr2i18n( "Directory where &gdb resides (e.g. /usr/bin/):" ) );
00182     programArgs_edit->setText( QString::null );
00183     displayStaticMembers_box->setText( tr2i18n( "Display static &members" ) );
00184     QWhatsThis::add( displayStaticMembers_box, tr2i18n( "Displaying static members makes GDB slower in\n"
00185 "producing data within KDE and Qt.\n"
00186 "It may change the \"signature\" of the data\n"
00187 "which QString and friends rely on,\n"
00188 "but if you need to debug into these values then\n"
00189 "check this option." ) );
00190     breakOnLoadingLibrary_box->setText( tr2i18n( "Try settings &breakpoints on library loading" ) );
00191     QWhatsThis::add( breakOnLoadingLibrary_box, tr2i18n( "If GDB hasn't seen a library that will be loaded via\n"
00192 "\"dlopen\" then it will refuse to set a breakpoint in that code.\n"
00193 "We can get GDB to stop on a library load and hence\n"
00194 "try to set the pending breakpoints. See the documentation\n"
00195 "for more details relating to this behavior.\n"
00196 "\n"
00197 "If you are not \"dlopen\"ing libs then leave this unchecked." ) );
00198     asmDemangle_box->setText( tr2i18n( "Display &demangled names" ) );
00199     QWhatsThis::add( asmDemangle_box, tr2i18n( "When displaying the disassembled code you\n"
00200 "can select to see the methods' mangled names.\n"
00201 "However, non-mangled names are easier to read." ) );
00202     enableFloatingToolBar_box->setText( tr2i18n( "Enable &floating toolbar" ) );
00203     QWhatsThis::add( enableFloatingToolBar_box, tr2i18n( "Use the floating toolbar. This toolbar always stays\n"
00204 "on top of all windows so that if the app covers KDevelop\n"
00205 "you have control of the app through the small toolbar. It\n"
00206 "can also be docked into the panel.\n"
00207 "\n"
00208 "This toolbar is in addition to the toolbar in KDevelop." ) );
00209     dbgTerminal_box->setText( tr2i18n( "Enable separate &terminal for application IO" ) );
00210     QWhatsThis::add( dbgTerminal_box, tr2i18n( "This allows you to enter terminal input when your\n"
00211 "application contains terminal input code (e.g. cin, fgets, etc.).\n"
00212 "If you use terminal input in your application then check this option.\n"
00213 "Otherwise leave it unchecked." ) );
00214     globalOutputRadix->setTitle( tr2i18n( "Global Output Radix" ) );
00215     outputRadixOctal->setText( tr2i18n( "Octal" ) );
00216     outputRadixDecimal->setText( tr2i18n( "Decimal" ) );
00217     outputRadixHexadecimal->setText( tr2i18n( "Hexadecimal" ) );
00218     groupBox1->setTitle( tr2i18n( "Remote Debugging" ) );
00219     QWhatsThis::add( groupBox1, tr2i18n( "The goal of \"Run shell script\" is to start gdbserver (or an application with\n"
00220 "embedded gdbstub on the target). Key command here is:\n"
00221 "        ssh ${ruser} gdbserver jeloin:2345 \"${remote##/*/}\"\n"
00222 "where jeloin:2345 is the host and a port.\n"
00223 "\"${remote##/*/}\" is magic for remote filename without (the host local) path.\n"
00224 "\n"
00225 "The goal of \"Run gdb script\" (gdb commands) is to connect with that target.\n"
00226 "Key command in this file is: target remote dox:2345\n"
00227 "where dox:2345 is the target with a port.\n"
00228 "\n"
00229 "(Note that the gdb script is run from the execution directory - often ./src\n"
00230 "not the projects base - see \"Run options\")\n"
00231 "" ) );
00232     runShellScript_label->setText( tr2i18n( "Run shell script:", "Shell script to be executed at run time" ) );
00233     configGdbScript_label->setText( tr2i18n( "Config gdb script:" ) );
00234     QToolTip::add( configGdbScript_edit, QString::null );
00235     QToolTip::add( runShellScript_edit, tr2i18n( "Script to start remote application" ) );
00236     QWhatsThis::add( runShellScript_edit, tr2i18n( "When debugging remotely this script is intended to actually start the remote process.\n"
00237 "[It is expected that the debug executable can be reached on the target, maybe by downloading it as a final build step]\n"
00238 "1) Find a way to execute a command remotely - rsh, ssh, telnet, ...\n"
00239 "2a) Execute \"gdbserver ... application\" on target.\n"
00240 "or if your executable contains the gdb stub\n"
00241 "2b) Execute \"application\" on target." ) );
00242     QToolTip::add( runGdbScript_edit, tr2i18n( "Script to connect with remote application" ) );
00243     QWhatsThis::add( runGdbScript_edit, tr2i18n( "This script is intended for the actual commands needed to connect to a remotely running executable.\n"
00244 "   shell sleep 5   wait for remote program to start\n"
00245 "   target remote ...   connect to the remote debugger\n"
00246 "   continue    [optional] run debugging to the first breakpoint." ) );
00247     runGdbScript_label->setText( tr2i18n( "Run gdb script:", "Gdb script to be executed at run time." ) );
00248 }
00249 
00250 #include "debuggerconfigwidgetbase.moc"
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Mar 23 00:03:46 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003