blob: 73cd6e1bc9812c6d74ab6512dd1524ca8eab3107 [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
bungeman@google.come8cc6e82013-01-17 16:30:56 +000037 /** Sets the displayed user zoom level. A scale of 1.0 represents no zoom. */
38 void setZoomText(float scale);
chudy@google.com7dcae672012-07-09 20:26:53 +000039
chudy@google.com7dcae672012-07-09 20:26:53 +000040 QRadioButton* getVisibilityButton();
41
chudy@google.comea5488b2012-07-26 19:38:22 +000042 QCheckBox* getGLCheckBox() {
43 return &fGLCheckBox;
44 }
45
46 QCheckBox* getRasterCheckBox() {
47 return &fRasterCheckBox;
48 }
49
robertphillips@google.comf4741c12013-02-06 20:13:54 +000050 QCheckBox* getOverdrawVizCheckBox() {
51 return &fOverdrawVizCheckBox;
52 }
53
chudy@google.com7dcae672012-07-09 20:26:53 +000054private slots:
55 void updateCommand(int newCommand);
chudy@google.come606d6e2012-07-12 14:31:25 +000056 void updateHit(int newHit);
chudy@google.com7dcae672012-07-09 20:26:53 +000057
58signals:
59 void scrollingPreferences(bool isStickyActivate);
60 void showStyle(bool isSingleCommand);
61 void visibilityFilter(bool isEnabled);
62
chudy@google.com902ebe52012-06-29 14:21:22 +000063private:
chudy@google.com7dcae672012-07-09 20:26:53 +000064 QVBoxLayout mainFrameLayout;
65 QFrame mainFrame;
66 QVBoxLayout fVerticalLayout;
chudy@google.com902ebe52012-06-29 14:21:22 +000067
chudy@google.com7dcae672012-07-09 20:26:53 +000068 QLabel fVisibileText;
69 QFrame fVisibleFrame;
70 QVBoxLayout fVisibleFrameLayout;
71 QRadioButton fVisibleOn;
72 QRadioButton fVisibleOff;
chudy@google.com902ebe52012-06-29 14:21:22 +000073
chudy@google.com7dcae672012-07-09 20:26:53 +000074 QLabel fCommandToggle;
75 QFrame fCommandFrame;
76 QVBoxLayout fCommandLayout;
chudy@google.com902ebe52012-06-29 14:21:22 +000077
chudy@google.com2d537a12012-07-31 12:49:52 +000078 QHBoxLayout fCurrentCommandLayout;
chudy@google.com7dcae672012-07-09 20:26:53 +000079 QLabel fCurrentCommandLabel;
chudy@google.come606d6e2012-07-12 14:31:25 +000080 QLineEdit fCurrentCommandBox;
chudy@google.com902ebe52012-06-29 14:21:22 +000081
chudy@google.com2d537a12012-07-31 12:49:52 +000082 QHBoxLayout fCommandHitLayout;
chudy@google.come606d6e2012-07-12 14:31:25 +000083 QLabel fCommandHitLabel;
84 QLineEdit fCommandHitBox;
chudy@google.come606d6e2012-07-12 14:31:25 +000085
chudy@google.comea5488b2012-07-26 19:38:22 +000086 QFrame fCanvasFrame;
87 QVBoxLayout fCanvasLayout;
chudy@google.com2d537a12012-07-31 12:49:52 +000088 QLabel fCanvasToggle;
chudy@google.comea5488b2012-07-26 19:38:22 +000089
90 QHBoxLayout fRasterLayout;
91 QLabel fRasterLabel;
92 QCheckBox fRasterCheckBox;
93
robertphillips@google.comf4741c12013-02-06 20:13:54 +000094 QHBoxLayout fOverdrawVizLayout;
95 QLabel fOverdrawVizLabel;
96 QCheckBox fOverdrawVizCheckBox;
97
chudy@google.comea5488b2012-07-26 19:38:22 +000098 QHBoxLayout fGLLayout;
99 QLabel fGLLabel;
100 QCheckBox fGLCheckBox;
101
chudy@google.com7dcae672012-07-09 20:26:53 +0000102 QFrame fZoomFrame;
chudy@google.com7dcae672012-07-09 20:26:53 +0000103 QHBoxLayout fZoomLayout;
chudy@google.com2d537a12012-07-31 12:49:52 +0000104 QLabel fZoomSetting;
105 QLineEdit fZoomBox;
chudy@google.com902ebe52012-06-29 14:21:22 +0000106};
107
108#endif /* SKSETTINGSWIDGET_H_ */