Debugger improvements

This CL:
  improves the 'SaveAs' functionality
  allows switching between # and offset indexing in the command list
  minor nit cleanup

R=bsalomon@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/211383003

git-svn-id: http://skia.googlecode.com/svn/trunk@13950 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/debugger/QT/SkListWidget.h b/debugger/QT/SkListWidget.h
index 12a2120..d6e797a 100644
--- a/debugger/QT/SkListWidget.h
+++ b/debugger/QT/SkListWidget.h
@@ -19,25 +19,38 @@
  */
 class SkListWidget : public QAbstractItemDelegate {
 public:
+    enum IndexStyle {
+        kIndex_IndexStyle,
+        kOffset_IndexStyle,
+    };
+
     /**
         Constructs the list widget with the specified parent for layout purposes.
         @param parent  The parent container of this widget
      */
-    SkListWidget(QObject* parent = NULL);
+    SkListWidget(QObject* parent = NULL) : fIndexStyle(kIndex_IndexStyle) {}
 
-    ~SkListWidget();
+    virtual ~SkListWidget() {}
 
     /**
         Draws the current state of the widget. Overriden from QWidget.
      */
-    void paint (QPainter* painter, const QStyleOptionViewItem& option,
-            const QModelIndex& index ) const;
+    void paint(QPainter* painter, const QStyleOptionViewItem& option,
+               const QModelIndex& index ) const;
 
     /**
         Returns the default size of the widget. Overriden from QWidget.
      */
-    QSize sizeHint (const QStyleOptionViewItem& option,
-            const QModelIndex& index) const;
+    QSize sizeHint(const QStyleOptionViewItem& option,
+                   const QModelIndex& index) const;
+
+
+    void setIndexStyle(IndexStyle indexStyle) {
+        fIndexStyle = indexStyle;
+    }
+
+protected:
+    IndexStyle fIndexStyle;
 };
 
 #endif