KDevelop API Documentation

gdbbreakpointwidget.h

Go to the documentation of this file.
00001 /***************************************************************************
00002     begin                : Tue May 13 2003
00003     copyright            : (C) 2003 by John Birch
00004     email                : jbb@kdevelop.org
00005  ***************************************************************************/
00006 
00007 /***************************************************************************
00008  *                                                                         *
00009  *   This program is free software; you can redistribute it and/or modify  *
00010  *   it under the terms of the GNU General Public License as published by  *
00011  *   the Free Software Foundation; either version 2 of the License, or     *
00012  *   (at your option) any later version.                                   *
00013  *                                                                         *
00014  ***************************************************************************/
00015 
00016 #ifndef _GDBBreakpointWidget_H_
00017 #define _GDBBreakpointWidget_H_
00018 
00019 #include <qhbox.h>
00020 
00021 class QDomElement;
00022 class QToolButton;
00023 class KURL;
00024 
00025 /***************************************************************************/
00026 /***************************************************************************/
00027 /***************************************************************************/
00028 
00029 namespace GDBDebugger
00030 {
00031 class Breakpoint;
00032 class BreakpointTableRow;
00033 class GDBTable;
00034 
00035 class GDBBreakpointWidget : public QHBox
00036 {
00037     Q_OBJECT
00038 
00039 public:
00040     GDBBreakpointWidget( QWidget* parent=0, const char* name=0 );
00041     virtual ~GDBBreakpointWidget();
00042 
00043     void reset();
00044 
00045     void savePartialProjectSession(QDomElement* el);
00046     void restorePartialProjectSession(const QDomElement* el);
00047 
00048 
00049 public slots:
00050     // Connected to from the editor widget:
00051     void slotToggleBreakpoint(const QString &filename, int lineNum);
00052     void slotToggleBreakpointEnabled(const QString &fileName, int lineNum);
00053 
00054     // Connected to from the variable widget:
00055     void slotToggleWatchpoint(const QString &varName);
00056 
00057     // Connected to from the dbgcontroller:
00058     void slotSetPendingBPs();
00059     void slotUnableToSetBPNow(int BPNo);
00060     void slotParseGDBBrkptList(char *str);
00061     void slotParseGDBBreakpointSet(char *str, int BPKey);
00062 
00063     void slotRefreshBP(const KURL &filename);
00064     
00065 protected:
00066     virtual void focusInEvent(QFocusEvent *e);
00067 
00068 private slots:
00069     void slotRemoveBreakpoint();
00070     void slotRemoveAllBreakpoints();
00071     void slotEditBreakpoint(const QString &fileName, int lineNum);
00072     void slotEditBreakpoint();
00073     void slotAddBreakpoint();
00074     void slotAddBlankBreakpoint(int idx);
00075     void slotRowSelected(int row, int col, int button, const QPoint & mousePos);
00076     void slotEditRow(int row, int col, const QPoint & mousePos);
00077     void slotNewValue(int row, int col);
00078 
00079 signals:
00080     void publishBPState(const Breakpoint& brkpt);
00081     void refreshBPState(const Breakpoint& brkpt);
00082     void gotoSourcePosition(const QString &fileName, int lineNum);
00083     void clearAllBreakpoints();
00084 
00085 private:
00086     BreakpointTableRow* find(Breakpoint *bp);
00087     BreakpointTableRow* findId(int id);
00088     BreakpointTableRow* findKey(int BPKey);
00089 
00090     void setActive();
00091     BreakpointTableRow* addBreakpoint(Breakpoint *bp);
00092     void removeBreakpoint(BreakpointTableRow* btr);
00093 
00094 private:
00095     GDBTable*       m_table;
00096 
00097     QToolButton*    m_add;
00098     QToolButton*    m_delete;
00099     QToolButton*    m_edit;
00100     QToolButton*    m_removeAll;
00101 };
00102 
00103 /***************************************************************************/
00104 /***************************************************************************/
00105 /***************************************************************************/
00106 
00107 }
00108 
00109 #endif
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Mar 23 00:03:46 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003