File: brkpt.h

package info (click to toggle)
kdbg 1.2.4-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 2,504 kB
  • ctags: 1,945
  • sloc: cpp: 15,961; sh: 8,183; makefile: 481; perl: 71; ansic: 16
file content (79 lines) | stat: -rw-r--r-- 2,187 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
// $Id: brkpt.h,v 1.16 2000/08/18 19:22:48 jsixt Exp $

// Copyright by Johannes Sixt
// This file is under GPL, the GNU General Public Licence

// the list of breakpoints

#ifndef BRKPT_H
#define BRKPT_H

#include <qlistview.h>
#include <qlayout.h>
#include <qpushbutton.h>
#include <qlineedit.h>
#include "valarray.h"

class KDebugger;
class BreakpointItem;


class BreakpointTable : public QWidget
{
    Q_OBJECT
public:
    BreakpointTable(QWidget* parent, const char* name);
    ~BreakpointTable();
    void setDebugger(KDebugger* deb) { m_debugger = deb; }

protected:
    KDebugger* m_debugger;
    QLineEdit m_bpEdit;
    QListView m_list;
    QPushButton m_btAddBP;
    QPushButton m_btAddWP;
    QPushButton m_btRemove;
    QPushButton m_btEnaDis;
    QPushButton m_btViewCode;
    QPushButton m_btConditional;
    QHBoxLayout m_layout;
    QVBoxLayout m_listandedit;
    QVBoxLayout m_buttons;
    ValArray<QPixmap> m_icons;

    void insertBreakpoint(int num, bool temp, bool enabled, QString location,
			  QString fileName = 0, int lineNo = -1,
			  int hits = 0, uint ignoreCount = 0,
			  QString condition = QString());
    BreakpointItem* itemByBreakId(int id);
    void initListAndIcons();
    void updateBreakpointCondition(int id, const QString& condition,
				   int ignoreCount);
    virtual bool eventFilter(QObject* ob, QEvent* ev);

    friend class BreakpointItem;
    
signals:
    /**
     * This signal is emitted when the user wants to go to the source code
     * where the current breakpoint is in.
     * 
     * @param file specifies the file; this is not necessarily a full path
     * name, and if it is relative, you won't know relative to what, you
     * can only guess.
     * @param lineNo specifies the line number (0-based!).
     * @param address specifies the exact address of the breakpoint.
     */
    void activateFileLine(const QString& file, int lineNo, const DbgAddr& address);
public slots:
    virtual void addBP();
    virtual void addWP();
    virtual void removeBP();
    virtual void enadisBP();
    virtual void viewBP();
    virtual void conditionalBP();
    void updateUI();
    void updateBreakList();
};

#endif // BRKPT_H