~ubuntu-branches/debian/sid/kdevelop/sid

« back to all changes in this revision

Viewing changes to languages/lib/debugger/kdevdebugger.h

  • Committer: Bazaar Package Importer
  • Author(s): Jeremy Lainé
  • Date: 2006-05-23 18:39:42 UTC
  • Revision ID: james.westby@ubuntu.com-20060523183942-hucifbvh68k2bwz7
Tags: upstream-3.3.2
Import upstream version 3.3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* This file is part of the KDE project
 
2
   Copyright (C) 2002 Matthias Hoelzer-Kluepfel <hoelzer@kde.org>
 
3
   Copyright (C) 2002 John Firebaugh <jfirebaugh@kde.org>
 
4
 
 
5
   This library is free software; you can redistribute it and/or
 
6
   modify it under the terms of the GNU Library General Public
 
7
   License as published by the Free Software Foundation; either
 
8
   version 2 of the License, or (at your option) any later version.
 
9
 
 
10
   This library is distributed in the hope that it will be useful,
 
11
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
13
   Library General Public License for more details.
 
14
 
 
15
   You should have received a copy of the GNU Library General Public License
 
16
   along with this library; see the file COPYING.LIB.  If not, write to
 
17
   the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 
18
   Boston, MA 02111-1307, USA.
 
19
*/
 
20
#ifndef _KDEVDEBUGGER_H_
 
21
#define _KDEVDEBUGGER_H_
 
22
 
 
23
 
 
24
#include <qobject.h>
 
25
#include <qpixmap.h>
 
26
 
 
27
 
 
28
#include <kurl.h>
 
29
 
 
30
/**
 
31
* Base class to handle signals from the editor that relate to breakpoints 
 
32
* and the execution point of the debugger.
 
33
*/
 
34
class KDevDebugger : public QObject
 
35
{
 
36
  Q_OBJECT
 
37
    
 
38
public:
 
39
    
 
40
  KDevDebugger(QObject *parent=0, const char *name=0);
 
41
  ~KDevDebugger();
 
42
 
 
43
  /**
 
44
   * Sets a breakpoint in the editor document belong to fileName.
 
45
   * If id==-1, the breakpoint is deleted.
 
46
   */
 
47
  virtual void setBreakpoint(const QString &fileName, int lineNum,
 
48
                             int id, bool enabled, bool pending) = 0;
 
49
   
 
50
  /**
 
51
   * Goes to a given location in a source file and marks the line.
 
52
   * This is used by the debugger to mark the location where the
 
53
   * the debugger has stopped.
 
54
   */
 
55
  virtual void gotoExecutionPoint(const KURL &url, int lineNum=0) = 0;
 
56
 
 
57
  /**
 
58
   * Clear the execution point. Usefull if debugging has ended.
 
59
   */
 
60
  virtual void clearExecutionPoint() = 0;
 
61
 
 
62
  static const QPixmap* inactiveBreakpointPixmap();
 
63
  static const QPixmap* activeBreakpointPixmap();
 
64
  static const QPixmap* reachedBreakpointPixmap();
 
65
  static const QPixmap* disabledBreakpointPixmap();
 
66
  static const QPixmap* executionPointPixmap();
 
67
  
 
68
signals:
 
69
 
 
70
  /**
 
71
   * The user has toggled a breakpoint.
 
72
   */
 
73
  void toggledBreakpoint(const QString &fileName, int lineNum);
 
74
 
 
75
  /*
 
76
   * The user wants to edit the properties of a breakpoint.
 
77
   */
 
78
  void editedBreakpoint(const QString &fileName, int lineNum);
 
79
  
 
80
  /**
 
81
   * The user wants to enable/disable a breakpoint.
 
82
   */
 
83
  void toggledBreakpointEnabled(const QString &fileName, int lineNum);
 
84
    
 
85
};
 
86
 
 
87
 
 
88
#endif