KDevelop API Documentation

Debugger Class Reference

Handles signals from the editor that relate to breakpoints and the execution point of the debugger. More...

#include <debugger.h>

Inheritance diagram for Debugger:

Inheritance graph
[legend]
Collaboration diagram for Debugger:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void setBreakpoint (const QString &fileName, int lineNum, int id, bool enabled, bool pending)
 Controls the breakpoint icon being displayed in the editor through the markinterface.
void gotoExecutionPoint (const KURL &url, int lineNum=-1)
 Displays an icon in the file at the line that the debugger has stoped at.
void clearExecutionPoint ()
 Remove the executution point being displayed.

Static Public Member Functions

DebuggergetInstance ()

Protected Member Functions

 Debugger ()
 ~Debugger ()

Private Types

enum  MarkType {
  Bookmark = KTextEditor::MarkInterface::markType01, Breakpoint = KTextEditor::MarkInterface::markType02, ActiveBreakpoint = KTextEditor::MarkInterface::markType03, ReachedBreakpoint = KTextEditor::MarkInterface::markType04,
  DisabledBreakpoint = KTextEditor::MarkInterface::markType05, ExecutionPoint = KTextEditor::MarkInterface::markType06
}

Private Slots

void partAdded (KParts::Part *part)
 Whenever a new part is added this slot gets triggered and we then look for a MarkInterfaceExtension part.
void marksChanged ()
 Called by the TextEditor interface when the marks have changed position because the user has added or removed source.

Private Attributes

QValueList< BPItemBPList

Static Private Attributes

Debuggers_instance = 0

Detailed Description

Handles signals from the editor that relate to breakpoints and the execution point of the debugger.

We may change, add or remove breakpoints in this class.

Definition at line 59 of file debugger.h.


Member Enumeration Documentation

enum Debugger::MarkType [private]
 

Enumeration values:
Bookmark 
Breakpoint 
ActiveBreakpoint 
ReachedBreakpoint 
DisabledBreakpoint 
ExecutionPoint 

Definition at line 120 of file debugger.h.


Constructor & Destructor Documentation

Debugger::Debugger  )  [protected]
 

Definition at line 16 of file debugger.cpp.

References partAdded().

Debugger::~Debugger  )  [protected]
 

Definition at line 23 of file debugger.cpp.


Member Function Documentation

void Debugger::clearExecutionPoint  )  [virtual]
 

Remove the executution point being displayed.

Implements KDevDebugger.

Definition at line 77 of file debugger.cpp.

References ExecutionPoint, KTextEditor::MarkInterface::marks(), and KTextEditor::MarkInterface::removeMark().

Referenced by gotoExecutionPoint().

Debugger * Debugger::getInstance  )  [static]
 

Definition at line 27 of file debugger.cpp.

References s_instance.

Referenced by API::debugger().

void Debugger::gotoExecutionPoint const KURL url,
int  lineNum = -1
[virtual]
 

Displays an icon in the file at the line that the debugger has stoped at.

Parameters:
url The file the debugger has stopped at.
lineNum The line number to display. Note: We may not know it.

Implements KDevDebugger.

Definition at line 98 of file debugger.cpp.

References KTextEditor::MarkInterface::addMark(), clearExecutionPoint(), PartController::editDocument(), ExecutionPoint, PartController::getInstance(), and PartController::partForURL().

void Debugger::marksChanged  )  [private, slot]
 

Called by the TextEditor interface when the marks have changed position because the user has added or removed source.

In here we figure out if we need to reset the breakpoints due to these source changes.

Definition at line 114 of file debugger.cpp.

References PartController::getInstance(), KTextEditor::markInterface(), KTextEditor::MarkInterface::marks(), PartController::partForURL(), KURL::path(), KDevDebugger::toggledBreakpoint(), and KParts::ReadOnlyPart::url().

Referenced by partAdded(), and setBreakpoint().

void Debugger::partAdded KParts::Part part  )  [private, slot]
 

Whenever a new part is added this slot gets triggered and we then look for a MarkInterfaceExtension part.

When it is a MarkInterfaceExtension part we set the various pixmaps of the breakpoint icons.

Definition at line 185 of file debugger.cpp.

References ActiveBreakpoint, KDevDebugger::activeBreakpointPixmap(), Bookmark, Breakpoint, DisabledBreakpoint, KDevDebugger::disabledBreakpointPixmap(), ExecutionPoint, KDevDebugger::executionPointPixmap(), KDevDebugger::inactiveBreakpointPixmap(), marksChanged(), ReachedBreakpoint, KDevDebugger::reachedBreakpointPixmap(), KTextEditor::MarkInterfaceExtension::setDescription(), KTextEditor::MarkInterfaceExtension::setMarksUserChangable(), and KTextEditor::MarkInterfaceExtension::setPixmap().

Referenced by Debugger().

void Debugger::setBreakpoint const QString fileName,
int  lineNum,
int  id,
bool  enabled,
bool  pending
[virtual]
 

Controls the breakpoint icon being displayed in the editor through the markinterface.

Parameters:
fileName The breakpoint is added or removed from this file
lineNum ... at this line number
id This is an internal id. which has a special number that prevents us changing the mark icon. (why?)
enabled The breakpoint could be enabled, disabled
pending pending or active. Each state has a different icon.

Implements KDevDebugger.

Definition at line 36 of file debugger.cpp.

References ActiveBreakpoint, KTextEditor::MarkInterface::addMark(), BPList, Breakpoint, DisabledBreakpoint, PartController::getInstance(), marksChanged(), PartController::partForURL(), ReachedBreakpoint, and KTextEditor::MarkInterface::removeMark().


Member Data Documentation

QValueList<BPItem> Debugger::BPList [private]
 

Definition at line 130 of file debugger.h.

Referenced by setBreakpoint().

Debugger * Debugger::s_instance = 0 [static, private]
 

Definition at line 14 of file debugger.cpp.

Referenced by getInstance().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Feb 22 09:39:37 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003