Converted the array of breakpoints to a QPtrVector.
[kdbg.git] / kdbg / brkpt.h
blobe4dfef9b25b946ad899db593f23e5c7d35c36f43
1 // $Id$
3 // Copyright by Johannes Sixt
4 // This file is under GPL, the GNU General Public Licence
6 // the list of breakpoints
8 #ifndef BRKPT_H
9 #define BRKPT_H
11 #include <qlistview.h>
12 #include <qlayout.h>
13 #include <qpushbutton.h>
14 #include <qlineedit.h>
15 #include "valarray.h"
17 class KDebugger;
18 class BreakpointItem;
21 class BreakpointTable : public QWidget
23 Q_OBJECT
24 public:
25 BreakpointTable(QWidget* parent, const char* name);
26 ~BreakpointTable();
27 void setDebugger(KDebugger* deb) { m_debugger = deb; }
29 protected:
30 KDebugger* m_debugger;
31 QLineEdit m_bpEdit;
32 QListView m_list;
33 QPushButton m_btAddBP;
34 QPushButton m_btAddWP;
35 QPushButton m_btRemove;
36 QPushButton m_btEnaDis;
37 QPushButton m_btViewCode;
38 QPushButton m_btConditional;
39 QHBoxLayout m_layout;
40 QVBoxLayout m_listandedit;
41 QVBoxLayout m_buttons;
42 ValArray<QPixmap> m_icons;
44 void insertBreakpoint(int num, bool temp, bool enabled, QString location,
45 QString fileName = 0, int lineNo = -1,
46 int hits = 0, uint ignoreCount = 0,
47 QString condition = QString());
48 BreakpointItem* itemByBreakId(int id);
49 void initListAndIcons();
50 void updateBreakpointCondition(int id, const QString& condition,
51 int ignoreCount);
52 virtual bool eventFilter(QObject* ob, QEvent* ev);
54 friend class BreakpointItem;
56 signals:
57 /**
58 * This signal is emitted when the user wants to go to the source code
59 * where the current breakpoint is in.
61 * @param file specifies the file; this is not necessarily a full path
62 * name, and if it is relative, you won't know relative to what, you
63 * can only guess.
64 * @param lineNo specifies the line number (0-based!).
65 * @param address specifies the exact address of the breakpoint.
67 void activateFileLine(const QString& file, int lineNo, const DbgAddr& address);
68 public slots:
69 virtual void addBP();
70 virtual void addWP();
71 virtual void removeBP();
72 virtual void enadisBP();
73 virtual void viewBP();
74 virtual void conditionalBP();
75 void updateUI();
76 void updateBreakList();
79 #endif // BRKPT_H