| 1 |
#ifndef DEBUGTABLEWIDGET_H |
| 2 |
#define DEBUGTABLEWIDGET_H |
| 3 |
|
| 4 |
#include <QTableWidget> |
| 5 |
#include <QDesktopWidget> |
| 6 |
#include <QHeaderView> |
| 7 |
#include <QMouseEvent> |
| 8 |
#include <QAction> |
| 9 |
#include <QMenu> |
| 10 |
#include <QByteArray> |
| 11 |
#include "debugger.h" |
| 12 |
#include "watchsettingswidget.h" |
| 13 |
#include "ruqplaintextedit.h" |
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
enum DebugTableWidgetType {registersTable, memoryTable}; |
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
class DebugTableWidget : public QTableWidget |
| 31 |
{ |
| 32 |
Q_OBJECT |
| 33 |
|
| 34 |
public: |
| 35 |
explicit DebugTableWidget(int rows, int columns, DebugTableWidgetType widgetType, QWidget *parent = 0); |
| 36 |
~DebugTableWidget(); |
| 37 |
bool isEmpty(); |
| 38 |
void initializeMemoryWindow(const QList<RuQPlainTextEdit::Watch> &watches); |
| 39 |
static QByteArray memoryHeaderState; |
| 40 |
static QByteArray registerWindowState; |
| 41 |
static bool geometryMemorySaved; |
| 42 |
static bool geometryRegistersSaved; |
| 43 |
|
| 44 |
protected: |
| 45 |
void closeEvent(QCloseEvent *); |
| 46 |
void mousePressEvent(QMouseEvent *event); |
| 47 |
void keyPressEvent(QKeyEvent *event); |
| 48 |
|
| 49 |
signals: |
| 50 |
void closeSignal(); |
| 51 |
void debugShowMemory(); |
| 52 |
|
| 53 |
public slots: |
| 54 |
void deleteVariable(); |
| 55 |
void addVariable(const QString &variableName, int rowNumber = -1); |
| 56 |
void addVariable(const RuQPlainTextEdit::Watch &variable, int rowNumber = -1); |
| 57 |
void changeVariableValue(const QString &value, int rowNumber, bool isValid); |
| 58 |
void addRegister(const QString &name, const QString &hexValue, const QString &decValue, int rowNumber); |
| 59 |
void changeMemoryWindow(int row, int column); |
| 60 |
void setValuesFromDebugger(QList<Debugger::memoryInfo> watches); |
| 61 |
void setValuesFromDebugger(QList<Debugger::registersInfo> registers); |
| 62 |
|
| 63 |
private: |
| 64 |
int contextMenuLineNumber; |
| 65 |
DebugTableWidgetType type; |
| 66 |
bool empty; |
| 67 |
bool firstTime; |
| 68 |
}; |
| 69 |
|
| 70 |
#endif |