chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 1 | |
| 2 | /* |
| 3 | * Copyright 2012 Google Inc. |
| 4 | * |
| 5 | * Use of this source code is governed by a BSD-style license that can be |
| 6 | * found in the LICENSE file. |
| 7 | */ |
| 8 | |
| 9 | |
| 10 | #ifndef SKSETTINGSWIDGET_H_ |
| 11 | #define SKSETTINGSWIDGET_H_ |
| 12 | |
| 13 | #include <QWidget> |
| 14 | #include <QHBoxLayout> |
| 15 | #include <QTextEdit> |
| 16 | #include <QFrame> |
| 17 | #include <QLabel> |
| 18 | #include <QRadioButton> |
| 19 | #include <QCheckBox> |
chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame] | 20 | #include <QLineEdit> |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 21 | |
| 22 | /** \class SkSettingsWidget |
| 23 | |
| 24 | The SettingsWidget contains multiple checkboxes and toggles for altering |
| 25 | the visibility. |
| 26 | */ |
| 27 | class SkSettingsWidget : public QWidget { |
| 28 | Q_OBJECT |
| 29 | |
| 30 | public: |
| 31 | /** |
| 32 | Constructs a widget with the specified parent for layout purposes. |
| 33 | @param parent The parent container of this widget |
| 34 | */ |
chudy@google.com | 2d537a1 | 2012-07-31 12:49:52 +0000 | [diff] [blame] | 35 | SkSettingsWidget(); |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 36 | |
chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame] | 37 | void setZoomText(int scaleFactor); |
| 38 | |
chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame] | 39 | QRadioButton* getVisibilityButton(); |
| 40 | |
chudy@google.com | ea5488b | 2012-07-26 19:38:22 +0000 | [diff] [blame] | 41 | QCheckBox* getGLCheckBox() { |
| 42 | return &fGLCheckBox; |
| 43 | } |
| 44 | |
| 45 | QCheckBox* getRasterCheckBox() { |
| 46 | return &fRasterCheckBox; |
| 47 | } |
| 48 | |
chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame] | 49 | private slots: |
| 50 | void updateCommand(int newCommand); |
chudy@google.com | e606d6e | 2012-07-12 14:31:25 +0000 | [diff] [blame] | 51 | void updateHit(int newHit); |
chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame] | 52 | |
| 53 | signals: |
| 54 | void scrollingPreferences(bool isStickyActivate); |
| 55 | void showStyle(bool isSingleCommand); |
| 56 | void visibilityFilter(bool isEnabled); |
| 57 | |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 58 | private: |
chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame] | 59 | QVBoxLayout mainFrameLayout; |
| 60 | QFrame mainFrame; |
| 61 | QVBoxLayout fVerticalLayout; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 62 | |
chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame] | 63 | QLabel fVisibileText; |
| 64 | QFrame fVisibleFrame; |
| 65 | QVBoxLayout fVisibleFrameLayout; |
| 66 | QRadioButton fVisibleOn; |
| 67 | QRadioButton fVisibleOff; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 68 | |
chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame] | 69 | QLabel fCommandToggle; |
| 70 | QFrame fCommandFrame; |
| 71 | QVBoxLayout fCommandLayout; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 72 | |
chudy@google.com | 2d537a1 | 2012-07-31 12:49:52 +0000 | [diff] [blame] | 73 | QHBoxLayout fCurrentCommandLayout; |
chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame] | 74 | QLabel fCurrentCommandLabel; |
chudy@google.com | e606d6e | 2012-07-12 14:31:25 +0000 | [diff] [blame] | 75 | QLineEdit fCurrentCommandBox; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 76 | |
chudy@google.com | 2d537a1 | 2012-07-31 12:49:52 +0000 | [diff] [blame] | 77 | QHBoxLayout fCommandHitLayout; |
chudy@google.com | e606d6e | 2012-07-12 14:31:25 +0000 | [diff] [blame] | 78 | QLabel fCommandHitLabel; |
| 79 | QLineEdit fCommandHitBox; |
chudy@google.com | e606d6e | 2012-07-12 14:31:25 +0000 | [diff] [blame] | 80 | |
chudy@google.com | ea5488b | 2012-07-26 19:38:22 +0000 | [diff] [blame] | 81 | QFrame fCanvasFrame; |
| 82 | QVBoxLayout fCanvasLayout; |
chudy@google.com | 2d537a1 | 2012-07-31 12:49:52 +0000 | [diff] [blame] | 83 | QLabel fCanvasToggle; |
chudy@google.com | ea5488b | 2012-07-26 19:38:22 +0000 | [diff] [blame] | 84 | |
| 85 | QHBoxLayout fRasterLayout; |
| 86 | QLabel fRasterLabel; |
| 87 | QCheckBox fRasterCheckBox; |
| 88 | |
| 89 | QHBoxLayout fGLLayout; |
| 90 | QLabel fGLLabel; |
| 91 | QCheckBox fGLCheckBox; |
| 92 | |
chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame] | 93 | QFrame fZoomFrame; |
chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame] | 94 | QHBoxLayout fZoomLayout; |
chudy@google.com | 2d537a1 | 2012-07-31 12:49:52 +0000 | [diff] [blame] | 95 | QLabel fZoomSetting; |
| 96 | QLineEdit fZoomBox; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 97 | }; |
| 98 | |
| 99 | #endif /* SKSETTINGSWIDGET_H_ */ |