| 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 #include "SkSettingsWidget.h" | 10 #include "SkSettingsWidget.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 | 84 |
| 85 fGLMSAAButtonGroup.setLayout(&fGLMSAALayout); | 85 fGLMSAAButtonGroup.setLayout(&fGLMSAALayout); |
| 86 | 86 |
| 87 connect(&fGLCheckBox, SIGNAL(toggled(bool)), &fGLMSAAButtonGroup, SLOT(setEn
abled(bool))); | 87 connect(&fGLCheckBox, SIGNAL(toggled(bool)), &fGLMSAAButtonGroup, SLOT(setEn
abled(bool))); |
| 88 connect(&fGLCheckBox, SIGNAL(toggled(bool)), this, SIGNAL(glSettingsChanged(
))); | 88 connect(&fGLCheckBox, SIGNAL(toggled(bool)), this, SIGNAL(glSettingsChanged(
))); |
| 89 connect(&fGLMSAAOff, SIGNAL(toggled(bool)), this, SIGNAL(glSettingsChanged()
)); | 89 connect(&fGLMSAAOff, SIGNAL(toggled(bool)), this, SIGNAL(glSettingsChanged()
)); |
| 90 connect(&fGLMSAA4On, SIGNAL(toggled(bool)), this, SIGNAL(glSettingsChanged()
)); | 90 connect(&fGLMSAA4On, SIGNAL(toggled(bool)), this, SIGNAL(glSettingsChanged()
)); |
| 91 connect(&fGLMSAA16On, SIGNAL(toggled(bool)), this, SIGNAL(glSettingsChanged(
))); | 91 connect(&fGLMSAA16On, SIGNAL(toggled(bool)), this, SIGNAL(glSettingsChanged(
))); |
| 92 #endif | 92 #endif |
| 93 | 93 |
| 94 { |
| 95 // set up filter buttons |
| 96 fFilterButtonGroup.setTitle("Filtering"); |
| 97 fFilterButtonGroup.setMinimumWidth(178); |
| 98 fFilterButtonGroup.setMaximumWidth(178); |
| 99 |
| 100 fFilterDefault.setText("As encoded"); |
| 101 fFilterDefault.setChecked(true); |
| 102 fFilterNone.setText("None"); |
| 103 fFilterLow.setText("Low"); |
| 104 fFilterMed.setText("Med"); |
| 105 fFilterHigh.setText("High"); |
| 106 |
| 107 fFilterLayout.addWidget(&fFilterDefault); |
| 108 fFilterLayout.addWidget(&fFilterNone); |
| 109 fFilterLayout.addWidget(&fFilterLow); |
| 110 fFilterLayout.addWidget(&fFilterMed); |
| 111 fFilterLayout.addWidget(&fFilterHigh); |
| 112 |
| 113 fFilterButtonGroup.setLayout(&fFilterLayout); |
| 114 |
| 115 connect(&fFilterDefault, SIGNAL(toggled(bool)), this, SIGNAL(texFilterSe
ttingsChanged())); |
| 116 connect(&fFilterNone, SIGNAL(toggled(bool)), this, SIGNAL(texFilterSe
ttingsChanged())); |
| 117 connect(&fFilterLow, SIGNAL(toggled(bool)), this, SIGNAL(texFilterSe
ttingsChanged())); |
| 118 connect(&fFilterMed, SIGNAL(toggled(bool)), this, SIGNAL(texFilterSe
ttingsChanged())); |
| 119 connect(&fFilterHigh, SIGNAL(toggled(bool)), this, SIGNAL(texFilterSe
ttingsChanged())); |
| 120 } |
| 121 |
| 94 fRasterLayout.addWidget(&fRasterLabel); | 122 fRasterLayout.addWidget(&fRasterLabel); |
| 95 fRasterLayout.addWidget(&fRasterCheckBox); | 123 fRasterLayout.addWidget(&fRasterCheckBox); |
| 96 | 124 |
| 97 fOverdrawVizLayout.addWidget(&fOverdrawVizLabel); | 125 fOverdrawVizLayout.addWidget(&fOverdrawVizLabel); |
| 98 fOverdrawVizLayout.addWidget(&fOverdrawVizCheckBox); | 126 fOverdrawVizLayout.addWidget(&fOverdrawVizCheckBox); |
| 99 | 127 |
| 100 #if SK_SUPPORT_GPU | 128 #if SK_SUPPORT_GPU |
| 101 fGLLayout.addWidget(&fGLLabel); | 129 fGLLayout.addWidget(&fGLLabel); |
| 102 fGLLayout.addWidget(&fGLCheckBox); | 130 fGLLayout.addWidget(&fGLCheckBox); |
| 103 #endif | 131 #endif |
| 104 | 132 |
| 105 fCanvasLayout.setSpacing(6); | 133 fCanvasLayout.setSpacing(6); |
| 106 fCanvasLayout.setContentsMargins(11,11,11,11); | 134 fCanvasLayout.setContentsMargins(11,11,11,11); |
| 107 fCanvasLayout.addLayout(&fRasterLayout); | 135 fCanvasLayout.addLayout(&fRasterLayout); |
| 108 fCanvasLayout.addLayout(&fOverdrawVizLayout); | 136 fCanvasLayout.addLayout(&fOverdrawVizLayout); |
| 109 #if SK_SUPPORT_GPU | 137 #if SK_SUPPORT_GPU |
| 110 fCanvasLayout.addLayout(&fGLLayout); | 138 fCanvasLayout.addLayout(&fGLLayout); |
| 111 fCanvasLayout.addWidget(&fGLMSAAButtonGroup); | 139 fCanvasLayout.addWidget(&fGLMSAAButtonGroup); |
| 112 #endif | 140 #endif |
| 141 fCanvasLayout.addWidget(&fFilterButtonGroup); |
| 113 | 142 |
| 114 // Command Toggle | 143 // Command Toggle |
| 115 fCommandToggle.setText("Command Scrolling Preferences"); | 144 fCommandToggle.setText("Command Scrolling Preferences"); |
| 116 fCommandFrame.setFrameShape(QFrame::StyledPanel); | 145 fCommandFrame.setFrameShape(QFrame::StyledPanel); |
| 117 fCommandFrame.setFrameShadow(QFrame::Raised); | 146 fCommandFrame.setFrameShadow(QFrame::Raised); |
| 118 | 147 |
| 119 fCurrentCommandLabel.setText("Current Command: "); | 148 fCurrentCommandLabel.setText("Current Command: "); |
| 120 fCurrentCommandLabel.setMinimumWidth(178); | 149 fCurrentCommandLabel.setMinimumWidth(178); |
| 121 fCurrentCommandLabel.setMaximumWidth(178); | 150 fCurrentCommandLabel.setMaximumWidth(178); |
| 122 fCurrentCommandBox.setText("0"); | 151 fCurrentCommandBox.setText("0"); |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 fCommandHitBox.setText(QString::number(newHit)); | 213 fCommandHitBox.setText(QString::number(newHit)); |
| 185 } | 214 } |
| 186 | 215 |
| 187 QRadioButton* SkSettingsWidget::getVisibilityButton() { | 216 QRadioButton* SkSettingsWidget::getVisibilityButton() { |
| 188 return &fVisibleOn; | 217 return &fVisibleOn; |
| 189 } | 218 } |
| 190 | 219 |
| 191 void SkSettingsWidget::setZoomText(float scale) { | 220 void SkSettingsWidget::setZoomText(float scale) { |
| 192 fZoomBox.setText(QString::number(scale*100, 'f', 0).append("%")); | 221 fZoomBox.setText(QString::number(scale*100, 'f', 0).append("%")); |
| 193 } | 222 } |
| OLD | NEW |