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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 connect(&fActionBreakpoint, SIGNAL(triggered()), this, SLOT(actionBreakpoint
s())); | 87 connect(&fActionBreakpoint, SIGNAL(triggered()), this, SLOT(actionBreakpoint
s())); |
88 connect(&fActionToggleIndexStyle, SIGNAL(triggered()), this, SLOT(actionTogg
leIndexStyle())); | 88 connect(&fActionToggleIndexStyle, SIGNAL(triggered()), this, SLOT(actionTogg
leIndexStyle())); |
89 connect(&fActionInspector, SIGNAL(triggered()), this, SLOT(actionInspector()
)); | 89 connect(&fActionInspector, SIGNAL(triggered()), this, SLOT(actionInspector()
)); |
90 connect(&fActionSettings, SIGNAL(triggered()), this, SLOT(actionSettings()))
; | 90 connect(&fActionSettings, SIGNAL(triggered()), this, SLOT(actionSettings()))
; |
91 connect(&fFilter, SIGNAL(activated(QString)), this, SLOT(toggleFilter(QStrin
g))); | 91 connect(&fFilter, SIGNAL(activated(QString)), this, SLOT(toggleFilter(QStrin
g))); |
92 connect(&fActionProfile, SIGNAL(triggered()), this, SLOT(actionProfile())); | 92 connect(&fActionProfile, SIGNAL(triggered()), this, SLOT(actionProfile())); |
93 connect(&fActionCancel, SIGNAL(triggered()), this, SLOT(actionCancel())); | 93 connect(&fActionCancel, SIGNAL(triggered()), this, SLOT(actionCancel())); |
94 connect(&fActionClearBreakpoints, SIGNAL(triggered()), this, SLOT(actionClea
rBreakpoints())); | 94 connect(&fActionClearBreakpoints, SIGNAL(triggered()), this, SLOT(actionClea
rBreakpoints())); |
95 connect(&fActionClearDeletes, SIGNAL(triggered()), this, SLOT(actionClearDel
etes())); | 95 connect(&fActionClearDeletes, SIGNAL(triggered()), this, SLOT(actionClearDel
etes())); |
96 connect(&fActionClose, SIGNAL(triggered()), this, SLOT(actionClose())); | 96 connect(&fActionClose, SIGNAL(triggered()), this, SLOT(actionClose())); |
97 connect(&fSettingsWidget, SIGNAL(visibilityFilterChanged()), this, SLOT(acti
onCommandFilter())); | |
98 #if SK_SUPPORT_GPU | 97 #if SK_SUPPORT_GPU |
99 connect(&fSettingsWidget, SIGNAL(glSettingsChanged()), this, SLOT(actionGLWi
dget())); | 98 connect(&fSettingsWidget, SIGNAL(glSettingsChanged()), this, SLOT(actionGLSe
ttingsChanged())); |
100 #endif | 99 #endif |
| 100 connect(&fSettingsWidget, SIGNAL(rasterSettingsChanged()), this, SLOT(action
RasterSettingsChanged())); |
| 101 connect(&fSettingsWidget, SIGNAL(visualizationsChanged()), this, SLOT(action
VisualizationsChanged())); |
101 connect(&fSettingsWidget, SIGNAL(texFilterSettingsChanged()), this, SLOT(act
ionTextureFilter())); | 102 connect(&fSettingsWidget, SIGNAL(texFilterSettingsChanged()), this, SLOT(act
ionTextureFilter())); |
102 connect(fSettingsWidget.getRasterCheckBox(), SIGNAL(toggled(bool)), this, SL
OT(actionRasterWidget(bool))); | |
103 connect(fSettingsWidget.getOverdrawVizCheckBox(), SIGNAL(toggled(bool)), thi
s, SLOT(actionOverdrawVizWidget(bool))); | |
104 connect(fSettingsWidget.getMegaVizCheckBox(), SIGNAL(toggled(bool)), this, S
LOT(actionMegaVizWidget(bool))); | |
105 connect(fSettingsWidget.getPathOpsCheckBox(), SIGNAL(toggled(bool)), this, S
LOT(actionPathOpsWidget(bool))); | |
106 connect(&fActionPause, SIGNAL(toggled(bool)), this, SLOT(pauseDrawing(bool))
); | 103 connect(&fActionPause, SIGNAL(toggled(bool)), this, SLOT(pauseDrawing(bool))
); |
107 connect(&fActionCreateBreakpoint, SIGNAL(activated()), this, SLOT(toggleBrea
kpoint())); | 104 connect(&fActionCreateBreakpoint, SIGNAL(activated()), this, SLOT(toggleBrea
kpoint())); |
108 connect(&fActionShowDeletes, SIGNAL(triggered()), this, SLOT(showDeletes()))
; | 105 connect(&fActionShowDeletes, SIGNAL(triggered()), this, SLOT(showDeletes()))
; |
109 connect(&fCanvasWidget, SIGNAL(hitChanged(int)), this, SLOT(selectCommand(in
t))); | 106 connect(&fCanvasWidget, SIGNAL(hitChanged(int)), this, SLOT(selectCommand(in
t))); |
110 connect(&fCanvasWidget, SIGNAL(hitChanged(int)), &fSettingsWidget, SLOT(upda
teHit(int))); | 107 connect(&fCanvasWidget, SIGNAL(hitChanged(int)), this, SLOT(updateHit(int)))
; |
111 connect(&fCanvasWidget, SIGNAL(scaleFactorChanged(float)), this, SLOT(action
Scale(float))); | 108 connect(&fCanvasWidget, SIGNAL(scaleFactorChanged(float)), this, SLOT(action
Scale(float))); |
112 connect(&fCanvasWidget, SIGNAL(commandChanged(int)), &fSettingsWidget, SLOT(
updateCommand(int))); | 109 connect(&fCanvasWidget, SIGNAL(commandChanged(int)), this, SLOT(updateComman
d(int))); |
113 connect(&fActionSaveAs, SIGNAL(triggered()), this, SLOT(actionSaveAs())); | 110 connect(&fActionSaveAs, SIGNAL(triggered()), this, SLOT(actionSaveAs())); |
114 connect(&fActionSave, SIGNAL(triggered()), this, SLOT(actionSave())); | 111 connect(&fActionSave, SIGNAL(triggered()), this, SLOT(actionSave())); |
115 | 112 |
116 fMapper.setMapping(&fActionZoomIn, SkCanvasWidget::kIn_ZoomCommand); | 113 fMapper.setMapping(&fActionZoomIn, SkCanvasWidget::kIn_ZoomCommand); |
117 fMapper.setMapping(&fActionZoomOut, SkCanvasWidget::kOut_ZoomCommand); | 114 fMapper.setMapping(&fActionZoomOut, SkCanvasWidget::kOut_ZoomCommand); |
118 | 115 |
119 connect(&fActionZoomIn, SIGNAL(triggered()), &fMapper, SLOT(map())); | 116 connect(&fActionZoomIn, SIGNAL(triggered()), &fMapper, SLOT(map())); |
120 connect(&fActionZoomOut, SIGNAL(triggered()), &fMapper, SLOT(map())); | 117 connect(&fActionZoomOut, SIGNAL(triggered()), &fMapper, SLOT(map())); |
121 connect(&fMapper, SIGNAL(mapped(int)), &fCanvasWidget, SLOT(zoom(int))); | 118 connect(&fMapper, SIGNAL(mapped(int)), &fCanvasWidget, SLOT(zoom(int))); |
122 | 119 |
| 120 fViewStateFrame.setDisabled(true); |
123 fInspectorWidget.setDisabled(true); | 121 fInspectorWidget.setDisabled(true); |
124 fMenuEdit.setDisabled(true); | 122 fMenuEdit.setDisabled(true); |
125 fMenuNavigate.setDisabled(true); | 123 fMenuNavigate.setDisabled(true); |
126 fMenuView.setDisabled(true); | 124 fMenuView.setDisabled(true); |
127 | 125 |
128 SkGraphics::Init(); | 126 SkGraphics::Init(); |
129 } | 127 } |
130 | 128 |
131 SkDebuggerGUI::~SkDebuggerGUI() { | 129 SkDebuggerGUI::~SkDebuggerGUI() { |
132 SkGraphics::Term(); | 130 SkGraphics::Term(); |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 } | 232 } |
235 if (fPause) { | 233 if (fPause) { |
236 fCanvasWidget.drawTo(fPausedRow); | 234 fCanvasWidget.drawTo(fPausedRow); |
237 fImageWidget.draw(); | 235 fImageWidget.draw(); |
238 } else { | 236 } else { |
239 fCanvasWidget.drawTo(fListWidget.currentRow()); | 237 fCanvasWidget.drawTo(fListWidget.currentRow()); |
240 fImageWidget.draw(); | 238 fImageWidget.draw(); |
241 } | 239 } |
242 } | 240 } |
243 | 241 |
244 void SkDebuggerGUI::actionCommandFilter() { | |
245 fDebugger.highlightCurrentCommand(fSettingsWidget.getVisibilityFilter()); | |
246 fCanvasWidget.drawTo(fListWidget.currentRow()); | |
247 fImageWidget.draw(); | |
248 } | |
249 | |
250 void SkDebuggerGUI::actionClose() { | 242 void SkDebuggerGUI::actionClose() { |
251 this->close(); | 243 this->close(); |
252 } | 244 } |
253 | 245 |
254 void SkDebuggerGUI::actionDelete() { | 246 void SkDebuggerGUI::actionDelete() { |
255 | 247 |
256 for (int row = 0; row < fListWidget.count(); ++row) { | 248 for (int row = 0; row < fListWidget.count(); ++row) { |
257 QListWidgetItem* item = fListWidget.item(row); | 249 QListWidgetItem* item = fListWidget.item(row); |
258 | 250 |
259 if (!item->isSelected()) { | 251 if (!item->isSelected()) { |
(...skipping 16 matching lines...) Expand all Loading... |
276 if (fPause) { | 268 if (fPause) { |
277 fCanvasWidget.drawTo(fPausedRow); | 269 fCanvasWidget.drawTo(fPausedRow); |
278 fImageWidget.draw(); | 270 fImageWidget.draw(); |
279 } else { | 271 } else { |
280 fCanvasWidget.drawTo(currentRow); | 272 fCanvasWidget.drawTo(currentRow); |
281 fImageWidget.draw(); | 273 fImageWidget.draw(); |
282 } | 274 } |
283 } | 275 } |
284 | 276 |
285 #if SK_SUPPORT_GPU | 277 #if SK_SUPPORT_GPU |
286 void SkDebuggerGUI::actionGLWidget() { | 278 void SkDebuggerGUI::actionGLSettingsChanged() { |
287 bool isToggled = fSettingsWidget.isGLActive(); | 279 bool isToggled = fSettingsWidget.isGLActive(); |
288 if (isToggled) { | 280 if (isToggled) { |
289 fCanvasWidget.setGLSampleCount(fSettingsWidget.getGLSampleCount()); | 281 fCanvasWidget.setGLSampleCount(fSettingsWidget.getGLSampleCount()); |
290 } | 282 } |
291 fCanvasWidget.setWidgetVisibility(SkCanvasWidget::kGPU_WidgetType, !isToggle
d); | 283 fCanvasWidget.setWidgetVisibility(SkCanvasWidget::kGPU_WidgetType, !isToggle
d); |
292 } | 284 } |
293 #endif | 285 #endif |
294 | 286 |
295 void SkDebuggerGUI::actionInspector() { | 287 void SkDebuggerGUI::actionInspector() { |
296 if (fInspectorWidget.isHidden()) { | 288 bool newState = !fInspectorWidget.isHidden(); |
297 fInspectorWidget.setHidden(false); | 289 |
298 fImageWidget.setHidden(false); | 290 fInspectorWidget.setHidden(newState); |
299 } else { | 291 fViewStateFrame.setHidden(newState); |
300 fInspectorWidget.setHidden(true); | 292 fImageWidget.setHidden(newState); |
301 fImageWidget.setHidden(true); | |
302 } | |
303 } | 293 } |
304 | 294 |
305 void SkDebuggerGUI::actionPlay() { | 295 void SkDebuggerGUI::actionPlay() { |
306 for (int row = fListWidget.currentRow() + 1; row < fListWidget.count(); | 296 for (int row = fListWidget.currentRow() + 1; row < fListWidget.count(); |
307 row++) { | 297 row++) { |
308 QListWidgetItem *item = fListWidget.item(row); | 298 QListWidgetItem *item = fListWidget.item(row); |
309 if (item->checkState() == Qt::Checked) { | 299 if (item->checkState() == Qt::Checked) { |
310 fListWidget.setCurrentItem(item); | 300 fListWidget.setCurrentItem(item); |
311 return; | 301 return; |
312 } | 302 } |
313 } | 303 } |
314 fListWidget.setCurrentRow(fListWidget.count() - 1); | 304 fListWidget.setCurrentRow(fListWidget.count() - 1); |
315 } | 305 } |
316 | 306 |
317 void SkDebuggerGUI::actionRasterWidget(bool isToggled) { | 307 void SkDebuggerGUI::actionRasterSettingsChanged() { |
318 fCanvasWidget.setWidgetVisibility(SkCanvasWidget::kRaster_8888_WidgetType, !
isToggled); | 308 fCanvasWidget.setWidgetVisibility(SkCanvasWidget::kRaster_8888_WidgetType, |
319 } | 309 !fSettingsWidget.isRasterEnabled()); |
320 | 310 fDebugger.setOverdrawViz(fSettingsWidget.isOverdrawVizEnabled()); |
321 void SkDebuggerGUI::actionOverdrawVizWidget(bool isToggled) { | |
322 fDebugger.setOverdrawViz(isToggled); | |
323 fCanvasWidget.update(); | 311 fCanvasWidget.update(); |
324 } | 312 } |
325 | 313 |
326 void SkDebuggerGUI::actionMegaVizWidget(bool isToggled) { | 314 void SkDebuggerGUI::actionVisualizationsChanged() { |
327 fDebugger.setMegaViz(isToggled); | 315 fDebugger.setMegaViz(fSettingsWidget.isMegaVizEnabled()); |
328 fCanvasWidget.update(); | 316 fDebugger.setPathOps(fSettingsWidget.isPathOpsEnabled()); |
329 } | 317 fDebugger.highlightCurrentCommand(fSettingsWidget.isVisibilityFilterEnabled(
)); |
330 | 318 fCanvasWidget.drawTo(fListWidget.currentRow()); |
331 void SkDebuggerGUI::actionPathOpsWidget(bool isToggled) { | 319 fImageWidget.draw(); |
332 fDebugger.setPathOps(isToggled); | |
333 fCanvasWidget.update(); | |
334 } | 320 } |
335 | 321 |
336 void SkDebuggerGUI::actionTextureFilter() { | 322 void SkDebuggerGUI::actionTextureFilter() { |
337 SkPaint::FilterLevel level; | 323 SkPaint::FilterLevel level; |
338 bool enabled = fSettingsWidget.getFilterOverride(&level); | 324 bool enabled = fSettingsWidget.getFilterOverride(&level); |
339 fDebugger.setTexFilterOverride(enabled, level); | 325 fDebugger.setTexFilterOverride(enabled, level); |
340 fCanvasWidget.update(); | 326 fCanvasWidget.update(); |
341 } | 327 } |
342 | 328 |
343 void SkDebuggerGUI::actionRewind() { | 329 void SkDebuggerGUI::actionRewind() { |
(...skipping 10 matching lines...) Expand all Loading... |
354 void SkDebuggerGUI::actionSaveAs() { | 340 void SkDebuggerGUI::actionSaveAs() { |
355 QString filename = QFileDialog::getSaveFileName(this, "Save File", "", | 341 QString filename = QFileDialog::getSaveFileName(this, "Save File", "", |
356 "Skia Picture (*skp)"); | 342 "Skia Picture (*skp)"); |
357 if (!filename.endsWith(".skp", Qt::CaseInsensitive)) { | 343 if (!filename.endsWith(".skp", Qt::CaseInsensitive)) { |
358 filename.append(".skp"); | 344 filename.append(".skp"); |
359 } | 345 } |
360 saveToFile(SkString(filename.toAscii().data())); | 346 saveToFile(SkString(filename.toAscii().data())); |
361 } | 347 } |
362 | 348 |
363 void SkDebuggerGUI::actionScale(float scaleFactor) { | 349 void SkDebuggerGUI::actionScale(float scaleFactor) { |
364 fSettingsWidget.setZoomText(scaleFactor); | 350 fZoomBox.setText(QString::number(scaleFactor * 100, 'f', 0).append("%")); |
365 } | 351 } |
366 | 352 |
367 void SkDebuggerGUI::actionSettings() { | 353 void SkDebuggerGUI::actionSettings() { |
368 if (fSettingsWidget.isHidden()) { | 354 if (fSettingsWidget.isHidden()) { |
369 fSettingsWidget.setHidden(false); | 355 fSettingsWidget.setHidden(false); |
370 } else { | 356 } else { |
371 fSettingsWidget.setHidden(true); | 357 fSettingsWidget.setHidden(true); |
372 } | 358 } |
373 } | 359 } |
374 | 360 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 if (currInfo) { | 437 if (currInfo) { |
452 QString info; | 438 QString info; |
453 info.append("<b>Parameters: </b><br/>"); | 439 info.append("<b>Parameters: </b><br/>"); |
454 for (int i = 0; i < currInfo->count(); i++) { | 440 for (int i = 0; i < currInfo->count(); i++) { |
455 | 441 |
456 info.append(QString((*currInfo)[i]->c_str())); | 442 info.append(QString((*currInfo)[i]->c_str())); |
457 info.append("<br/>"); | 443 info.append("<br/>"); |
458 } | 444 } |
459 fInspectorWidget.setText(info, SkInspectorWidget::kDetail_TabTyp
e); | 445 fInspectorWidget.setText(info, SkInspectorWidget::kDetail_TabTyp
e); |
460 fInspectorWidget.setDisabled(false); | 446 fInspectorWidget.setDisabled(false); |
| 447 fViewStateFrame.setDisabled(false); |
461 } | 448 } |
462 setupClipStackText(); | 449 setupClipStackText(); |
463 } | 450 } |
464 | 451 |
465 } | 452 } |
466 } | 453 } |
467 | 454 |
468 void SkDebuggerGUI::selectCommand(int command) { | 455 void SkDebuggerGUI::selectCommand(int command) { |
469 if (fPause) { | 456 if (fPause) { |
470 fListWidget.setCurrentRow(command); | 457 fListWidget.setCurrentRow(command); |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
625 fCanvasWidget.setSizePolicy(QSizePolicy::Expanding, | 612 fCanvasWidget.setSizePolicy(QSizePolicy::Expanding, |
626 QSizePolicy::Expanding); | 613 QSizePolicy::Expanding); |
627 | 614 |
628 fImageWidget.setFixedSize(SkImageWidget::kImageWidgetWidth, | 615 fImageWidget.setFixedSize(SkImageWidget::kImageWidgetWidth, |
629 SkImageWidget::kImageWidgetHeight); | 616 SkImageWidget::kImageWidgetHeight); |
630 | 617 |
631 fInspectorWidget.setSizePolicy(QSizePolicy::Expanding, | 618 fInspectorWidget.setSizePolicy(QSizePolicy::Expanding, |
632 QSizePolicy::Expanding); | 619 QSizePolicy::Expanding); |
633 fInspectorWidget.setMaximumHeight(300); | 620 fInspectorWidget.setMaximumHeight(300); |
634 | 621 |
635 fSettingsAndImageLayout.setSpacing(6); | |
636 fSettingsAndImageLayout.addWidget(&fSettingsWidget); | 622 fSettingsAndImageLayout.addWidget(&fSettingsWidget); |
| 623 |
| 624 // View state group, part of inspector. |
| 625 fViewStateFrame.setFrameStyle(QFrame::Panel); |
| 626 fViewStateFrame.setLayout(&fViewStateFrameLayout); |
| 627 fViewStateFrameLayout.addWidget(&fViewStateGroup); |
| 628 fViewStateGroup.setTitle("View"); |
| 629 fViewStateLayout.addRow("Zoom Level", &fZoomBox); |
| 630 fZoomBox.setText("100%"); |
| 631 fZoomBox.setMinimumSize(QSize(50,25)); |
| 632 fZoomBox.setMaximumSize(QSize(50,25)); |
| 633 fZoomBox.setAlignment(Qt::AlignRight); |
| 634 fZoomBox.setReadOnly(true); |
| 635 fViewStateLayout.addRow("Command HitBox", &fCommandHitBox); |
| 636 fCommandHitBox.setText("0"); |
| 637 fCommandHitBox.setMinimumSize(QSize(50,25)); |
| 638 fCommandHitBox.setMaximumSize(QSize(50,25)); |
| 639 fCommandHitBox.setAlignment(Qt::AlignRight); |
| 640 fCommandHitBox.setReadOnly(true); |
| 641 fViewStateLayout.addRow("Current Command", &fCurrentCommandBox); |
| 642 fCurrentCommandBox.setText("0"); |
| 643 fCurrentCommandBox.setMinimumSize(QSize(50,25)); |
| 644 fCurrentCommandBox.setMaximumSize(QSize(50,25)); |
| 645 fCurrentCommandBox.setAlignment(Qt::AlignRight); |
| 646 fCurrentCommandBox.setReadOnly(true); |
| 647 fViewStateGroup.setLayout(&fViewStateLayout); |
| 648 fSettingsAndImageLayout.addWidget(&fViewStateFrame); |
| 649 |
637 fSettingsAndImageLayout.addWidget(&fImageWidget); | 650 fSettingsAndImageLayout.addWidget(&fImageWidget); |
638 | 651 |
639 fSettingsWidget.setSizePolicy(QSizePolicy::Expanding, | |
640 QSizePolicy::Expanding); | |
641 fSettingsWidget.setMaximumWidth(250); | |
642 | |
643 fLeftColumnSplitter.addWidget(&fListWidget); | 652 fLeftColumnSplitter.addWidget(&fListWidget); |
644 fLeftColumnSplitter.addWidget(&fDirectoryWidget); | 653 fLeftColumnSplitter.addWidget(&fDirectoryWidget); |
645 fLeftColumnSplitter.setOrientation(Qt::Vertical); | 654 fLeftColumnSplitter.setOrientation(Qt::Vertical); |
646 | 655 |
647 fCanvasSettingsAndImageLayout.setSpacing(6); | 656 fCanvasSettingsAndImageLayout.setSpacing(6); |
648 fCanvasSettingsAndImageLayout.addWidget(&fCanvasWidget); | 657 fCanvasSettingsAndImageLayout.addWidget(&fCanvasWidget, 1); |
649 fCanvasSettingsAndImageLayout.addLayout(&fSettingsAndImageLayout); | 658 fCanvasSettingsAndImageLayout.addLayout(&fSettingsAndImageLayout, 0); |
650 | 659 |
651 fMainAndRightColumnLayout.setSpacing(6); | 660 fMainAndRightColumnLayout.setSpacing(6); |
652 fMainAndRightColumnLayout.addLayout(&fCanvasSettingsAndImageLayout); | 661 fMainAndRightColumnLayout.addLayout(&fCanvasSettingsAndImageLayout); |
653 fMainAndRightColumnLayout.addWidget(&fInspectorWidget); | 662 fMainAndRightColumnLayout.addWidget(&fInspectorWidget); |
654 fMainAndRightColumnWidget.setLayout(&fMainAndRightColumnLayout); | 663 fMainAndRightColumnWidget.setLayout(&fMainAndRightColumnLayout); |
655 | 664 |
656 fCentralSplitter.addWidget(&fLeftColumnSplitter); | 665 fCentralSplitter.addWidget(&fLeftColumnSplitter); |
657 fCentralSplitter.addWidget(&fMainAndRightColumnWidget); | 666 fCentralSplitter.addWidget(&fMainAndRightColumnWidget); |
658 fCentralSplitter.setStretchFactor(0, 0); | 667 fCentralSplitter.setStretchFactor(0, 0); |
659 fCentralSplitter.setStretchFactor(1, 1); | 668 fCentralSplitter.setStretchFactor(1, 1); |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
778 SkTDArray<size_t>* offsets = fDebugger.getDrawCommandOffsets(); | 787 SkTDArray<size_t>* offsets = fDebugger.getDrawCommandOffsets(); |
779 SkASSERT(commands->count() == offsets->count()); | 788 SkASSERT(commands->count() == offsets->count()); |
780 | 789 |
781 fActionProfile.setDisabled(false); | 790 fActionProfile.setDisabled(false); |
782 | 791 |
783 /* fDebugCanvas is reinitialized every load picture. Need it to retain value | 792 /* fDebugCanvas is reinitialized every load picture. Need it to retain value |
784 * of the visibility filter. | 793 * of the visibility filter. |
785 * TODO(chudy): This should be deprecated since fDebugger is not | 794 * TODO(chudy): This should be deprecated since fDebugger is not |
786 * recreated. | 795 * recreated. |
787 * */ | 796 * */ |
788 fDebugger.highlightCurrentCommand(fSettingsWidget.getVisibilityFilter()); | 797 fDebugger.highlightCurrentCommand(fSettingsWidget.isVisibilityFilterEnabled(
)); |
789 | 798 |
790 this->setupListWidget(commands, offsets); | 799 this->setupListWidget(commands, offsets); |
791 this->setupComboBox(commands); | 800 this->setupComboBox(commands); |
792 this->setupOverviewText(NULL, 0.0, 1); | 801 this->setupOverviewText(NULL, 0.0, 1); |
793 fInspectorWidget.setDisabled(false); | 802 fInspectorWidget.setDisabled(false); |
| 803 fViewStateFrame.setDisabled(false); |
794 fSettingsWidget.setDisabled(false); | 804 fSettingsWidget.setDisabled(false); |
795 fMenuEdit.setDisabled(false); | 805 fMenuEdit.setDisabled(false); |
796 fMenuNavigate.setDisabled(false); | 806 fMenuNavigate.setDisabled(false); |
797 fMenuView.setDisabled(false); | 807 fMenuView.setDisabled(false); |
798 fActionSave.setDisabled(false); | 808 fActionSave.setDisabled(false); |
799 fActionSaveAs.setDisabled(false); | 809 fActionSaveAs.setDisabled(false); |
800 fLoading = false; | 810 fLoading = false; |
801 actionPlay(); | 811 actionPlay(); |
802 } | 812 } |
803 | 813 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
860 } | 870 } |
861 | 871 |
862 // NOTE(chudy): Makes first item unselectable. | 872 // NOTE(chudy): Makes first item unselectable. |
863 QStandardItemModel* model = qobject_cast<QStandardItemModel*>( | 873 QStandardItemModel* model = qobject_cast<QStandardItemModel*>( |
864 fFilter.model()); | 874 fFilter.model()); |
865 QModelIndex firstIndex = model->index(0, fFilter.modelColumn(), | 875 QModelIndex firstIndex = model->index(0, fFilter.modelColumn(), |
866 fFilter.rootModelIndex()); | 876 fFilter.rootModelIndex()); |
867 QStandardItem* firstItem = model->itemFromIndex(firstIndex); | 877 QStandardItem* firstItem = model->itemFromIndex(firstIndex); |
868 firstItem->setSelectable(false); | 878 firstItem->setSelectable(false); |
869 } | 879 } |
| 880 |
| 881 void SkDebuggerGUI::updateCommand(int newCommand) { |
| 882 fCurrentCommandBox.setText(QString::number(newCommand)); |
| 883 } |
| 884 |
| 885 void SkDebuggerGUI::updateHit(int newHit) { |
| 886 fCommandHitBox.setText(QString::number(newHit)); |
| 887 } |
| 888 |
OLD | NEW |