Refine "View Code" command.
[kdbg.git] / kdbg / memwindow.h
blobaf2326595a87f739728a0c20c91d114ae74c2cda
1 /*
2 * Copyright Johannes Sixt
3 * This file is licensed under the GNU General Public License Version 2.
4 * See the file COPYING in the toplevel directory of the source directory.
5 */
7 #ifndef MEMWINDOW_H
8 #define MEMWINDOW_H
10 #include <qpopupmenu.h>
11 #include <qlistview.h>
12 #include <qcombobox.h>
13 #include <qlayout.h>
14 #include <qmap.h>
15 #include "dbgdriver.h"
17 class KDebugger;
18 class KConfigBase;
20 class MemoryWindow : public QWidget
22 Q_OBJECT
23 public:
24 MemoryWindow(QWidget* parent, const char* name);
25 ~MemoryWindow();
27 void setDebugger(KDebugger* deb) { m_debugger = deb; }
29 protected:
30 KDebugger* m_debugger;
31 QComboBox m_expression;
33 QListView m_memory;
34 QMap<QString,QString> m_old_memory;
36 QVBoxLayout m_layout;
38 unsigned m_format;
39 QMap<QString,unsigned> m_formatCache;
41 QPopupMenu m_popup;
43 virtual bool eventFilter(QObject* o, QEvent* ev);
44 void handlePopup(QMouseEvent* ev);
45 void displayNewExpression(const QString& expr);
47 public slots:
48 void slotNewExpression(const QString&);
49 void slotTypeChange(int id);
50 void slotNewMemoryDump(const QString&, const std::list<MemoryDump>&);
51 void saveProgramSpecific(KConfigBase* config);
52 void restoreProgramSpecific(KConfigBase* config);
55 #endif // MEMWINDOW_H