Chromium Code Reviews| 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() { |
|
robertphillips
2014/12/30 17:09:33
new line here ?
Kimmo Kinnunen
2014/12/31 06:25:50
Done.
| |
| 318 fCanvasWidget.setWidgetVisibility(SkCanvasWidget::kRaster_8888_WidgetType, ! isToggled); | 308 fCanvasWidget.setWidgetVisibility(SkCanvasWidget::kRaster_8888_WidgetType, ! fSettingsWidget.isRasterEnabled()); |
| 319 } | 309 fDebugger.setOverdrawViz(fSettingsWidget.isOverdrawVizEnabled()); |
| 320 | |
| 321 void SkDebuggerGUI::actionOverdrawVizWidget(bool isToggled) { | |
| 322 fDebugger.setOverdrawViz(isToggled); | |
| 323 fCanvasWidget.update(); | 310 fCanvasWidget.update(); |
| 324 } | 311 } |
| 325 | 312 |
| 326 void SkDebuggerGUI::actionMegaVizWidget(bool isToggled) { | 313 void SkDebuggerGUI::actionVisualizationsChanged() { |
| 327 fDebugger.setMegaViz(isToggled); | 314 fDebugger.setMegaViz(fSettingsWidget.isMegaVizEnabled()); |
| 328 fCanvasWidget.update(); | 315 fDebugger.setPathOps(fSettingsWidget.isPathOpsEnabled()); |
| 329 } | 316 fDebugger.highlightCurrentCommand(fSettingsWidget.isVisibilityFilterEnabled( )); |
| 330 | 317 fCanvasWidget.drawTo(fListWidget.currentRow()); |
| 331 void SkDebuggerGUI::actionPathOpsWidget(bool isToggled) { | 318 fImageWidget.draw(); |
| 332 fDebugger.setPathOps(isToggled); | |
| 333 fCanvasWidget.update(); | |
| 334 } | 319 } |
| 335 | 320 |
| 336 void SkDebuggerGUI::actionTextureFilter() { | 321 void SkDebuggerGUI::actionTextureFilter() { |
| 337 SkPaint::FilterLevel level; | 322 SkPaint::FilterLevel level; |
| 338 bool enabled = fSettingsWidget.getFilterOverride(&level); | 323 bool enabled = fSettingsWidget.getFilterOverride(&level); |
| 339 fDebugger.setTexFilterOverride(enabled, level); | 324 fDebugger.setTexFilterOverride(enabled, level); |
| 340 fCanvasWidget.update(); | 325 fCanvasWidget.update(); |
| 341 } | 326 } |
| 342 | 327 |
| 343 void SkDebuggerGUI::actionRewind() { | 328 void SkDebuggerGUI::actionRewind() { |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 354 void SkDebuggerGUI::actionSaveAs() { | 339 void SkDebuggerGUI::actionSaveAs() { |
| 355 QString filename = QFileDialog::getSaveFileName(this, "Save File", "", | 340 QString filename = QFileDialog::getSaveFileName(this, "Save File", "", |
| 356 "Skia Picture (*skp)"); | 341 "Skia Picture (*skp)"); |
| 357 if (!filename.endsWith(".skp", Qt::CaseInsensitive)) { | 342 if (!filename.endsWith(".skp", Qt::CaseInsensitive)) { |
| 358 filename.append(".skp"); | 343 filename.append(".skp"); |
| 359 } | 344 } |
| 360 saveToFile(SkString(filename.toAscii().data())); | 345 saveToFile(SkString(filename.toAscii().data())); |
| 361 } | 346 } |
| 362 | 347 |
| 363 void SkDebuggerGUI::actionScale(float scaleFactor) { | 348 void SkDebuggerGUI::actionScale(float scaleFactor) { |
| 364 fSettingsWidget.setZoomText(scaleFactor); | 349 fZoomBox.setText(QString::number(scaleFactor * 100, 'f', 0).append("%")); |
| 365 } | 350 } |
| 366 | 351 |
| 367 void SkDebuggerGUI::actionSettings() { | 352 void SkDebuggerGUI::actionSettings() { |
| 368 if (fSettingsWidget.isHidden()) { | 353 if (fSettingsWidget.isHidden()) { |
| 369 fSettingsWidget.setHidden(false); | 354 fSettingsWidget.setHidden(false); |
| 370 } else { | 355 } else { |
| 371 fSettingsWidget.setHidden(true); | 356 fSettingsWidget.setHidden(true); |
| 372 } | 357 } |
| 373 } | 358 } |
| 374 | 359 |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 451 if (currInfo) { | 436 if (currInfo) { |
| 452 QString info; | 437 QString info; |
| 453 info.append("<b>Parameters: </b><br/>"); | 438 info.append("<b>Parameters: </b><br/>"); |
| 454 for (int i = 0; i < currInfo->count(); i++) { | 439 for (int i = 0; i < currInfo->count(); i++) { |
| 455 | 440 |
| 456 info.append(QString((*currInfo)[i]->c_str())); | 441 info.append(QString((*currInfo)[i]->c_str())); |
| 457 info.append("<br/>"); | 442 info.append("<br/>"); |
| 458 } | 443 } |
| 459 fInspectorWidget.setText(info, SkInspectorWidget::kDetail_TabTyp e); | 444 fInspectorWidget.setText(info, SkInspectorWidget::kDetail_TabTyp e); |
| 460 fInspectorWidget.setDisabled(false); | 445 fInspectorWidget.setDisabled(false); |
| 446 fViewStateFrame.setDisabled(false); | |
| 461 } | 447 } |
| 462 setupClipStackText(); | 448 setupClipStackText(); |
| 463 } | 449 } |
| 464 | 450 |
| 465 } | 451 } |
| 466 } | 452 } |
| 467 | 453 |
| 468 void SkDebuggerGUI::selectCommand(int command) { | 454 void SkDebuggerGUI::selectCommand(int command) { |
| 469 if (fPause) { | 455 if (fPause) { |
| 470 fListWidget.setCurrentRow(command); | 456 fListWidget.setCurrentRow(command); |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 625 fCanvasWidget.setSizePolicy(QSizePolicy::Expanding, | 611 fCanvasWidget.setSizePolicy(QSizePolicy::Expanding, |
| 626 QSizePolicy::Expanding); | 612 QSizePolicy::Expanding); |
| 627 | 613 |
| 628 fImageWidget.setFixedSize(SkImageWidget::kImageWidgetWidth, | 614 fImageWidget.setFixedSize(SkImageWidget::kImageWidgetWidth, |
| 629 SkImageWidget::kImageWidgetHeight); | 615 SkImageWidget::kImageWidgetHeight); |
| 630 | 616 |
| 631 fInspectorWidget.setSizePolicy(QSizePolicy::Expanding, | 617 fInspectorWidget.setSizePolicy(QSizePolicy::Expanding, |
| 632 QSizePolicy::Expanding); | 618 QSizePolicy::Expanding); |
| 633 fInspectorWidget.setMaximumHeight(300); | 619 fInspectorWidget.setMaximumHeight(300); |
| 634 | 620 |
| 635 fSettingsAndImageLayout.setSpacing(6); | |
| 636 fSettingsAndImageLayout.addWidget(&fSettingsWidget); | 621 fSettingsAndImageLayout.addWidget(&fSettingsWidget); |
| 622 | |
| 623 // View state group, part of inspector. | |
| 624 fViewStateFrame.setFrameStyle(QFrame::Panel); | |
| 625 fViewStateFrame.setLayout(&fViewStateFrameLayout); | |
| 626 fViewStateFrameLayout.addWidget(&fViewStateGroup); | |
| 627 fViewStateGroup.setTitle("View"); | |
| 628 fViewStateLayout.addRow("Current Command", &fCurrentCommandBox); | |
| 629 fCurrentCommandBox.setText("0"); | |
| 630 fCurrentCommandBox.setMinimumSize(QSize(50,25)); | |
| 631 fCurrentCommandBox.setMaximumSize(QSize(50,25)); | |
| 632 fCurrentCommandBox.setAlignment(Qt::AlignRight); | |
| 633 fCurrentCommandBox.setReadOnly(true); | |
| 634 fViewStateLayout.addRow("Command HitBox", &fCommandHitBox); | |
| 635 fCommandHitBox.setText("0"); | |
| 636 fCommandHitBox.setMinimumSize(QSize(50,25)); | |
| 637 fCommandHitBox.setMaximumSize(QSize(50,25)); | |
| 638 fCommandHitBox.setAlignment(Qt::AlignRight); | |
| 639 fCommandHitBox.setReadOnly(true); | |
| 640 fViewStateLayout.addRow("Zoom Level", &fZoomBox); | |
| 641 fZoomBox.setText("100%"); | |
| 642 fZoomBox.setMinimumSize(QSize(50,25)); | |
| 643 fZoomBox.setMaximumSize(QSize(50,25)); | |
| 644 fZoomBox.setAlignment(Qt::AlignRight); | |
| 645 fZoomBox.setReadOnly(true); | |
| 646 fViewStateGroup.setLayout(&fViewStateLayout); | |
| 647 fSettingsAndImageLayout.addWidget(&fViewStateFrame); | |
| 648 | |
| 637 fSettingsAndImageLayout.addWidget(&fImageWidget); | 649 fSettingsAndImageLayout.addWidget(&fImageWidget); |
| 638 | 650 |
| 639 fSettingsWidget.setSizePolicy(QSizePolicy::Expanding, | |
| 640 QSizePolicy::Expanding); | |
| 641 fSettingsWidget.setMaximumWidth(250); | |
| 642 | |
| 643 fLeftColumnSplitter.addWidget(&fListWidget); | 651 fLeftColumnSplitter.addWidget(&fListWidget); |
| 644 fLeftColumnSplitter.addWidget(&fDirectoryWidget); | 652 fLeftColumnSplitter.addWidget(&fDirectoryWidget); |
| 645 fLeftColumnSplitter.setOrientation(Qt::Vertical); | 653 fLeftColumnSplitter.setOrientation(Qt::Vertical); |
| 646 | 654 |
| 647 fCanvasSettingsAndImageLayout.setSpacing(6); | 655 fCanvasSettingsAndImageLayout.setSpacing(6); |
| 648 fCanvasSettingsAndImageLayout.addWidget(&fCanvasWidget); | 656 fCanvasSettingsAndImageLayout.addWidget(&fCanvasWidget, 1); |
| 649 fCanvasSettingsAndImageLayout.addLayout(&fSettingsAndImageLayout); | 657 fCanvasSettingsAndImageLayout.addLayout(&fSettingsAndImageLayout, 0); |
| 650 | 658 |
| 651 fMainAndRightColumnLayout.setSpacing(6); | 659 fMainAndRightColumnLayout.setSpacing(6); |
| 652 fMainAndRightColumnLayout.addLayout(&fCanvasSettingsAndImageLayout); | 660 fMainAndRightColumnLayout.addLayout(&fCanvasSettingsAndImageLayout); |
| 653 fMainAndRightColumnLayout.addWidget(&fInspectorWidget); | 661 fMainAndRightColumnLayout.addWidget(&fInspectorWidget); |
| 654 fMainAndRightColumnWidget.setLayout(&fMainAndRightColumnLayout); | 662 fMainAndRightColumnWidget.setLayout(&fMainAndRightColumnLayout); |
| 655 | 663 |
| 656 fCentralSplitter.addWidget(&fLeftColumnSplitter); | 664 fCentralSplitter.addWidget(&fLeftColumnSplitter); |
| 657 fCentralSplitter.addWidget(&fMainAndRightColumnWidget); | 665 fCentralSplitter.addWidget(&fMainAndRightColumnWidget); |
| 658 fCentralSplitter.setStretchFactor(0, 0); | 666 fCentralSplitter.setStretchFactor(0, 0); |
| 659 fCentralSplitter.setStretchFactor(1, 1); | 667 fCentralSplitter.setStretchFactor(1, 1); |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 778 SkTDArray<size_t>* offsets = fDebugger.getDrawCommandOffsets(); | 786 SkTDArray<size_t>* offsets = fDebugger.getDrawCommandOffsets(); |
| 779 SkASSERT(commands->count() == offsets->count()); | 787 SkASSERT(commands->count() == offsets->count()); |
| 780 | 788 |
| 781 fActionProfile.setDisabled(false); | 789 fActionProfile.setDisabled(false); |
| 782 | 790 |
| 783 /* fDebugCanvas is reinitialized every load picture. Need it to retain value | 791 /* fDebugCanvas is reinitialized every load picture. Need it to retain value |
| 784 * of the visibility filter. | 792 * of the visibility filter. |
| 785 * TODO(chudy): This should be deprecated since fDebugger is not | 793 * TODO(chudy): This should be deprecated since fDebugger is not |
| 786 * recreated. | 794 * recreated. |
| 787 * */ | 795 * */ |
| 788 fDebugger.highlightCurrentCommand(fSettingsWidget.getVisibilityFilter()); | 796 fDebugger.highlightCurrentCommand(fSettingsWidget.isVisibilityFilterEnabled( )); |
| 789 | 797 |
| 790 this->setupListWidget(commands, offsets); | 798 this->setupListWidget(commands, offsets); |
| 791 this->setupComboBox(commands); | 799 this->setupComboBox(commands); |
| 792 this->setupOverviewText(NULL, 0.0, 1); | 800 this->setupOverviewText(NULL, 0.0, 1); |
| 793 fInspectorWidget.setDisabled(false); | 801 fInspectorWidget.setDisabled(false); |
| 802 fViewStateFrame.setDisabled(false); | |
| 794 fSettingsWidget.setDisabled(false); | 803 fSettingsWidget.setDisabled(false); |
| 795 fMenuEdit.setDisabled(false); | 804 fMenuEdit.setDisabled(false); |
| 796 fMenuNavigate.setDisabled(false); | 805 fMenuNavigate.setDisabled(false); |
| 797 fMenuView.setDisabled(false); | 806 fMenuView.setDisabled(false); |
| 798 fActionSave.setDisabled(false); | 807 fActionSave.setDisabled(false); |
| 799 fActionSaveAs.setDisabled(false); | 808 fActionSaveAs.setDisabled(false); |
| 800 fLoading = false; | 809 fLoading = false; |
| 801 actionPlay(); | 810 actionPlay(); |
| 802 } | 811 } |
| 803 | 812 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 860 } | 869 } |
| 861 | 870 |
| 862 // NOTE(chudy): Makes first item unselectable. | 871 // NOTE(chudy): Makes first item unselectable. |
| 863 QStandardItemModel* model = qobject_cast<QStandardItemModel*>( | 872 QStandardItemModel* model = qobject_cast<QStandardItemModel*>( |
| 864 fFilter.model()); | 873 fFilter.model()); |
| 865 QModelIndex firstIndex = model->index(0, fFilter.modelColumn(), | 874 QModelIndex firstIndex = model->index(0, fFilter.modelColumn(), |
| 866 fFilter.rootModelIndex()); | 875 fFilter.rootModelIndex()); |
| 867 QStandardItem* firstItem = model->itemFromIndex(firstIndex); | 876 QStandardItem* firstItem = model->itemFromIndex(firstIndex); |
| 868 firstItem->setSelectable(false); | 877 firstItem->setSelectable(false); |
| 869 } | 878 } |
| 879 | |
| 880 void SkDebuggerGUI::updateCommand(int newCommand) { | |
| 881 fCurrentCommandBox.setText(QString::number(newCommand)); | |
| 882 } | |
| 883 | |
| 884 void SkDebuggerGUI::updateHit(int newHit) { | |
| 885 fCommandHitBox.setText(QString::number(newHit)); | |
| 886 } | |
| 887 | |
| OLD | NEW |