Chromium Code Reviews| Index: debugger/QT/SkSettingsWidget.h |
| diff --git a/debugger/QT/SkSettingsWidget.h b/debugger/QT/SkSettingsWidget.h |
| index fc8fda7c6efe4828131ece3a664208e80f7705d8..ef5327dc93ea106f497c462fa56658a07571833b 100644 |
| --- a/debugger/QT/SkSettingsWidget.h |
| +++ b/debugger/QT/SkSettingsWidget.h |
| @@ -16,9 +16,9 @@ |
| #include <QFrame> |
| #include <QGroupBox> |
| #include <QLabel> |
| -#include <QRadioButton> |
| #include <QCheckBox> |
| #include <QLineEdit> |
| +#include <QComboBox> |
| #include "SkPaint.h" |
| @@ -40,7 +40,9 @@ public: |
| /** Sets the displayed user zoom level. A scale of 1.0 represents no zoom. */ |
| void setZoomText(float scale); |
|
robertphillips
2013/11/21 12:52:47
const?
|
| - QRadioButton* getVisibilityButton(); |
| + bool getVisibilityFilter() { |
| + return fVisibilityCombo.itemData(fVisibilityCombo.currentIndex()).toBool(); |
| + } |
| #if SK_SUPPORT_GPU |
| bool isGLActive() { |
| @@ -48,33 +50,16 @@ public: |
| } |
|
robertphillips
2013/11/21 12:52:47
const?
|
| int getGLSampleCount() { |
| - if (fGLMSAA4On.isChecked()) { |
| - return 4; |
| - } else if (fGLMSAA16On.isChecked()) { |
| - return 16; |
| - } |
| - return 0; |
| + return fGLMSAACombo.itemData(fGLMSAACombo.currentIndex()).toInt(); |
| } |
| #endif |
|
robertphillips
2013/11/21 12:52:47
const?
|
| bool getFilterOverride(SkPaint::FilterLevel* filterLevel) { |
| - if (fFilterDefault.isChecked()) { |
| - *filterLevel = SkPaint::kNone_FilterLevel; |
| - return false; |
| - } |
| - |
| - if (fFilterNone.isChecked()) { |
| - *filterLevel = SkPaint::kNone_FilterLevel; |
| - } else if (fFilterLow.isChecked()) { |
| - *filterLevel = SkPaint::kLow_FilterLevel; |
| - } else if (fFilterMed.isChecked()) { |
| - *filterLevel = SkPaint::kMedium_FilterLevel; |
| - } else { |
| - *filterLevel = SkPaint::kHigh_FilterLevel; |
| - } |
| - |
| - return true; |
| + int index = fFilterCombo.currentIndex(); |
| + *filterLevel = (SkPaint::FilterLevel)fFilterCombo.itemData(index).toUInt(); |
| + |
| + return index > 0; |
| } |
| QCheckBox* getRasterCheckBox() { |
| @@ -92,7 +77,7 @@ private slots: |
| signals: |
| void scrollingPreferences(bool isStickyActivate); |
| void showStyle(bool isSingleCommand); |
| - void visibilityFilter(bool isEnabled); |
| + void visibilityFilterChanged(); |
| void texFilterSettingsChanged(); |
| #if SK_SUPPORT_GPU |
| void glSettingsChanged(); |
| @@ -103,11 +88,10 @@ private: |
| QFrame mainFrame; |
| QVBoxLayout fVerticalLayout; |
| - QLabel fVisibileText; |
| + QLabel fVisibleText; |
| QFrame fVisibleFrame; |
| QVBoxLayout fVisibleFrameLayout; |
| - QRadioButton fVisibleOn; |
| - QRadioButton fVisibleOff; |
| + QComboBox fVisibilityCombo; |
| QLabel fCommandToggle; |
| QFrame fCommandFrame; |
| @@ -139,19 +123,13 @@ private: |
| QCheckBox fGLCheckBox; |
| QGroupBox fGLMSAAButtonGroup; |
| QVBoxLayout fGLMSAALayout; |
| - QRadioButton fGLMSAAOff; |
| - QRadioButton fGLMSAA4On; |
| - QRadioButton fGLMSAA16On; |
| + QComboBox fGLMSAACombo; |
| #endif |
| // for filtering group |
| QGroupBox fFilterButtonGroup; |
| + QComboBox fFilterCombo; |
| QVBoxLayout fFilterLayout; |
| - QRadioButton fFilterDefault; |
| - QRadioButton fFilterNone; |
| - QRadioButton fFilterLow; |
| - QRadioButton fFilterMed; |
| - QRadioButton fFilterHigh; |
| QFrame fZoomFrame; |
| QHBoxLayout fZoomLayout; |