OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "SkDebuggerGUI.h" | 8 #include "SkDebuggerGUI.h" |
9 #include "SkForceLinking.h" | 9 #include "SkForceLinking.h" |
10 #include "SkGraphics.h" | 10 #include "SkGraphics.h" |
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
682 | 682 |
683 void SkDebuggerGUI::registerListClick(QListWidgetItem *item) { | 683 void SkDebuggerGUI::registerListClick(QListWidgetItem *item) { |
684 if(!fLoading) { | 684 if(!fLoading) { |
685 int currentRow = fListWidget.currentRow(); | 685 int currentRow = fListWidget.currentRow(); |
686 | 686 |
687 if (currentRow != -1) { | 687 if (currentRow != -1) { |
688 if (!fPause) { | 688 if (!fPause) { |
689 fCanvasWidget.drawTo(currentRow); | 689 fCanvasWidget.drawTo(currentRow); |
690 fImageWidget.draw(); | 690 fImageWidget.draw(); |
691 } | 691 } |
692 const SkTDArray<SkString*> *currInfo = fDebugger.getCommandInfo(curr
entRow); | 692 SkTDArray<SkString*> *currInfo = fDebugger.getCommandInfo( |
| 693 currentRow); |
693 | 694 |
694 /* TODO(chudy): Add command type before parameters. Rename v | 695 /* TODO(chudy): Add command type before parameters. Rename v |
695 * to something more informative. */ | 696 * to something more informative. */ |
696 if (currInfo) { | 697 if (currInfo) { |
697 QString info; | 698 QString info; |
698 info.append("<b>Parameters: </b><br/>"); | 699 info.append("<b>Parameters: </b><br/>"); |
699 for (int i = 0; i < currInfo->count(); i++) { | 700 for (int i = 0; i < currInfo->count(); i++) { |
700 | 701 |
701 info.append(QString((*currInfo)[i]->c_str())); | 702 info.append(QString((*currInfo)[i]->c_str())); |
702 info.append("<br/>"); | 703 info.append("<br/>"); |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1107 } | 1108 } |
1108 | 1109 |
1109 // NOTE(chudy): Makes first item unselectable. | 1110 // NOTE(chudy): Makes first item unselectable. |
1110 QStandardItemModel* model = qobject_cast<QStandardItemModel*>( | 1111 QStandardItemModel* model = qobject_cast<QStandardItemModel*>( |
1111 fFilter.model()); | 1112 fFilter.model()); |
1112 QModelIndex firstIndex = model->index(0, fFilter.modelColumn(), | 1113 QModelIndex firstIndex = model->index(0, fFilter.modelColumn(), |
1113 fFilter.rootModelIndex()); | 1114 fFilter.rootModelIndex()); |
1114 QStandardItem* firstItem = model->itemFromIndex(firstIndex); | 1115 QStandardItem* firstItem = model->itemFromIndex(firstIndex); |
1115 firstItem->setSelectable(false); | 1116 firstItem->setSelectable(false); |
1116 } | 1117 } |
OLD | NEW |