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); |
| 46 | |
| 47 | signals: |
| 48 | void scrollingPreferences(bool isStickyActivate); |
| 49 | void showStyle(bool isSingleCommand); |
| 50 | void visibilityFilter(bool isEnabled); |
| 51 | |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 52 | private: |
chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame^] | 53 | QVBoxLayout mainFrameLayout; |
| 54 | QFrame mainFrame; |
| 55 | QVBoxLayout fVerticalLayout; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 56 | |
chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame^] | 57 | QLabel fVisibileText; |
| 58 | QFrame fVisibleFrame; |
| 59 | QVBoxLayout fVisibleFrameLayout; |
| 60 | QRadioButton fVisibleOn; |
| 61 | QRadioButton fVisibleOff; |
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 fCommandToggle; |
| 64 | QFrame fCommandFrame; |
| 65 | QVBoxLayout fCommandLayout; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 66 | |
chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame^] | 67 | QLineEdit fCurrentCommandBox; |
| 68 | QLabel fCurrentCommandLabel; |
| 69 | QHBoxLayout fCurrentCommandLayout; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 70 | |
chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame^] | 71 | QCheckBox fCommandCheckBox; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 72 | |
chudy@google.com | 7dcae67 | 2012-07-09 20:26:53 +0000 | [diff] [blame^] | 73 | QLabel fZoomSetting; |
| 74 | QFrame fZoomFrame; |
| 75 | QLineEdit fZoomBox; |
| 76 | QHBoxLayout fZoomLayout; |
chudy@google.com | 902ebe5 | 2012-06-29 14:21:22 +0000 | [diff] [blame] | 77 | }; |
| 78 | |
| 79 | #endif /* SKSETTINGSWIDGET_H_ */ |