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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
83 connect(&fActionStepForward, SIGNAL(triggered()), this, SLOT(actionStepForwa rd())); | 83 connect(&fActionStepForward, SIGNAL(triggered()), this, SLOT(actionStepForwa rd())); |
84 connect(&fActionBreakpoint, SIGNAL(triggered()), this, SLOT(actionBreakpoint s())); | 84 connect(&fActionBreakpoint, SIGNAL(triggered()), this, SLOT(actionBreakpoint s())); |
85 connect(&fActionInspector, SIGNAL(triggered()), this, SLOT(actionInspector() )); | 85 connect(&fActionInspector, SIGNAL(triggered()), this, SLOT(actionInspector() )); |
86 connect(&fActionSettings, SIGNAL(triggered()), this, SLOT(actionSettings())) ; | 86 connect(&fActionSettings, SIGNAL(triggered()), this, SLOT(actionSettings())) ; |
87 connect(&fFilter, SIGNAL(activated(QString)), this, SLOT(toggleFilter(QStrin g))); | 87 connect(&fFilter, SIGNAL(activated(QString)), this, SLOT(toggleFilter(QStrin g))); |
88 connect(&fActionProfile, SIGNAL(triggered()), this, SLOT(actionProfile())); | 88 connect(&fActionProfile, SIGNAL(triggered()), this, SLOT(actionProfile())); |
89 connect(&fActionCancel, SIGNAL(triggered()), this, SLOT(actionCancel())); | 89 connect(&fActionCancel, SIGNAL(triggered()), this, SLOT(actionCancel())); |
90 connect(&fActionClearBreakpoints, SIGNAL(triggered()), this, SLOT(actionClea rBreakpoints())); | 90 connect(&fActionClearBreakpoints, SIGNAL(triggered()), this, SLOT(actionClea rBreakpoints())); |
91 connect(&fActionClearDeletes, SIGNAL(triggered()), this, SLOT(actionClearDel etes())); | 91 connect(&fActionClearDeletes, SIGNAL(triggered()), this, SLOT(actionClearDel etes())); |
92 connect(&fActionClose, SIGNAL(triggered()), this, SLOT(actionClose())); | 92 connect(&fActionClose, SIGNAL(triggered()), this, SLOT(actionClose())); |
93 connect(fSettingsWidget.getVisibilityButton(), SIGNAL(toggled(bool)), this, SLOT(actionCommandFilter())); | 93 connect(&fSettingsWidget, SIGNAL(visibilityFilterChanged()), this, SLOT(acti onCommandFilter())); |
94 #if SK_SUPPORT_GPU | 94 #if SK_SUPPORT_GPU |
95 connect(&fSettingsWidget, SIGNAL(glSettingsChanged()), this, SLOT(actionGLWi dget())); | 95 connect(&fSettingsWidget, SIGNAL(glSettingsChanged()), this, SLOT(actionGLWi dget())); |
96 #endif | 96 #endif |
97 connect(&fSettingsWidget, SIGNAL(texFilterSettingsChanged()), this, SLOT(act ionTextureFilter())); | 97 connect(&fSettingsWidget, SIGNAL(texFilterSettingsChanged()), this, SLOT(act ionTextureFilter())); |
98 connect(fSettingsWidget.getRasterCheckBox(), SIGNAL(toggled(bool)), this, SL OT(actionRasterWidget(bool))); | 98 connect(fSettingsWidget.getRasterCheckBox(), SIGNAL(toggled(bool)), this, SL OT(actionRasterWidget(bool))); |
99 connect(fSettingsWidget.getOverdrawVizCheckBox(), SIGNAL(toggled(bool)), thi s, SLOT(actionOverdrawVizWidget(bool))); | 99 connect(fSettingsWidget.getOverdrawVizCheckBox(), SIGNAL(toggled(bool)), thi s, SLOT(actionOverdrawVizWidget(bool))); |
100 connect(&fActionPause, SIGNAL(toggled(bool)), this, SLOT(pauseDrawing(bool)) ); | 100 connect(&fActionPause, SIGNAL(toggled(bool)), this, SLOT(pauseDrawing(bool)) ); |
101 connect(&fActionCreateBreakpoint, SIGNAL(activated()), this, SLOT(toggleBrea kpoint())); | 101 connect(&fActionCreateBreakpoint, SIGNAL(activated()), this, SLOT(toggleBrea kpoint())); |
102 connect(&fActionShowDeletes, SIGNAL(triggered()), this, SLOT(showDeletes())) ; | 102 connect(&fActionShowDeletes, SIGNAL(triggered()), this, SLOT(showDeletes())) ; |
103 connect(&fCanvasWidget, SIGNAL(hitChanged(int)), this, SLOT(selectCommand(in t))); | 103 connect(&fCanvasWidget, SIGNAL(hitChanged(int)), this, SLOT(selectCommand(in t))); |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
432 } | 432 } |
433 if (fPause) { | 433 if (fPause) { |
434 fCanvasWidget.drawTo(fPausedRow); | 434 fCanvasWidget.drawTo(fPausedRow); |
435 fImageWidget.draw(); | 435 fImageWidget.draw(); |
436 } else { | 436 } else { |
437 fCanvasWidget.drawTo(fListWidget.currentRow()); | 437 fCanvasWidget.drawTo(fListWidget.currentRow()); |
438 fImageWidget.draw(); | 438 fImageWidget.draw(); |
439 } | 439 } |
440 } | 440 } |
441 | 441 |
442 void SkDebuggerGUI::actionCommandFilter() { | 442 void SkDebuggerGUI::actionCommandFilter() { |
robertphillips
2013/11/21 12:52:47
1 line now?
| |
443 fDebugger.highlightCurrentCommand( | 443 fDebugger.highlightCurrentCommand( |
444 fSettingsWidget.getVisibilityButton()->isChecked()); | 444 fSettingsWidget.getVisibilityFilter()); |
445 fCanvasWidget.drawTo(fListWidget.currentRow()); | 445 fCanvasWidget.drawTo(fListWidget.currentRow()); |
446 fImageWidget.draw(); | 446 fImageWidget.draw(); |
447 } | 447 } |
448 | 448 |
449 void SkDebuggerGUI::actionClose() { | 449 void SkDebuggerGUI::actionClose() { |
450 this->close(); | 450 this->close(); |
451 } | 451 } |
452 | 452 |
453 void SkDebuggerGUI::actionDelete() { | 453 void SkDebuggerGUI::actionDelete() { |
454 | 454 |
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
962 // Will this automatically clear out due to nature of refcnt? | 962 // Will this automatically clear out due to nature of refcnt? |
963 SkTArray<SkString>* commands = fDebugger.getDrawCommandsAsStrings(); | 963 SkTArray<SkString>* commands = fDebugger.getDrawCommandsAsStrings(); |
964 | 964 |
965 fActionProfile.setDisabled(false); | 965 fActionProfile.setDisabled(false); |
966 | 966 |
967 /* fDebugCanvas is reinitialized every load picture. Need it to retain value | 967 /* fDebugCanvas is reinitialized every load picture. Need it to retain value |
968 * of the visibility filter. | 968 * of the visibility filter. |
969 * TODO(chudy): This should be deprecated since fDebugger is not | 969 * TODO(chudy): This should be deprecated since fDebugger is not |
970 * recreated. | 970 * recreated. |
971 * */ | 971 * */ |
972 fDebugger.highlightCurrentCommand(fSettingsWidget.getVisibilityButton()->isC hecked()); | 972 fDebugger.highlightCurrentCommand(fSettingsWidget.getVisibilityFilter()); |
973 | 973 |
974 setupListWidget(commands); | 974 setupListWidget(commands); |
975 setupComboBox(commands); | 975 setupComboBox(commands); |
976 setupOverviewText(NULL, 0.0, 1); | 976 setupOverviewText(NULL, 0.0, 1); |
977 fInspectorWidget.setDisabled(false); | 977 fInspectorWidget.setDisabled(false); |
978 fSettingsWidget.setDisabled(false); | 978 fSettingsWidget.setDisabled(false); |
979 fMenuEdit.setDisabled(false); | 979 fMenuEdit.setDisabled(false); |
980 fMenuNavigate.setDisabled(false); | 980 fMenuNavigate.setDisabled(false); |
981 fMenuView.setDisabled(false); | 981 fMenuView.setDisabled(false); |
982 fActionSave.setDisabled(false); | 982 fActionSave.setDisabled(false); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1036 } | 1036 } |
1037 | 1037 |
1038 // NOTE(chudy): Makes first item unselectable. | 1038 // NOTE(chudy): Makes first item unselectable. |
1039 QStandardItemModel* model = qobject_cast<QStandardItemModel*>( | 1039 QStandardItemModel* model = qobject_cast<QStandardItemModel*>( |
1040 fFilter.model()); | 1040 fFilter.model()); |
1041 QModelIndex firstIndex = model->index(0, fFilter.modelColumn(), | 1041 QModelIndex firstIndex = model->index(0, fFilter.modelColumn(), |
1042 fFilter.rootModelIndex()); | 1042 fFilter.rootModelIndex()); |
1043 QStandardItem* firstItem = model->itemFromIndex(firstIndex); | 1043 QStandardItem* firstItem = model->itemFromIndex(firstIndex); |
1044 firstItem->setSelectable(false); | 1044 firstItem->setSelectable(false); |
1045 } | 1045 } |
OLD | NEW |