languages/cpp/debugger/framestackwidget.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
#ifndef _FRAMESTACKWIDGET_H_
00017
#define _FRAMESTACKWIDGET_H_
00018
00019
#include <qlistview.h>
00020
#include <qstringlist.h>
00021
00022
namespace GDBDebugger
00023 {
00024
00025
class FramestackWidget;
00026
00027
00028 class ThreadStackItem :
public QListViewItem
00029 {
00030
public:
00031
ThreadStackItem(
FramestackWidget *parent,
const QString &threadDesc);
00032
virtual ~ThreadStackItem();
00033
00034
void setOpen(
bool open);
00035
QListViewItem *
lastChild()
const;
00036
00037 int threadNo()
00038 {
return threadNo_; }
00039
00040
private:
00041 int threadNo_;
00042 };
00043
00044
00045
00046
00047
00048 class FrameStackItem :
public QListViewItem
00049 {
00050
public:
00051
FrameStackItem(
FramestackWidget *parent,
const QString &frameDesc);
00052
FrameStackItem(
ThreadStackItem *parent,
const QString &frameDesc);
00053
virtual ~FrameStackItem();
00054
00055
void setOpen(
bool open);
00056
QListViewItem *
lastChild()
const;
00057
00058 int frameNo()
00059 {
return frameNo_; }
00060 int threadNo()
00061 {
return threadNo_; }
00062
private:
00063 int frameNo_;
00064 int threadNo_;
00065 };
00066
00067
00068
00069
00070
00074 class FramestackWidget :
public QListView
00075 {
00076 Q_OBJECT
00077
00078
public:
00079
FramestackWidget(
QWidget *parent=0,
const char *name=0, WFlags f=0 );
00080
virtual ~FramestackWidget();
00081
00082
QListViewItem *
lastChild()
const;
00083
void clear();
00084
00085
void parseGDBThreadList(
char *str);
00086
void parseGDBBacktraceList(
char *str);
00087
00088
ThreadStackItem *
findThread(
int threadNo);
00089
FrameStackItem *
findFrame(
int frameNo,
int threadNo);
00090
00091
QString getFrameName(
int frameNo,
int threadNo);
00092
00093 int viewedThread()
00094 {
return viewedThread_ ?
viewedThread_->
threadNo() : -1; }
00095
00096
public slots:
00097
void slotSelectFrame(
int frameNo,
int threadNo);
00098
void slotSelectionChanged(
QListViewItem *thisItem);
00099
00100 signals:
00101
void selectFrame(
int frameNo,
int threadNo,
bool needFrames);
00102
00103
#if QT_VERSION < 300
00104
private:
00105
QListViewItem* findItemWhichBeginsWith(
const QString& text)
const;
00106
#endif
00107
00108
private:
00109
00110 ThreadStackItem *
viewedThread_;
00111 };
00112
00113 }
00114
00115
#endif
This file is part of the documentation for KDevelop Version 3.0.4.