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 | */ |
| 35 | SkSettingsWidget(QWidget *parent = NULL); |
| 36 | ~SkSettingsWidget(); |
| 37 | |
chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame] | 38 | void setZoomText(int scaleFactor); |
| 39 | |
| 40 | QCheckBox* getCommandCheckBox(); |
| 41 | |
| 42 | QRadioButton* getVisibilityButton(); |
| 43 | |
| 44 | private slots: |
| 45 | void updateCommand(int newCommand); |
chudy@google.com | e606d6e | 2012-07-12 14:31:25 +0000 | [diff] [blame^] | 46 | void updateHit(int newHit); |
chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame] | 47 | |
| 48 | signals: |
| 49 | void scrollingPreferences(bool isStickyActivate); |
| 50 | void showStyle(bool isSingleCommand); |
| 51 | void visibilityFilter(bool isEnabled); |
| 52 | |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 53 | private: |
chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame] | 54 | QVBoxLayout mainFrameLayout; |
| 55 | QFrame mainFrame; |
| 56 | QVBoxLayout fVerticalLayout; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 57 | |
chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame] | 58 | QLabel fVisibileText; |
| 59 | QFrame fVisibleFrame; |
| 60 | QVBoxLayout fVisibleFrameLayout; |
| 61 | QRadioButton fVisibleOn; |
| 62 | QRadioButton fVisibleOff; |
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 fCommandToggle; |
| 65 | QFrame fCommandFrame; |
| 66 | QVBoxLayout fCommandLayout; |
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 fCurrentCommandLabel; |
chudy@google.com | e606d6e | 2012-07-12 14:31:25 +0000 | [diff] [blame^] | 69 | QLineEdit fCurrentCommandBox; |
chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame] | 70 | QHBoxLayout fCurrentCommandLayout; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 71 | |
chudy@google.com | e606d6e | 2012-07-12 14:31:25 +0000 | [diff] [blame^] | 72 | QLabel fCommandHitLabel; |
| 73 | QLineEdit fCommandHitBox; |
| 74 | QHBoxLayout fCommandHitLayout; |
| 75 | |
chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame] | 76 | QCheckBox fCommandCheckBox; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 77 | |
chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame] | 78 | QLabel fZoomSetting; |
| 79 | QFrame fZoomFrame; |
| 80 | QLineEdit fZoomBox; |
| 81 | QHBoxLayout fZoomLayout; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 82 | }; |
| 83 | |
| 84 | #endif /* SKSETTINGSWIDGET_H_ */ |