Added stubs for zoom info panel.
Review URL: https://codereview.appspot.com/6350071
git-svn-id: http://skia.googlecode.com/svn/trunk@4493 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/debugger/QT/SkCanvasWidget.cpp b/debugger/QT/SkCanvasWidget.cpp
index c38fdbb..fe8db94 100644
--- a/debugger/QT/SkCanvasWidget.cpp
+++ b/debugger/QT/SkCanvasWidget.cpp
@@ -31,7 +31,7 @@
fCanvas = new SkCanvas(fDevice);
fDebugCanvas = new SkDebugCanvas();
- fScaleFactor = 1;
+ fScaleFactor = 1.0;
fIndex = 0;
fPreviousPoint.set(0,0);
fTransform.set(0,0);
@@ -55,7 +55,7 @@
fDevice = new SkDevice(fBitmap);
fCanvas = new SkCanvas(fDevice);
- fDebugCanvas->drawTo(fCanvas, fIndex);
+ drawTo(fIndex);
this->update();
}
@@ -70,6 +70,7 @@
fCanvas->scale(fScaleFactor, fScaleFactor);
}
+ emit commandChanged(fIndex);
fDebugCanvas->drawTo(fCanvas, fIndex+1);
this->update();
this->fIndex = fIndex;
@@ -119,7 +120,7 @@
fPreviousPoint = eventPoint;
// TODO(chudy): Fix and remove +1 from drawTo calls.
- drawTo(fIndex+1);
+ drawTo(fIndex);
this->update();
}
@@ -129,8 +130,9 @@
void SkCanvasWidget::mouseDoubleClickEvent(QMouseEvent* event) {
fTransform.set(0,0);
- fScaleFactor = 0;
- drawTo(fIndex+1);
+ fScaleFactor = 1.0;
+ emit scaleFactorChanged(fScaleFactor);
+ drawTo(fIndex);
this->update();
}
@@ -160,7 +162,9 @@
fScaleFactor += (event->delta()/120) * 2;
}
+ emit scaleFactorChanged(fScaleFactor);
+
// TODO(chudy): Fix and remove +1 from drawTo calls.
- drawTo(fIndex+1);
+ drawTo(fIndex);
this->update();
}