blob: 1afb93ef8f51fb6ad1cd897ae350a0c67317bda4 [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 */
35 SkSettingsWidget(QWidget *parent = NULL);
36 ~SkSettingsWidget();
37
chudy@google.com7dcae672012-07-09 20:26:53 +000038 void setZoomText(int scaleFactor);
39
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.com7dcae672012-07-09 20:26:53 +000074 QLabel fCurrentCommandLabel;
chudy@google.come606d6e2012-07-12 14:31:25 +000075 QLineEdit fCurrentCommandBox;
chudy@google.com7dcae672012-07-09 20:26:53 +000076 QHBoxLayout fCurrentCommandLayout;
chudy@google.com902ebe52012-06-29 14:21:22 +000077
chudy@google.come606d6e2012-07-12 14:31:25 +000078 QLabel fCommandHitLabel;
79 QLineEdit fCommandHitBox;
80 QHBoxLayout fCommandHitLayout;
81
chudy@google.comea5488b2012-07-26 19:38:22 +000082 QLabel fCanvasToggle;
83 QFrame fCanvasFrame;
84 QVBoxLayout fCanvasLayout;
85
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 QLabel fZoomSetting;
95 QFrame fZoomFrame;
96 QLineEdit fZoomBox;
97 QHBoxLayout fZoomLayout;
chudy@google.com902ebe52012-06-29 14:21:22 +000098};
99
100#endif /* SKSETTINGSWIDGET_H_ */