| 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 #ifndef SKINSPECTORWIDGET_H_ | 10 #ifndef SKINSPECTORWIDGET_H_ |
| 11 #define SKINSPECTORWIDGET_H_ | 11 #define SKINSPECTORWIDGET_H_ |
| 12 | 12 |
| 13 #include "SkMatrix.h" | 13 #include "SkMatrix.h" |
| 14 | 14 |
| 15 #include <QWidget> | 15 #include <QWidget> |
| 16 #include <QTabWidget> | 16 #include <QTabWidget> |
| 17 #include <QTextEdit> | 17 #include <QTextEdit> |
| 18 #include <QHBoxLayout> | 18 #include <QHBoxLayout> |
| 19 #include <QLabel> | 19 #include <QLabel> |
| 20 #include <QLineEdit> | 20 #include <QLineEdit> |
| 21 #include <QGroupBox> |
| 22 #include <QGridLayout> |
| 21 | 23 |
| 22 /** \class SkInspectorWidget | 24 /** \class SkInspectorWidget |
| 23 | 25 |
| 24 The InspectorWidget contains the overview and details tab. These contain | 26 The InspectorWidget contains the overview and details tab. These contain |
| 25 information about the whole picture and details about each draw command. | 27 information about the whole picture and details about each draw command. |
| 26 */ | 28 */ |
| 27 class SkInspectorWidget : public QWidget { | 29 class SkInspectorWidget : public QWidget { |
| 28 Q_OBJECT | 30 Q_OBJECT |
| 29 | 31 |
| 30 public: | 32 public: |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 void setClip(const SkIRect& clip); | 66 void setClip(const SkIRect& clip); |
| 65 | 67 |
| 66 class Tab : public QWidget { | 68 class Tab : public QWidget { |
| 67 QWidget fTab; | 69 QWidget fTab; |
| 68 QHBoxLayout fTabLayout; | 70 QHBoxLayout fTabLayout; |
| 69 QTextEdit fTabText; | 71 QTextEdit fTabText; |
| 70 QString fName; | 72 QString fName; |
| 71 | 73 |
| 72 Tab(const char* name) { | 74 Tab(const char* name) { |
| 73 fTabText.setReadOnly(true); | 75 fTabText.setReadOnly(true); |
| 74 fTabLayout.setSpacing(6); | |
| 75 fTabLayout.setContentsMargins(11, 11, 11, 11); | |
| 76 fTabLayout.addWidget(&fTabText); | 76 fTabLayout.addWidget(&fTabText); |
| 77 fTab.setLayout(&fTabLayout); | 77 fTab.setLayout(&fTabLayout); |
| 78 fName = QString(name); | 78 fName = QString(name); |
| 79 } | 79 } |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 private: | 82 private: |
| 83 QHBoxLayout fHorizontalLayout; | 83 QHBoxLayout fHorizontalLayout; |
| 84 QTabWidget fTabWidget; | 84 QTabWidget fTabWidget; |
| 85 | 85 |
| 86 QWidget fTabs[kTotalTabCount]; | 86 QWidget fTabs[kTotalTabCount]; |
| 87 QHBoxLayout fTabLayouts[kTotalTabCount]; | 87 QHBoxLayout fTabLayouts[kTotalTabCount]; |
| 88 QTextEdit fTabTexts[kTotalTabCount]; | 88 QTextEdit fTabTexts[kTotalTabCount]; |
| 89 | 89 |
| 90 QWidget fMatrixAndClipWidget; | 90 QFrame fMatrixAndClipWidget; |
| 91 QVBoxLayout fVerticalLayout; | 91 QVBoxLayout fVerticalLayout; |
| 92 | 92 |
| 93 QLabel fMatrixLabel; | 93 QGroupBox fMatrixGroup; |
| 94 QVBoxLayout fMatrixLayout; | 94 QGridLayout fMatrixLayout; |
| 95 QHBoxLayout fMatrixRow[3]; | |
| 96 QLineEdit fMatrixEntry[9]; | 95 QLineEdit fMatrixEntry[9]; |
| 97 | 96 |
| 98 QLabel fClipLabel; | 97 QGroupBox fClipGroup; |
| 99 QVBoxLayout fClipLayout; | 98 QGridLayout fClipLayout; |
| 100 QHBoxLayout fClipRow[2]; | |
| 101 QLineEdit fClipEntry[4]; | 99 QLineEdit fClipEntry[4]; |
| 102 | 100 |
| 103 QVBoxLayout* setupMatrix(); | 101 void setupMatrix(); |
| 104 QVBoxLayout* setupClip(); | 102 void setupClip(); |
| 105 }; | 103 }; |
| 106 | 104 |
| 107 #endif | 105 #endif |
| OLD | NEW |