KDevelop API Documentation

framestackwidget.h

Go to the documentation of this file.
00001 /***************************************************************************
00002     begin                : Sun Aug 8 1999
00003     copyright            : (C) 1999 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 _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
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