blob: fdb99d1043180e5dad738fc3deb3fefaddd859af [file] [log] [blame]
chudy@google.com902ebe52012-06-29 14:21:22 +00001
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.com7dcae672012-07-09 20:26:53 +000020#include <QLineEdit>
chudy@google.com902ebe52012-06-29 14:21:22 +000021
22/** \class SkSettingsWidget
23
24 The SettingsWidget contains multiple checkboxes and toggles for altering
25 the visibility.
26 */
27class SkSettingsWidget : public QWidget {
28 Q_OBJECT
29
30public:
31 /**
32 Constructs a widget with the specified parent for layout purposes.
33 @param parent The parent container of this widget
34 */
chudy@google.com2d537a12012-07-31 12:49:52 +000035 SkSettingsWidget();
chudy@google.com902ebe52012-06-29 14:21:22 +000036
chudy@google.com7dcae672012-07-09 20:26:53 +000037 void setZoomText(int scaleFactor);
38
chudy@google.com7dcae672012-07-09 20:26:53 +000039 QRadioButton* getVisibilityButton();
40
chudy@google.comea5488b2012-07-26 19:38:22 +000041 QCheckBox* getGLCheckBox() {
42 return &fGLCheckBox;
43 }
44
45 QCheckBox* getRasterCheckBox() {
46 return &fRasterCheckBox;
47 }
48
chudy@google.com7dcae672012-07-09 20:26:53 +000049private slots:
50 void updateCommand(int newCommand);
chudy@google.come606d6e2012-07-12 14:31:25 +000051 void updateHit(int newHit);
chudy@google.com7dcae672012-07-09 20:26:53 +000052
53signals:
54 void scrollingPreferences(bool isStickyActivate);
55 void showStyle(bool isSingleCommand);
56 void visibilityFilter(bool isEnabled);
57
chudy@google.com902ebe52012-06-29 14:21:22 +000058private:
chudy@google.com7dcae672012-07-09 20:26:53 +000059 QVBoxLayout mainFrameLayout;
60 QFrame mainFrame;
61 QVBoxLayout fVerticalLayout;
chudy@google.com902ebe52012-06-29 14:21:22 +000062
chudy@google.com7dcae672012-07-09 20:26:53 +000063 QLabel fVisibileText;
64 QFrame fVisibleFrame;
65 QVBoxLayout fVisibleFrameLayout;
66 QRadioButton fVisibleOn;
67 QRadioButton fVisibleOff;
chudy@google.com902ebe52012-06-29 14:21:22 +000068
chudy@google.com7dcae672012-07-09 20:26:53 +000069 QLabel fCommandToggle;
70 QFrame fCommandFrame;
71 QVBoxLayout fCommandLayout;
chudy@google.com902ebe52012-06-29 14:21:22 +000072
chudy@google.com2d537a12012-07-31 12:49:52 +000073 QHBoxLayout fCurrentCommandLayout;
chudy@google.com7dcae672012-07-09 20:26:53 +000074 QLabel fCurrentCommandLabel;
chudy@google.come606d6e2012-07-12 14:31:25 +000075 QLineEdit fCurrentCommandBox;
chudy@google.com902ebe52012-06-29 14:21:22 +000076
chudy@google.com2d537a12012-07-31 12:49:52 +000077 QHBoxLayout fCommandHitLayout;
chudy@google.come606d6e2012-07-12 14:31:25 +000078 QLabel fCommandHitLabel;
79 QLineEdit fCommandHitBox;
chudy@google.come606d6e2012-07-12 14:31:25 +000080
chudy@google.comea5488b2012-07-26 19:38:22 +000081 QFrame fCanvasFrame;
82 QVBoxLayout fCanvasLayout;
chudy@google.com2d537a12012-07-31 12:49:52 +000083 QLabel fCanvasToggle;
chudy@google.comea5488b2012-07-26 19:38:22 +000084
85 QHBoxLayout fRasterLayout;
86 QLabel fRasterLabel;
87 QCheckBox fRasterCheckBox;
88
89 QHBoxLayout fGLLayout;
90 QLabel fGLLabel;
91 QCheckBox fGLCheckBox;
92
chudy@google.com7dcae672012-07-09 20:26:53 +000093 QFrame fZoomFrame;
chudy@google.com7dcae672012-07-09 20:26:53 +000094 QHBoxLayout fZoomLayout;
chudy@google.com2d537a12012-07-31 12:49:52 +000095 QLabel fZoomSetting;
96 QLineEdit fZoomBox;
chudy@google.com902ebe52012-06-29 14:21:22 +000097};
98
99#endif /* SKSETTINGSWIDGET_H_ */