| chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 1 | |
| 2 | /* |
| 3 | * Copyright 2012 Google Inc. |
| 4 | * |
| 5 | * Use of this source code is governed by a BSD-style license that can be |
| 6 | * found in the LICENSE file. |
| 7 | */ |
| 8 | |
| 9 | |
| 10 | #ifndef SKINSPECTORWIDGET_H_ |
| 11 | #define SKINSPECTORWIDGET_H_ |
| 12 | |
| 13 | #include <QWidget> |
| 14 | #include <QTabWidget> |
| 15 | #include <QTextEdit> |
| 16 | #include <QHBoxLayout> |
| 17 | #include <QLabel> |
| 18 | #include <QLineEdit> |
| 19 | |
| 20 | /** \class SkInspectorWidget |
| 21 | |
| 22 | The InspectorWidget contains the overview and details tab. These contain |
| 23 | information about the whole picture and details about each draw command. |
| 24 | */ |
| 25 | class SkInspectorWidget : public QWidget { |
| 26 | Q_OBJECT |
| 27 | |
| 28 | public: |
| 29 | /** |
| 30 | Constructs a widget with the specified parent for layout purposes. |
| 31 | @param parent The parent container of this widget |
| 32 | */ |
| 33 | SkInspectorWidget(QWidget *parent = NULL); |
| 34 | |
| 35 | ~SkInspectorWidget(); |
| 36 | |
| 37 | /** |
| 38 | Returns a QString representation of the text currently in the detail tab. |
| 39 | */ |
| 40 | QString getDetailText(); |
| 41 | |
| 42 | /** |
| 43 | Returns a QString representation of the text currently in the overview tab. |
| 44 | */ |
| 45 | QString getOverviewText(); |
| 46 | |
| 47 | /** |
| 48 | Sets the text in the detail tab. |
| 49 | @param text |
| 50 | */ |
| 51 | void setDetailText(QString text); |
| 52 | |
| 53 | /** |
| 54 | Sets the text in the overview tab. |
| 55 | @param text |
| 56 | */ |
| 57 | void setOverviewText(QString text); |
| 58 | |
| 59 | private: |
| 60 | QWidget* fDetailTab; |
| 61 | QTextEdit* fDetailText; |
| 62 | QHBoxLayout* fDetailLayout; |
| 63 | QHBoxLayout* fHorizontalLayout; |
| 64 | QWidget* fOverviewTab; |
| 65 | QTextEdit* fOverviewText; |
| 66 | QHBoxLayout* fOverviewLayout; |
| 67 | QTabWidget* fTabWidget; |
| 68 | |
| 69 | QWidget* fMatrixAndClipWidget; |
| 70 | QVBoxLayout* fVerticalLayout; |
| 71 | |
| 72 | QVBoxLayout* fMatrixLayout; |
| 73 | QLabel* fMatrixLabel; |
| 74 | QHBoxLayout* fMatrixRow[3]; |
| 75 | QLineEdit* fMatrixEntry[9]; |
| 76 | |
| 77 | QVBoxLayout* fClipLayout; |
| 78 | QLabel* fClipLabel; |
| 79 | QHBoxLayout* fClipRow[2]; |
| 80 | QLineEdit* fClipEntry[4]; |
| 81 | |
| 82 | QVBoxLayout* currentMatrix(); |
| 83 | QVBoxLayout* currentClip(); |
| 84 | }; |
| 85 | |
| 86 | #endif |