Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(117)

Side by Side Diff: debugger/QT/SkSettingsWidget.h

Issue 27716003: Add texture filtering override to debugger (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Cleaned up Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « debugger/QT/SkDebuggerGUI.cpp ('k') | debugger/QT/SkSettingsWidget.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef SKSETTINGSWIDGET_H_ 10 #ifndef SKSETTINGSWIDGET_H_
11 #define SKSETTINGSWIDGET_H_ 11 #define SKSETTINGSWIDGET_H_
12 12
13 #include <QWidget> 13 #include <QWidget>
14 #include <QHBoxLayout> 14 #include <QHBoxLayout>
15 #include <QTextEdit> 15 #include <QTextEdit>
16 #include <QFrame> 16 #include <QFrame>
17 #include <QGroupBox> 17 #include <QGroupBox>
18 #include <QLabel> 18 #include <QLabel>
19 #include <QRadioButton> 19 #include <QRadioButton>
20 #include <QCheckBox> 20 #include <QCheckBox>
21 #include <QLineEdit> 21 #include <QLineEdit>
22 22
23 #include "SkPaint.h"
24
23 /** \class SkSettingsWidget 25 /** \class SkSettingsWidget
24 26
25 The SettingsWidget contains multiple checkboxes and toggles for altering 27 The SettingsWidget contains multiple checkboxes and toggles for altering
26 the visibility. 28 the visibility.
27 */ 29 */
28 class SkSettingsWidget : public QWidget { 30 class SkSettingsWidget : public QWidget {
29 Q_OBJECT 31 Q_OBJECT
30 32
31 public: 33 public:
32 /** 34 /**
(...skipping 16 matching lines...) Expand all
49 if (fGLMSAA4On.isChecked()) { 51 if (fGLMSAA4On.isChecked()) {
50 return 4; 52 return 4;
51 } else if (fGLMSAA16On.isChecked()) { 53 } else if (fGLMSAA16On.isChecked()) {
52 return 16; 54 return 16;
53 } 55 }
54 return 0; 56 return 0;
55 } 57 }
56 58
57 #endif 59 #endif
58 60
61 bool getFilterOverride(SkPaint::FilterLevel* filterLevel) {
62 if (fFilterDefault.isChecked()) {
63 *filterLevel = SkPaint::kNone_FilterLevel;
64 return false;
65 }
66
67 if (fFilterNone.isChecked()) {
68 *filterLevel = SkPaint::kNone_FilterLevel;
69 } else if (fFilterLow.isChecked()) {
70 *filterLevel = SkPaint::kLow_FilterLevel;
71 } else if (fFilterMed.isChecked()) {
72 *filterLevel = SkPaint::kMedium_FilterLevel;
73 } else {
74 *filterLevel = SkPaint::kHigh_FilterLevel;
75 }
76
77 return true;
78 }
79
59 QCheckBox* getRasterCheckBox() { 80 QCheckBox* getRasterCheckBox() {
60 return &fRasterCheckBox; 81 return &fRasterCheckBox;
61 } 82 }
62 83
63 QCheckBox* getOverdrawVizCheckBox() { 84 QCheckBox* getOverdrawVizCheckBox() {
64 return &fOverdrawVizCheckBox; 85 return &fOverdrawVizCheckBox;
65 } 86 }
66 87
67 private slots: 88 private slots:
68 void updateCommand(int newCommand); 89 void updateCommand(int newCommand);
69 void updateHit(int newHit); 90 void updateHit(int newHit);
70 91
71 signals: 92 signals:
72 void scrollingPreferences(bool isStickyActivate); 93 void scrollingPreferences(bool isStickyActivate);
73 void showStyle(bool isSingleCommand); 94 void showStyle(bool isSingleCommand);
74 void visibilityFilter(bool isEnabled); 95 void visibilityFilter(bool isEnabled);
96 void texFilterSettingsChanged();
75 #if SK_SUPPORT_GPU 97 #if SK_SUPPORT_GPU
76 void glSettingsChanged(); 98 void glSettingsChanged();
77 #endif 99 #endif
78 100
79 private: 101 private:
80 QVBoxLayout mainFrameLayout; 102 QVBoxLayout mainFrameLayout;
81 QFrame mainFrame; 103 QFrame mainFrame;
82 QVBoxLayout fVerticalLayout; 104 QVBoxLayout fVerticalLayout;
83 105
84 QLabel fVisibileText; 106 QLabel fVisibileText;
(...skipping 30 matching lines...) Expand all
115 QHBoxLayout fGLLayout; 137 QHBoxLayout fGLLayout;
116 QLabel fGLLabel; 138 QLabel fGLLabel;
117 QCheckBox fGLCheckBox; 139 QCheckBox fGLCheckBox;
118 QGroupBox fGLMSAAButtonGroup; 140 QGroupBox fGLMSAAButtonGroup;
119 QVBoxLayout fGLMSAALayout; 141 QVBoxLayout fGLMSAALayout;
120 QRadioButton fGLMSAAOff; 142 QRadioButton fGLMSAAOff;
121 QRadioButton fGLMSAA4On; 143 QRadioButton fGLMSAA4On;
122 QRadioButton fGLMSAA16On; 144 QRadioButton fGLMSAA16On;
123 #endif 145 #endif
124 146
147 // for filtering group
148 QGroupBox fFilterButtonGroup;
149 QVBoxLayout fFilterLayout;
150 QRadioButton fFilterDefault;
151 QRadioButton fFilterNone;
152 QRadioButton fFilterLow;
153 QRadioButton fFilterMed;
154 QRadioButton fFilterHigh;
155
125 QFrame fZoomFrame; 156 QFrame fZoomFrame;
126 QHBoxLayout fZoomLayout; 157 QHBoxLayout fZoomLayout;
127 QLabel fZoomSetting; 158 QLabel fZoomSetting;
128 QLineEdit fZoomBox; 159 QLineEdit fZoomBox;
129 }; 160 };
130 161
131 #endif /* SKSETTINGSWIDGET_H_ */ 162 #endif /* SKSETTINGSWIDGET_H_ */
OLDNEW
« no previous file with comments | « debugger/QT/SkDebuggerGUI.cpp ('k') | debugger/QT/SkSettingsWidget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698