Chromium Code Reviews| Index: debugger/QT/SkDebuggerGUI.cpp |
| diff --git a/debugger/QT/SkDebuggerGUI.cpp b/debugger/QT/SkDebuggerGUI.cpp |
| index e29a6e14ccffbc0e0063eaea4532c1eaee4a8d8c..b97d044cf767dd3aaac14fa736f9befafe6e898d 100644 |
| --- a/debugger/QT/SkDebuggerGUI.cpp |
| +++ b/debugger/QT/SkDebuggerGUI.cpp |
| @@ -61,7 +61,7 @@ SkDebuggerGUI::SkDebuggerGUI(QWidget *parent) : |
| , fListWidget(&fCentralSplitter) |
| , fDirectoryWidget(&fCentralSplitter) |
| , fCanvasWidget(this, &fDebugger) |
| - , fImageWidget(&fDebugger) |
| + , fDrawGeometryWidget(&fDebugger) |
| , fMenuBar(this) |
| , fMenuFile(this) |
| , fMenuNavigate(this) |
| @@ -107,6 +107,8 @@ SkDebuggerGUI::SkDebuggerGUI(QWidget *parent) : |
| connect(&fCanvasWidget, SIGNAL(hitChanged(int)), this, SLOT(updateHit(int))); |
| connect(&fCanvasWidget, SIGNAL(scaleFactorChanged(float)), this, SLOT(actionScale(float))); |
| connect(&fCanvasWidget, SIGNAL(commandChanged(int)), this, SLOT(updateCommand(int))); |
| + connect(&fCanvasWidget, SIGNAL(commandChanged(int)), &fDrawGeometryWidget, SLOT(updateImage())); |
| + |
| connect(&fActionSaveAs, SIGNAL(triggered()), this, SLOT(actionSaveAs())); |
| connect(&fActionSave, SIGNAL(triggered()), this, SLOT(actionSave())); |
| @@ -232,10 +234,8 @@ void SkDebuggerGUI::actionClearDeletes() { |
| } |
| if (fPause) { |
| fCanvasWidget.drawTo(fPausedRow); |
| - fImageWidget.draw(); |
| } else { |
| fCanvasWidget.drawTo(fListWidget.currentRow()); |
| - fImageWidget.draw(); |
| } |
| } |
| @@ -267,10 +267,8 @@ void SkDebuggerGUI::actionDelete() { |
| if (fPause) { |
| fCanvasWidget.drawTo(fPausedRow); |
| - fImageWidget.draw(); |
| } else { |
| fCanvasWidget.drawTo(currentRow); |
| - fImageWidget.draw(); |
| } |
| } |
| @@ -289,7 +287,7 @@ void SkDebuggerGUI::actionInspector() { |
| fInspectorWidget.setHidden(newState); |
| fViewStateFrame.setHidden(newState); |
| - fImageWidget.setHidden(newState); |
| + fDrawGeometryWidget.setHidden(newState); |
| } |
| void SkDebuggerGUI::actionPlay() { |
| @@ -315,7 +313,6 @@ void SkDebuggerGUI::actionVisualizationsChanged() { |
| fDebugger.setPathOps(fSettingsWidget.isPathOpsEnabled()); |
| fDebugger.highlightCurrentCommand(fSettingsWidget.isVisibilityFilterEnabled()); |
| fCanvasWidget.drawTo(fListWidget.currentRow()); |
| - fImageWidget.draw(); |
| } |
| void SkDebuggerGUI::actionTextureFilter() { |
| @@ -417,7 +414,6 @@ void SkDebuggerGUI::pauseDrawing(bool isPaused) { |
| fPause = isPaused; |
| fPausedRow = fListWidget.currentRow(); |
| fCanvasWidget.drawTo(fPausedRow); |
| - fImageWidget.draw(); |
| } |
| void SkDebuggerGUI::registerListClick(QListWidgetItem *item) { |
| @@ -427,7 +423,6 @@ void SkDebuggerGUI::registerListClick(QListWidgetItem *item) { |
| if (currentRow != -1) { |
| if (!fPause) { |
| fCanvasWidget.drawTo(currentRow); |
| - fImageWidget.draw(); |
| } |
| const SkTDArray<SkString*> *currInfo = fDebugger.getCommandInfo(currentRow); |
| @@ -611,8 +606,8 @@ void SkDebuggerGUI::setupUi(QMainWindow *SkDebuggerGUI) { |
| fCanvasWidget.setSizePolicy(QSizePolicy::Expanding, |
| QSizePolicy::Expanding); |
|
robertphillips
2014/12/30 17:35:33
one line ?
Kimmo Kinnunen
2014/12/31 06:43:29
Done.
|
| - fImageWidget.setFixedSize(SkImageWidget::kImageWidgetWidth, |
| - SkImageWidget::kImageWidgetHeight); |
| + fDrawGeometryWidget.setSizePolicy(QSizePolicy::Expanding, |
| + QSizePolicy::Expanding); |
| fInspectorWidget.setSizePolicy(QSizePolicy::Expanding, |
| QSizePolicy::Expanding); |
| @@ -646,7 +641,10 @@ void SkDebuggerGUI::setupUi(QMainWindow *SkDebuggerGUI) { |
| fViewStateGroup.setLayout(&fViewStateLayout); |
| fSettingsAndImageLayout.addWidget(&fViewStateFrame); |
| - fSettingsAndImageLayout.addWidget(&fImageWidget); |
| + fDrawGeometryGroup.setTitle("Draw Geometry"); |
| + fDrawGeometryGroupLayout.addWidget(&fDrawGeometryWidget); |
| + fDrawGeometryGroup.setLayout(&fDrawGeometryGroupLayout); |
| + fSettingsAndImageLayout.addWidget(&fDrawGeometryGroup); |
| fLeftColumnSplitter.addWidget(&fListWidget); |
| fLeftColumnSplitter.addWidget(&fDirectoryWidget); |