| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #include "SkInspectorWidget.h" | 10 #include "SkInspectorWidget.h" |
| 11 #include <iostream> | 11 #include <iostream> |
| 12 | 12 |
| 13 SkInspectorWidget::SkInspectorWidget() : QWidget() | 13 SkInspectorWidget::SkInspectorWidget() : QWidget() |
| 14 , fHorizontalLayout(this) | 14 , fHorizontalLayout(this) |
| 15 , fMatrixAndClipWidget(this) | 15 , fMatrixAndClipWidget(this) |
| 16 , fVerticalLayout(&fMatrixAndClipWidget) | 16 , fVerticalLayout(&fMatrixAndClipWidget) |
| 17 , fMatrixLabel(this) | 17 , fMatrixLabel(this) |
| 18 , fClipLabel(this) { | 18 , fClipLabel(this) { |
| 19 | 19 |
| 20 fHorizontalLayout.setSpacing(6); | 20 fHorizontalLayout.setSpacing(6); |
| 21 fHorizontalLayout.setContentsMargins(11, 11, 11, 11); | 21 fHorizontalLayout.setContentsMargins(11, 11, 11, 11); |
| 22 | 22 |
| 23 QString tabNames[kTotalTabCount]; | 23 QString tabNames[kTotalTabCount]; |
| 24 tabNames[kOverview_TabType] = "Overview"; | 24 tabNames[kOverview_TabType] = "Overview"; |
| 25 tabNames[kDetail_TabType] = "Details"; | 25 tabNames[kDetail_TabType] = "Details"; |
| 26 tabNames[kClipStack_TabType] = "Clip Stack"; |
| 26 | 27 |
| 27 for (int i = 0; i < kTotalTabCount; i++) { | 28 for (int i = 0; i < kTotalTabCount; i++) { |
| 28 fTabTexts[i].setReadOnly(true); | 29 fTabTexts[i].setReadOnly(true); |
| 29 fTabLayouts[i].setSpacing(6); | 30 fTabLayouts[i].setSpacing(6); |
| 30 fTabLayouts[i].setContentsMargins(11, 11, 11, 11); | 31 fTabLayouts[i].setContentsMargins(11, 11, 11, 11); |
| 31 fTabLayouts[i].addWidget(&fTabTexts[i]); | 32 fTabLayouts[i].addWidget(&fTabTexts[i]); |
| 32 fTabs[i].setLayout(&fTabLayouts[i]); | 33 fTabs[i].setLayout(&fTabLayouts[i]); |
| 33 fTabWidget.addTab(&fTabs[i], tabNames[i]); | 34 fTabWidget.addTab(&fTabs[i], tabNames[i]); |
| 34 } | 35 } |
| 35 | 36 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 fClipEntry[i].setReadOnly(true); | 106 fClipEntry[i].setReadOnly(true); |
| 106 | 107 |
| 107 fClipRow[i/2].addWidget(&fClipEntry[i]); | 108 fClipRow[i/2].addWidget(&fClipEntry[i]); |
| 108 if(i%2 == 1) { | 109 if(i%2 == 1) { |
| 109 fClipLayout.addLayout(&fClipRow[i/2]); | 110 fClipLayout.addLayout(&fClipRow[i/2]); |
| 110 } | 111 } |
| 111 } | 112 } |
| 112 | 113 |
| 113 return &fClipLayout; | 114 return &fClipLayout; |
| 114 } | 115 } |
| OLD | NEW |