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

« back to all changes in this revision

Viewing changes to languages/ruby/debugger/rdbbreakpointwidget.h

  • Committer: Bazaar Package Importer
  • Author(s): Jeremy Lainé
  • Date: 2010-05-05 07:21:55 UTC
  • mfrom: (1.2.3 upstream) (5.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100505072155-h78lx19pu04sbhtn
Tags: 4:4.0.0-2
* Upload to unstable (Closes: #579947, #481832).
* Acknowledge obsolete NMU fixes (Closes: #562410, #546961).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/***************************************************************************
2
 
    begin                : Tue May 13 2003
3
 
    copyright            : (C) 2003 by John Birch
4
 
    email                : jbb@kdevelop.org
5
 
        
6
 
                          Adapted for ruby debugging
7
 
                          --------------------------
8
 
    begin                : Mon Nov 1 2004
9
 
    copyright            : (C) 2004 by Richard Dale
10
 
    email                : Richard_Dale@tipitina.demon.co.uk
11
 
 ***************************************************************************/
12
 
 
13
 
/***************************************************************************
14
 
 *                                                                         *
15
 
 *   This program is free software; you can redistribute it and/or modify  *
16
 
 *   it under the terms of the GNU General Public License as published by  *
17
 
 *   the Free Software Foundation; either version 2 of the License, or     *
18
 
 *   (at your option) any later version.                                   *
19
 
 *                                                                         *
20
 
 ***************************************************************************/
21
 
 
22
 
#ifndef _RDBBreakpointWidget_H_
23
 
#define _RDBBreakpointWidget_H_
24
 
 
25
 
#include <qhbox.h>
26
 
#include <qpopupmenu.h>
27
 
 
28
 
class QDomElement;
29
 
class QToolButton;
30
 
class KURL;
31
 
 
32
 
/***************************************************************************/
33
 
/***************************************************************************/
34
 
/***************************************************************************/
35
 
 
36
 
namespace RDBDebugger
37
 
{
38
 
class Breakpoint;
39
 
class BreakpointTableRow;
40
 
class RDBTable;
41
 
 
42
 
class RDBBreakpointWidget : public QHBox
43
 
{
44
 
    Q_OBJECT
45
 
 
46
 
public:
47
 
    RDBBreakpointWidget( QWidget* parent=0, const char* name=0 );
48
 
    virtual ~RDBBreakpointWidget();
49
 
 
50
 
    void reset();
51
 
 
52
 
    void savePartialProjectSession(QDomElement* el);
53
 
    void restorePartialProjectSession(const QDomElement* el);
54
 
 
55
 
 
56
 
public slots:
57
 
    // Connected to from the editor widget:
58
 
    void slotToggleBreakpoint(const QString &filename, int lineNum);
59
 
    void slotToggleBreakpointEnabled(const QString &fileName, int lineNum);
60
 
 
61
 
    // Connected to from the variable widget:
62
 
    void slotToggleWatchpoint(const QString &varName);
63
 
 
64
 
    // Connected to from the dbgcontroller:
65
 
    void slotSetPendingBPs();
66
 
    void slotUnableToSetBPNow(int BPNo);
67
 
    void slotParseRDBBrkptList(char *str);
68
 
    void slotParseRDBBreakpointSet(char *str, int BPKey);
69
 
 
70
 
    void slotRefreshBP(const KURL &filename);
71
 
    
72
 
protected:
73
 
    enum BW_ITEMS { BW_ITEM_Show, BW_ITEM_Edit, BW_ITEM_Disable, BW_ITEM_Delete };
74
 
    virtual void focusInEvent(QFocusEvent *e);
75
 
 
76
 
private slots:
77
 
    void slotRemoveBreakpoint();
78
 
    void slotRemoveAllBreakpoints();
79
 
    void slotEditBreakpoint(const QString &fileName, int lineNum);
80
 
    void slotEditBreakpoint();
81
 
    void slotAddBreakpoint();
82
 
    void slotAddBlankBreakpoint(int idx);
83
 
    void slotRowDoubleClicked(int row, int col, int button, const QPoint & mousePos);
84
 
    void slotContextMenuShow( int row, int col, const QPoint &mousePos );
85
 
    void slotContextMenuSelect( int item );
86
 
    void slotEditRow(int row, int col, const QPoint & mousePos);
87
 
    void slotNewValue(int row, int col);
88
 
 
89
 
signals:
90
 
    void publishBPState(const Breakpoint& brkpt);
91
 
    void refreshBPState(const Breakpoint& brkpt);
92
 
    void gotoSourcePosition(const QString &fileName, int lineNum);
93
 
    void clearAllBreakpoints();
94
 
 
95
 
private:
96
 
    BreakpointTableRow* find(Breakpoint *bp);
97
 
    BreakpointTableRow* findId(int id);
98
 
    BreakpointTableRow* findKey(int BPKey);
99
 
 
100
 
    void setActive();
101
 
    BreakpointTableRow* addBreakpoint(Breakpoint *bp);
102
 
    void removeBreakpoint(BreakpointTableRow* btr);
103
 
 
104
 
private:
105
 
    RDBTable*       m_table;
106
 
 
107
 
    QToolButton*    m_add;
108
 
    QToolButton*    m_delete;
109
 
    QToolButton*    m_edit;
110
 
    QToolButton*    m_removeAll;
111
 
    QPopupMenu*     m_ctxMenu;
112
 
};
113
 
 
114
 
/***************************************************************************/
115
 
/***************************************************************************/
116
 
/***************************************************************************/
117
 
 
118
 
}
119
 
 
120
 
#endif