aboutsummaryrefslogtreecommitdiffhomepage
path: root/debugger
diff options
context:
space:
mode:
authorGravatar chudy@google.com <chudy@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-07-12 21:58:14 +0000
committerGravatar chudy@google.com <chudy@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-07-12 21:58:14 +0000
commit9ca9bfe9f6eaae41841446386e40be1013907e99 (patch)
tree14ce0da8956691940cba99dc3964fb13df00250c /debugger
parentb5e30abbebd792982b0b3cf8380ec503b41049e4 (diff)
Feature, HitBox selects current command
Review URL: https://codereview.appspot.com/6345091 git-svn-id: http://skia.googlecode.com/svn/trunk@4588 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'debugger')
-rw-r--r--debugger/QT/SkDebuggerGUI.cpp7
-rw-r--r--debugger/QT/SkDebuggerGUI.h5
-rw-r--r--debugger/QT/moc_SkDebuggerGUI.cpp22
3 files changed, 24 insertions, 10 deletions
diff --git a/debugger/QT/SkDebuggerGUI.cpp b/debugger/QT/SkDebuggerGUI.cpp
index 1cca0ba953..766dd6dd83 100644
--- a/debugger/QT/SkDebuggerGUI.cpp
+++ b/debugger/QT/SkDebuggerGUI.cpp
@@ -75,6 +75,7 @@ SkDebuggerGUI::SkDebuggerGUI(QWidget *parent) :
this, SLOT(pauseDrawing(bool)));
connect(&fCanvasWidget, SIGNAL(commandChanged(int)), &fSettingsWidget,
SLOT(updateCommand(int)));
+ connect(&fCanvasWidget, SIGNAL(hitChanged(int)), this, SLOT(selectCommand(int)));
connect(&fCanvasWidget, SIGNAL(hitChanged(int)), &fSettingsWidget,
SLOT(updateHit(int)));
}
@@ -255,6 +256,12 @@ void SkDebuggerGUI::registerListClick(QListWidgetItem *item) {
}
}
+void SkDebuggerGUI::selectCommand(int command) {
+ if (fPause) {
+ fListWidget.setCurrentRow(command);
+ }
+}
+
void SkDebuggerGUI::toggleBreakpoint() {
QListWidgetItem* item = fListWidget.currentItem();
if (item->checkState() == Qt::Unchecked) {
diff --git a/debugger/QT/SkDebuggerGUI.h b/debugger/QT/SkDebuggerGUI.h
index 11eb856fd4..465786e661 100644
--- a/debugger/QT/SkDebuggerGUI.h
+++ b/debugger/QT/SkDebuggerGUI.h
@@ -142,6 +142,11 @@ private slots:
void registerListClick(QListWidgetItem *item);
/**
+ Sets the command to active in the list widget.
+ */
+ void selectCommand(int command);
+
+ /**
Toggles a breakpoint on the current step in the list widget.
*/
void toggleBreakpoint();
diff --git a/debugger/QT/moc_SkDebuggerGUI.cpp b/debugger/QT/moc_SkDebuggerGUI.cpp
index 30a5639333..bf2370dc82 100644
--- a/debugger/QT/moc_SkDebuggerGUI.cpp
+++ b/debugger/QT/moc_SkDebuggerGUI.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'SkDebuggerGUI.h'
**
-** Created: Tue Jul 10 09:04:38 2012
+** Created: Wed Jul 11 17:21:44 2012
** by: The Qt Meta Object Compiler version 62 (Qt 4.6.2)
**
** WARNING! All changes made in this file will be lost!
@@ -23,7 +23,7 @@ static const uint qt_meta_data_SkDebuggerGUI[] = {
4, // revision
0, // classname
0, 0, // classinfo
- 21, 14, // methods
+ 22, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
@@ -51,9 +51,10 @@ static const uint qt_meta_data_SkDebuggerGUI[] = {
307, 14, 14, 14, 0x08,
327, 318, 14, 14, 0x08,
346, 275, 14, 14, 0x08,
- 382, 14, 14, 14, 0x08,
+ 382, 15, 14, 14, 0x08,
401, 14, 14, 14, 0x08,
- 426, 419, 14, 14, 0x08,
+ 420, 14, 14, 14, 0x08,
+ 445, 438, 14, 14, 0x08,
0 // eod
};
@@ -70,8 +71,8 @@ static const char qt_meta_stringdata_SkDebuggerGUI[] = {
"loadFile(QListWidgetItem*)\0openFile()\0"
"isPaused\0pauseDrawing(bool)\0"
"registerListClick(QListWidgetItem*)\0"
- "toggleBreakpoint()\0toggleDirectory()\0"
- "string\0toggleFilter(QString)\0"
+ "selectCommand(int)\0toggleBreakpoint()\0"
+ "toggleDirectory()\0string\0toggleFilter(QString)\0"
};
const QMetaObject SkDebuggerGUI::staticMetaObject = {
@@ -121,12 +122,13 @@ int SkDebuggerGUI::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
case 15: openFile(); break;
case 16: pauseDrawing((*reinterpret_cast< bool(*)>(_a[1]))); break;
case 17: registerListClick((*reinterpret_cast< QListWidgetItem*(*)>(_a[1]))); break;
- case 18: toggleBreakpoint(); break;
- case 19: toggleDirectory(); break;
- case 20: toggleFilter((*reinterpret_cast< QString(*)>(_a[1]))); break;
+ case 18: selectCommand((*reinterpret_cast< int(*)>(_a[1]))); break;
+ case 19: toggleBreakpoint(); break;
+ case 20: toggleDirectory(); break;
+ case 21: toggleFilter((*reinterpret_cast< QString(*)>(_a[1]))); break;
default: ;
}
- _id -= 21;
+ _id -= 22;
}
return _id;
}