blob: 1f7552721df960f7d0d6440dee61164b7ea27ade [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
chudy@google.com7dcae672012-07-09 20:26:53 +000050private slots:
51 void updateCommand(int newCommand);
chudy@google.come606d6e2012-07-12 14:31:25 +000052 void updateHit(int newHit);
chudy@google.com7dcae672012-07-09 20:26:53 +000053
54signals:
55 void scrollingPreferences(bool isStickyActivate);
56 void showStyle(bool isSingleCommand);
57 void visibilityFilter(bool isEnabled);
58
chudy@google.com902ebe52012-06-29 14:21:22 +000059private:
chudy@google.com7dcae672012-07-09 20:26:53 +000060 QVBoxLayout mainFrameLayout;
61 QFrame mainFrame;
62 QVBoxLayout fVerticalLayout;
chudy@google.com902ebe52012-06-29 14:21:22 +000063
chudy@google.com7dcae672012-07-09 20:26:53 +000064 QLabel fVisibileText;
65 QFrame fVisibleFrame;
66 QVBoxLayout fVisibleFrameLayout;
67 QRadioButton fVisibleOn;
68 QRadioButton fVisibleOff;
chudy@google.com902ebe52012-06-29 14:21:22 +000069
chudy@google.com7dcae672012-07-09 20:26:53 +000070 QLabel fCommandToggle;
71 QFrame fCommandFrame;
72 QVBoxLayout fCommandLayout;
chudy@google.com902ebe52012-06-29 14:21:22 +000073
chudy@google.com2d537a12012-07-31 12:49:52 +000074 QHBoxLayout fCurrentCommandLayout;
chudy@google.com7dcae672012-07-09 20:26:53 +000075 QLabel fCurrentCommandLabel;
chudy@google.come606d6e2012-07-12 14:31:25 +000076 QLineEdit fCurrentCommandBox;
chudy@google.com902ebe52012-06-29 14:21:22 +000077
chudy@google.com2d537a12012-07-31 12:49:52 +000078 QHBoxLayout fCommandHitLayout;
chudy@google.come606d6e2012-07-12 14:31:25 +000079 QLabel fCommandHitLabel;
80 QLineEdit fCommandHitBox;
chudy@google.come606d6e2012-07-12 14:31:25 +000081
chudy@google.comea5488b2012-07-26 19:38:22 +000082 QFrame fCanvasFrame;
83 QVBoxLayout fCanvasLayout;
chudy@google.com2d537a12012-07-31 12:49:52 +000084 QLabel fCanvasToggle;
chudy@google.comea5488b2012-07-26 19:38:22 +000085
86 QHBoxLayout fRasterLayout;
87 QLabel fRasterLabel;
88 QCheckBox fRasterCheckBox;
89
90 QHBoxLayout fGLLayout;
91 QLabel fGLLabel;
92 QCheckBox fGLCheckBox;
93
chudy@google.com7dcae672012-07-09 20:26:53 +000094 QFrame fZoomFrame;
chudy@google.com7dcae672012-07-09 20:26:53 +000095 QHBoxLayout fZoomLayout;
chudy@google.com2d537a12012-07-31 12:49:52 +000096 QLabel fZoomSetting;
97 QLineEdit fZoomBox;
chudy@google.com902ebe52012-06-29 14:21:22 +000098};
99
100#endif /* SKSETTINGSWIDGET_H_ */