2f89179395
Review URL: https://codereview.appspot.com/6348058 git-svn-id: http://skia.googlecode.com/svn/trunk@4453 2bbb7eff-a529-9590-31e7-b0007b416f81
96 lines
2.0 KiB
C++
96 lines
2.0 KiB
C++
|
|
/*
|
|
* Copyright 2012 Google Inc.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
|
|
#ifndef SKINSPECTORWIDGET_H_
|
|
#define SKINSPECTORWIDGET_H_
|
|
|
|
#include "SkMatrix.h"
|
|
|
|
#include <QWidget>
|
|
#include <QTabWidget>
|
|
#include <QTextEdit>
|
|
#include <QHBoxLayout>
|
|
#include <QLabel>
|
|
#include <QLineEdit>
|
|
|
|
/** \class SkInspectorWidget
|
|
|
|
The InspectorWidget contains the overview and details tab. These contain
|
|
information about the whole picture and details about each draw command.
|
|
*/
|
|
class SkInspectorWidget : public QWidget {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
/**
|
|
Constructs a widget with the specified parent for layout purposes.
|
|
@param parent The parent container of this widget
|
|
*/
|
|
SkInspectorWidget(QWidget *parent = NULL);
|
|
|
|
~SkInspectorWidget();
|
|
|
|
void setDisabled(bool isDisabled) {
|
|
fMatrixAndClipWidget.setDisabled(isDisabled);
|
|
}
|
|
/**
|
|
Sets the text in the detail tab.
|
|
@param text
|
|
*/
|
|
void setDetailText(QString text);
|
|
|
|
/**
|
|
Sets the text in the overview tab.
|
|
@param text
|
|
*/
|
|
void setOverviewText(QString text);
|
|
|
|
/**
|
|
Sets the text in the current matrix.
|
|
@param matrixValues
|
|
*/
|
|
void setMatrix(const SkMatrix& matrix);
|
|
|
|
/**
|
|
Sets the text in the current clip.
|
|
@param clipValues
|
|
*/
|
|
void setClip(const SkIRect& clip);
|
|
|
|
private:
|
|
QHBoxLayout fHorizontalLayout;
|
|
QTabWidget fTabWidget;
|
|
|
|
QWidget fOverviewTab;
|
|
QHBoxLayout fOverviewLayout;
|
|
QTextEdit fOverviewText;
|
|
|
|
QWidget fDetailTab;
|
|
QHBoxLayout fDetailLayout;
|
|
QTextEdit fDetailText;
|
|
|
|
QWidget fMatrixAndClipWidget;
|
|
QVBoxLayout fVerticalLayout;
|
|
|
|
QLabel fMatrixLabel;
|
|
QVBoxLayout fMatrixLayout;
|
|
QHBoxLayout fMatrixRow[3];
|
|
QLineEdit fMatrixEntry[9];
|
|
|
|
QLabel fClipLabel;
|
|
QVBoxLayout fClipLayout;
|
|
QHBoxLayout fClipRow[2];
|
|
QLineEdit fClipEntry[4];
|
|
|
|
QVBoxLayout* setupMatrix();
|
|
QVBoxLayout* setupClip();
|
|
};
|
|
|
|
#endif
|