| 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 | |
| bungeman@google.com | e8cc6e8 | 2013-01-17 16:30:56 +0000 | [diff] [blame] | 37 | /** Sets the displayed user zoom level. A scale of 1.0 represents no zoom. */ |
| 38 | void setZoomText(float scale); |
| chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame] | 39 | |
| chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame] | 40 | QRadioButton* getVisibilityButton(); |
| 41 | |
| chudy@google.com | ea5488b | 2012-07-26 19:38:22 +0000 | [diff] [blame] | 42 | QCheckBox* getGLCheckBox() { |
| 43 | return &fGLCheckBox; |
| 44 | } |
| 45 | |
| 46 | QCheckBox* getRasterCheckBox() { |
| 47 | return &fRasterCheckBox; |
| 48 | } |
| 49 | |
| robertphillips@google.com | f4741c1 | 2013-02-06 20:13:54 +0000 | [diff] [blame] | 50 | QCheckBox* getOverdrawVizCheckBox() { |
| 51 | return &fOverdrawVizCheckBox; |
| 52 | } |
| 53 | |
| chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame] | 54 | private slots: |
| 55 | void updateCommand(int newCommand); |
| chudy@google.com | e606d6e | 2012-07-12 14:31:25 +0000 | [diff] [blame] | 56 | void updateHit(int newHit); |
| chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame] | 57 | |
| 58 | signals: |
| 59 | void scrollingPreferences(bool isStickyActivate); |
| 60 | void showStyle(bool isSingleCommand); |
| 61 | void visibilityFilter(bool isEnabled); |
| 62 | |
| chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 63 | private: |
| chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame] | 64 | QVBoxLayout mainFrameLayout; |
| 65 | QFrame mainFrame; |
| 66 | QVBoxLayout fVerticalLayout; |
| chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 67 | |
| chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame] | 68 | QLabel fVisibileText; |
| 69 | QFrame fVisibleFrame; |
| 70 | QVBoxLayout fVisibleFrameLayout; |
| 71 | QRadioButton fVisibleOn; |
| 72 | QRadioButton fVisibleOff; |
| chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 73 | |
| chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame] | 74 | QLabel fCommandToggle; |
| 75 | QFrame fCommandFrame; |
| 76 | QVBoxLayout fCommandLayout; |
| chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 77 | |
| chudy@google.com | 2d537a1 | 2012-07-31 12:49:52 +0000 | [diff] [blame] | 78 | QHBoxLayout fCurrentCommandLayout; |
| chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame] | 79 | QLabel fCurrentCommandLabel; |
| chudy@google.com | e606d6e | 2012-07-12 14:31:25 +0000 | [diff] [blame] | 80 | QLineEdit fCurrentCommandBox; |
| chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 81 | |
| chudy@google.com | 2d537a1 | 2012-07-31 12:49:52 +0000 | [diff] [blame] | 82 | QHBoxLayout fCommandHitLayout; |
| chudy@google.com | e606d6e | 2012-07-12 14:31:25 +0000 | [diff] [blame] | 83 | QLabel fCommandHitLabel; |
| 84 | QLineEdit fCommandHitBox; |
| chudy@google.com | e606d6e | 2012-07-12 14:31:25 +0000 | [diff] [blame] | 85 | |
| chudy@google.com | ea5488b | 2012-07-26 19:38:22 +0000 | [diff] [blame] | 86 | QFrame fCanvasFrame; |
| 87 | QVBoxLayout fCanvasLayout; |
| chudy@google.com | 2d537a1 | 2012-07-31 12:49:52 +0000 | [diff] [blame] | 88 | QLabel fCanvasToggle; |
| chudy@google.com | ea5488b | 2012-07-26 19:38:22 +0000 | [diff] [blame] | 89 | |
| 90 | QHBoxLayout fRasterLayout; |
| 91 | QLabel fRasterLabel; |
| 92 | QCheckBox fRasterCheckBox; |
| 93 | |
| robertphillips@google.com | f4741c1 | 2013-02-06 20:13:54 +0000 | [diff] [blame] | 94 | QHBoxLayout fOverdrawVizLayout; |
| 95 | QLabel fOverdrawVizLabel; |
| 96 | QCheckBox fOverdrawVizCheckBox; |
| 97 | |
| chudy@google.com | ea5488b | 2012-07-26 19:38:22 +0000 | [diff] [blame] | 98 | QHBoxLayout fGLLayout; |
| 99 | QLabel fGLLabel; |
| 100 | QCheckBox fGLCheckBox; |
| 101 | |
| chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame] | 102 | QFrame fZoomFrame; |
| chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame] | 103 | QHBoxLayout fZoomLayout; |
| chudy@google.com | 2d537a1 | 2012-07-31 12:49:52 +0000 | [diff] [blame] | 104 | QLabel fZoomSetting; |
| 105 | QLineEdit fZoomBox; |
| chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 106 | }; |
| 107 | |
| 108 | #endif /* SKSETTINGSWIDGET_H_ */ |