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 | |
chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame] | 50 | private slots: |
| 51 | void updateCommand(int newCommand); |
chudy@google.com | e606d6e | 2012-07-12 14:31:25 +0000 | [diff] [blame] | 52 | void updateHit(int newHit); |
chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame] | 53 | |
| 54 | signals: |
| 55 | void scrollingPreferences(bool isStickyActivate); |
| 56 | void showStyle(bool isSingleCommand); |
| 57 | void visibilityFilter(bool isEnabled); |
| 58 | |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 59 | private: |
chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame] | 60 | QVBoxLayout mainFrameLayout; |
| 61 | QFrame mainFrame; |
| 62 | QVBoxLayout fVerticalLayout; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 63 | |
chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame] | 64 | QLabel fVisibileText; |
| 65 | QFrame fVisibleFrame; |
| 66 | QVBoxLayout fVisibleFrameLayout; |
| 67 | QRadioButton fVisibleOn; |
| 68 | QRadioButton fVisibleOff; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 69 | |
chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame] | 70 | QLabel fCommandToggle; |
| 71 | QFrame fCommandFrame; |
| 72 | QVBoxLayout fCommandLayout; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 73 | |
chudy@google.com | 2d537a1 | 2012-07-31 12:49:52 +0000 | [diff] [blame] | 74 | QHBoxLayout fCurrentCommandLayout; |
chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame] | 75 | QLabel fCurrentCommandLabel; |
chudy@google.com | e606d6e | 2012-07-12 14:31:25 +0000 | [diff] [blame] | 76 | QLineEdit fCurrentCommandBox; |
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 fCommandHitLayout; |
chudy@google.com | e606d6e | 2012-07-12 14:31:25 +0000 | [diff] [blame] | 79 | QLabel fCommandHitLabel; |
| 80 | QLineEdit fCommandHitBox; |
chudy@google.com | e606d6e | 2012-07-12 14:31:25 +0000 | [diff] [blame] | 81 | |
chudy@google.com | ea5488b | 2012-07-26 19:38:22 +0000 | [diff] [blame] | 82 | QFrame fCanvasFrame; |
| 83 | QVBoxLayout fCanvasLayout; |
chudy@google.com | 2d537a1 | 2012-07-31 12:49:52 +0000 | [diff] [blame] | 84 | QLabel fCanvasToggle; |
chudy@google.com | ea5488b | 2012-07-26 19:38:22 +0000 | [diff] [blame] | 85 | |
| 86 | QHBoxLayout fRasterLayout; |
| 87 | QLabel fRasterLabel; |
| 88 | QCheckBox fRasterCheckBox; |
| 89 | |
| 90 | QHBoxLayout fGLLayout; |
| 91 | QLabel fGLLabel; |
| 92 | QCheckBox fGLCheckBox; |
| 93 | |
chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame] | 94 | QFrame fZoomFrame; |
chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame] | 95 | QHBoxLayout fZoomLayout; |
chudy@google.com | 2d537a1 | 2012-07-31 12:49:52 +0000 | [diff] [blame] | 96 | QLabel fZoomSetting; |
| 97 | QLineEdit fZoomBox; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 98 | }; |
| 99 | |
| 100 | #endif /* SKSETTINGSWIDGET_H_ */ |