blob: 839a331ae3784f4e7a974d998a3b1d9ae6b7d438 [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
40 QCheckBox* getCommandCheckBox();
41
42 QRadioButton* getVisibilityButton();
43
44private slots:
45 void updateCommand(int newCommand);
chudy@google.come606d6e2012-07-12 14:31:25 +000046 void updateHit(int newHit);
chudy@google.com7dcae672012-07-09 20:26:53 +000047
48signals:
49 void scrollingPreferences(bool isStickyActivate);
50 void showStyle(bool isSingleCommand);
51 void visibilityFilter(bool isEnabled);
52
chudy@google.com902ebe52012-06-29 14:21:22 +000053private:
chudy@google.com7dcae672012-07-09 20:26:53 +000054 QVBoxLayout mainFrameLayout;
55 QFrame mainFrame;
56 QVBoxLayout fVerticalLayout;
chudy@google.com902ebe52012-06-29 14:21:22 +000057
chudy@google.com7dcae672012-07-09 20:26:53 +000058 QLabel fVisibileText;
59 QFrame fVisibleFrame;
60 QVBoxLayout fVisibleFrameLayout;
61 QRadioButton fVisibleOn;
62 QRadioButton fVisibleOff;
chudy@google.com902ebe52012-06-29 14:21:22 +000063
chudy@google.com7dcae672012-07-09 20:26:53 +000064 QLabel fCommandToggle;
65 QFrame fCommandFrame;
66 QVBoxLayout fCommandLayout;
chudy@google.com902ebe52012-06-29 14:21:22 +000067
chudy@google.com7dcae672012-07-09 20:26:53 +000068 QLabel fCurrentCommandLabel;
chudy@google.come606d6e2012-07-12 14:31:25 +000069 QLineEdit fCurrentCommandBox;
chudy@google.com7dcae672012-07-09 20:26:53 +000070 QHBoxLayout fCurrentCommandLayout;
chudy@google.com902ebe52012-06-29 14:21:22 +000071
chudy@google.come606d6e2012-07-12 14:31:25 +000072 QLabel fCommandHitLabel;
73 QLineEdit fCommandHitBox;
74 QHBoxLayout fCommandHitLayout;
75
chudy@google.com7dcae672012-07-09 20:26:53 +000076 QCheckBox fCommandCheckBox;
chudy@google.com902ebe52012-06-29 14:21:22 +000077
chudy@google.com7dcae672012-07-09 20:26:53 +000078 QLabel fZoomSetting;
79 QFrame fZoomFrame;
80 QLineEdit fZoomBox;
81 QHBoxLayout fZoomLayout;
chudy@google.com902ebe52012-06-29 14:21:22 +000082};
83
84#endif /* SKSETTINGSWIDGET_H_ */