Extend copyright to 2018.
[kdbg.git] / kdbg / memwindow.h
blob8beaf64cc1b8026a9be5341c63a97ee7188a73d5
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 <QBoxLayout>
11 #include <QComboBox>
12 #include <QMap>
13 #include <QMenu>
14 #include <QTreeWidget>
15 #include "dbgdriver.h"
17 class KDebugger;
18 class KConfigBase;
20 class MemoryWindow : public QWidget
22 Q_OBJECT
23 public:
24 MemoryWindow(QWidget* parent);
25 ~MemoryWindow();
27 void setDebugger(KDebugger* deb) { m_debugger = deb; }
29 protected:
30 KDebugger* m_debugger;
31 QComboBox m_expression;
33 QTreeWidget m_memory;
34 QList<int> m_memoryColumnsWidth;
35 int m_memoryRowHeight = 0;
37 QBoxLayout m_layout;
39 bool m_dumpMemRegionEnd = false;
40 DbgAddr m_dumpLastAddr;
41 unsigned m_dumpLength = 0;
42 unsigned m_format;
43 QMap<QString,unsigned> m_formatCache;
45 QMenu m_popup;
47 virtual void contextMenuEvent(QContextMenuEvent* ev);
48 void displayNewExpression(const QString& expr);
49 void requestMemoryDump(const QString &expr);
50 QString parseMemoryDumpLineToAscii(const QString& line, bool littleendian);
52 public slots:
53 void verticalScrollBarMoved(int);
54 void verticalScrollBarRangeChanged(int, int);
55 void slotNewExpression(const QString&);
56 void slotNewExpression();
57 void slotTypeChange(QAction*);
58 void slotNewMemoryDump(const QString&, const std::list<MemoryDump>&);
59 void saveProgramSpecific(KConfigBase* config);
60 void restoreProgramSpecific(KConfigBase* config);
63 #endif // MEMWINDOW_H