SkHitBox added.
SkHitBox is a class that determines which draw command is associated with the pixel located at x,y. By calculating a single point instead of the entire bitmap at once there is no visible performance slowdown.
Review URL: https://codereview.appspot.com/6350098
git-svn-id: http://skia.googlecode.com/svn/trunk@4565 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/debugger/QT/SkSettingsWidget.cpp b/debugger/QT/SkSettingsWidget.cpp
index 117e7bf..5b5236a 100644
--- a/debugger/QT/SkSettingsWidget.cpp
+++ b/debugger/QT/SkSettingsWidget.cpp
@@ -19,6 +19,7 @@
, fVisibleOff(&fVisibleFrame)
, fCommandLayout(&fCommandFrame)
, fCurrentCommandBox(&fCommandFrame)
+ , fCommandHitBox(&fCommandFrame)
, fCommandCheckBox(&fCommandFrame)
, fZoomBox(&fZoomFrame)
, fZoomLayout(&fZoomFrame)
@@ -65,10 +66,24 @@
fCurrentCommandLayout.addWidget(&fCurrentCommandLabel);
fCurrentCommandLayout.addWidget(&fCurrentCommandBox);
+ fCommandHitLabel.setText("Command HitBox: ");
+ fCommandHitLabel.setMinimumWidth(178);
+ fCommandHitLabel.setMaximumWidth(178);
+ fCommandHitBox.setText("0");
+ fCommandHitBox.setMinimumSize(QSize(50,25));
+ fCommandHitBox.setMaximumSize(QSize(50,25));
+ fCommandHitBox.setAlignment(Qt::AlignRight);
+ fCommandHitLayout.setSpacing(0);
+ fCommandHitLayout.setContentsMargins(0,0,0,0);
+ fCommandHitLayout.setAlignment(Qt::AlignLeft);
+ fCommandHitLayout.addWidget(&fCommandHitLabel);
+ fCommandHitLayout.addWidget(&fCommandHitBox);
+
fCommandCheckBox.setText("Pause");
fCommandLayout.setSpacing(6);
fCommandLayout.setContentsMargins(11,11,11,11);
fCommandLayout.addLayout(&fCurrentCommandLayout);
+ fCommandLayout.addLayout(&fCommandHitLayout);
fCommandLayout.addWidget(&fCommandCheckBox);
// Zoom Info
@@ -93,7 +108,7 @@
fVerticalLayout.addWidget(&fCommandFrame);
fVerticalLayout.addWidget(&fZoomFrame);
- //this->setDisabled(true);
+ this->setDisabled(true);
}
SkSettingsWidget::~SkSettingsWidget() {}
@@ -103,6 +118,10 @@
fCurrentCommandBox.setText(QString::number(newCommand));
}
+void SkSettingsWidget::updateHit(int newHit) {
+ fCommandHitBox.setText(QString::number(newHit));
+}
+
QCheckBox* SkSettingsWidget::getCommandCheckBox() {
return &fCommandCheckBox;
}