Add drawing of paths to debugger

https://codereview.appspot.com/6850082/



git-svn-id: http://skia.googlecode.com/svn/trunk@6532 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/debugger/QT/SkDebuggerGUI.cpp b/debugger/QT/SkDebuggerGUI.cpp
index 710791a..448e449 100644
--- a/debugger/QT/SkDebuggerGUI.cpp
+++ b/debugger/QT/SkDebuggerGUI.cpp
@@ -45,6 +45,7 @@
     , fListWidget(&fCentralWidget)
     , fDirectoryWidget(&fCentralWidget)
     , fCanvasWidget(this, &fDebugger)
+    , fImageWidget(&fDebugger)
     , fMenuBar(this)
     , fMenuFile(this)
     , fMenuNavigate(this)
@@ -385,8 +386,10 @@
     }
     if (fPause) {
         fCanvasWidget.drawTo(fPausedRow);
+        fImageWidget.draw();
     } else {
         fCanvasWidget.drawTo(fListWidget.currentRow());
+        fImageWidget.draw();
     }
 }
 
@@ -394,6 +397,7 @@
     fDebugger.highlightCurrentCommand(
             fSettingsWidget.getVisibilityButton()->isChecked());
     fCanvasWidget.drawTo(fListWidget.currentRow());
+    fImageWidget.draw();
 }
 
 void SkDebuggerGUI::actionClose() {
@@ -414,8 +418,10 @@
 
     if (fPause) {
         fCanvasWidget.drawTo(fPausedRow);
+        fImageWidget.draw();
     } else {
         fCanvasWidget.drawTo(currentRow);
+        fImageWidget.draw();
     }
 }
 
@@ -426,8 +432,10 @@
 void SkDebuggerGUI::actionInspector() {
     if (fInspectorWidget.isHidden()) {
         fInspectorWidget.setHidden(false);
+        fImageWidget.setHidden(false);
     } else {
         fInspectorWidget.setHidden(true);
+        fImageWidget.setHidden(true);
     }
 }
 
@@ -531,6 +539,7 @@
     fPause = isPaused;
     fPausedRow = fListWidget.currentRow();
     fCanvasWidget.drawTo(fPausedRow);
+    fImageWidget.draw();
 }
 
 void SkDebuggerGUI::registerListClick(QListWidgetItem *item) {
@@ -540,6 +549,7 @@
         if (currentRow != -1) {
             if (!fPause) {
                 fCanvasWidget.drawTo(currentRow);
+                fImageWidget.draw();
             }
             SkTDArray<SkString*> *currInfo = fDebugger.getCommandInfo(
                     currentRow);
@@ -712,10 +722,17 @@
     fCanvasWidget.setSizePolicy(QSizePolicy::Expanding,
             QSizePolicy::Expanding);
 
+    fImageWidget.setFixedSize(SkImageWidget::kImageWidgetWidth, 
+                              SkImageWidget::kImageWidgetHeight);
+
     fInspectorWidget.setSizePolicy(QSizePolicy::Expanding,
             QSizePolicy::Expanding);
     fInspectorWidget.setMaximumHeight(300);
 
+    fSettingsAndImageLayout.setSpacing(6);
+    fSettingsAndImageLayout.addWidget(&fSettingsWidget);
+    fSettingsAndImageLayout.addWidget(&fImageWidget);
+
     fSettingsWidget.setSizePolicy(QSizePolicy::Expanding,
             QSizePolicy::Expanding);
     fSettingsWidget.setMaximumWidth(250);
@@ -724,12 +741,13 @@
     fLeftColumnLayout.addWidget(&fListWidget);
     fLeftColumnLayout.addWidget(&fDirectoryWidget);
 
-    fCanvasAndSettingsLayout.setSpacing(6);
-    fCanvasAndSettingsLayout.addWidget(&fCanvasWidget);
-    fCanvasAndSettingsLayout.addWidget(&fSettingsWidget);
+    fCanvasSettingsAndImageLayout.setSpacing(6);
+    fCanvasSettingsAndImageLayout.addWidget(&fCanvasWidget);
+    fCanvasSettingsAndImageLayout.addLayout(&fSettingsAndImageLayout);
+
 
     fMainAndRightColumnLayout.setSpacing(6);
-    fMainAndRightColumnLayout.addLayout(&fCanvasAndSettingsLayout);
+    fMainAndRightColumnLayout.addLayout(&fCanvasSettingsAndImageLayout);
     fMainAndRightColumnLayout.addWidget(&fInspectorWidget);
 
     fCentralWidget.setLayout(&fContainerLayout);