SkSettingsWidget.h revision 2d537a18f49cb492358c2b051f4786075dd9406c
1902ebe5eb41a350b766238b3b103c22fe9fc0fb5chudy@google.com
2902ebe5eb41a350b766238b3b103c22fe9fc0fb5chudy@google.com/*
3902ebe5eb41a350b766238b3b103c22fe9fc0fb5chudy@google.com * Copyright 2012 Google Inc.
4902ebe5eb41a350b766238b3b103c22fe9fc0fb5chudy@google.com *
5902ebe5eb41a350b766238b3b103c22fe9fc0fb5chudy@google.com * Use of this source code is governed by a BSD-style license that can be
6902ebe5eb41a350b766238b3b103c22fe9fc0fb5chudy@google.com * found in the LICENSE file.
7902ebe5eb41a350b766238b3b103c22fe9fc0fb5chudy@google.com */
8902ebe5eb41a350b766238b3b103c22fe9fc0fb5chudy@google.com
9902ebe5eb41a350b766238b3b103c22fe9fc0fb5chudy@google.com
10902ebe5eb41a350b766238b3b103c22fe9fc0fb5chudy@google.com#ifndef SKSETTINGSWIDGET_H_
11902ebe5eb41a350b766238b3b103c22fe9fc0fb5chudy@google.com#define SKSETTINGSWIDGET_H_
12902ebe5eb41a350b766238b3b103c22fe9fc0fb5chudy@google.com
13902ebe5eb41a350b766238b3b103c22fe9fc0fb5chudy@google.com#include <QWidget>
14902ebe5eb41a350b766238b3b103c22fe9fc0fb5chudy@google.com#include <QHBoxLayout>
15902ebe5eb41a350b766238b3b103c22fe9fc0fb5chudy@google.com#include <QTextEdit>
16902ebe5eb41a350b766238b3b103c22fe9fc0fb5chudy@google.com#include <QFrame>
17902ebe5eb41a350b766238b3b103c22fe9fc0fb5chudy@google.com#include <QLabel>
18902ebe5eb41a350b766238b3b103c22fe9fc0fb5chudy@google.com#include <QRadioButton>
19902ebe5eb41a350b766238b3b103c22fe9fc0fb5chudy@google.com#include <QCheckBox>
207dcae67cae277549accdd38d0496b72d00151239chudy@google.com#include <QLineEdit>
21902ebe5eb41a350b766238b3b103c22fe9fc0fb5chudy@google.com
22902ebe5eb41a350b766238b3b103c22fe9fc0fb5chudy@google.com/** \class SkSettingsWidget
23902ebe5eb41a350b766238b3b103c22fe9fc0fb5chudy@google.com
24902ebe5eb41a350b766238b3b103c22fe9fc0fb5chudy@google.com    The SettingsWidget contains multiple checkboxes and toggles for altering
25902ebe5eb41a350b766238b3b103c22fe9fc0fb5chudy@google.com    the visibility.
26902ebe5eb41a350b766238b3b103c22fe9fc0fb5chudy@google.com */
27902ebe5eb41a350b766238b3b103c22fe9fc0fb5chudy@google.comclass SkSettingsWidget : public QWidget {
28902ebe5eb41a350b766238b3b103c22fe9fc0fb5chudy@google.com    Q_OBJECT
29902ebe5eb41a350b766238b3b103c22fe9fc0fb5chudy@google.com
30902ebe5eb41a350b766238b3b103c22fe9fc0fb5chudy@google.compublic:
31902ebe5eb41a350b766238b3b103c22fe9fc0fb5chudy@google.com    /**
32902ebe5eb41a350b766238b3b103c22fe9fc0fb5chudy@google.com        Constructs a widget with the specified parent for layout purposes.
33902ebe5eb41a350b766238b3b103c22fe9fc0fb5chudy@google.com        @param parent  The parent container of this widget
34902ebe5eb41a350b766238b3b103c22fe9fc0fb5chudy@google.com     */
352d537a18f49cb492358c2b051f4786075dd9406cchudy@google.com    SkSettingsWidget();
36902ebe5eb41a350b766238b3b103c22fe9fc0fb5chudy@google.com
377dcae67cae277549accdd38d0496b72d00151239chudy@google.com    void setZoomText(int scaleFactor);
387dcae67cae277549accdd38d0496b72d00151239chudy@google.com
397dcae67cae277549accdd38d0496b72d00151239chudy@google.com    QRadioButton* getVisibilityButton();
407dcae67cae277549accdd38d0496b72d00151239chudy@google.com
41ea5488b9655fc7d71345c3a823de85f8b74e3279chudy@google.com    QCheckBox* getGLCheckBox() {
42ea5488b9655fc7d71345c3a823de85f8b74e3279chudy@google.com        return &fGLCheckBox;
43ea5488b9655fc7d71345c3a823de85f8b74e3279chudy@google.com    }
44ea5488b9655fc7d71345c3a823de85f8b74e3279chudy@google.com
45ea5488b9655fc7d71345c3a823de85f8b74e3279chudy@google.com    QCheckBox* getRasterCheckBox() {
46ea5488b9655fc7d71345c3a823de85f8b74e3279chudy@google.com        return &fRasterCheckBox;
47ea5488b9655fc7d71345c3a823de85f8b74e3279chudy@google.com    }
48ea5488b9655fc7d71345c3a823de85f8b74e3279chudy@google.com
497dcae67cae277549accdd38d0496b72d00151239chudy@google.comprivate slots:
507dcae67cae277549accdd38d0496b72d00151239chudy@google.com    void updateCommand(int newCommand);
51e606d6e210b17dd9dd582d4d3ec70acb4f3213d5chudy@google.com    void updateHit(int newHit);
527dcae67cae277549accdd38d0496b72d00151239chudy@google.com
537dcae67cae277549accdd38d0496b72d00151239chudy@google.comsignals:
547dcae67cae277549accdd38d0496b72d00151239chudy@google.com    void scrollingPreferences(bool isStickyActivate);
557dcae67cae277549accdd38d0496b72d00151239chudy@google.com    void showStyle(bool isSingleCommand);
567dcae67cae277549accdd38d0496b72d00151239chudy@google.com    void visibilityFilter(bool isEnabled);
577dcae67cae277549accdd38d0496b72d00151239chudy@google.com
58902ebe5eb41a350b766238b3b103c22fe9fc0fb5chudy@google.comprivate:
597dcae67cae277549accdd38d0496b72d00151239chudy@google.com    QVBoxLayout mainFrameLayout;
607dcae67cae277549accdd38d0496b72d00151239chudy@google.com    QFrame mainFrame;
617dcae67cae277549accdd38d0496b72d00151239chudy@google.com    QVBoxLayout fVerticalLayout;
62902ebe5eb41a350b766238b3b103c22fe9fc0fb5chudy@google.com
637dcae67cae277549accdd38d0496b72d00151239chudy@google.com    QLabel fVisibileText;
647dcae67cae277549accdd38d0496b72d00151239chudy@google.com    QFrame fVisibleFrame;
657dcae67cae277549accdd38d0496b72d00151239chudy@google.com    QVBoxLayout fVisibleFrameLayout;
667dcae67cae277549accdd38d0496b72d00151239chudy@google.com    QRadioButton fVisibleOn;
677dcae67cae277549accdd38d0496b72d00151239chudy@google.com    QRadioButton fVisibleOff;
68902ebe5eb41a350b766238b3b103c22fe9fc0fb5chudy@google.com
697dcae67cae277549accdd38d0496b72d00151239chudy@google.com    QLabel fCommandToggle;
707dcae67cae277549accdd38d0496b72d00151239chudy@google.com    QFrame fCommandFrame;
717dcae67cae277549accdd38d0496b72d00151239chudy@google.com    QVBoxLayout fCommandLayout;
72902ebe5eb41a350b766238b3b103c22fe9fc0fb5chudy@google.com
732d537a18f49cb492358c2b051f4786075dd9406cchudy@google.com    QHBoxLayout fCurrentCommandLayout;
747dcae67cae277549accdd38d0496b72d00151239chudy@google.com    QLabel fCurrentCommandLabel;
75e606d6e210b17dd9dd582d4d3ec70acb4f3213d5chudy@google.com    QLineEdit fCurrentCommandBox;
76902ebe5eb41a350b766238b3b103c22fe9fc0fb5chudy@google.com
772d537a18f49cb492358c2b051f4786075dd9406cchudy@google.com    QHBoxLayout fCommandHitLayout;
78e606d6e210b17dd9dd582d4d3ec70acb4f3213d5chudy@google.com    QLabel fCommandHitLabel;
79e606d6e210b17dd9dd582d4d3ec70acb4f3213d5chudy@google.com    QLineEdit fCommandHitBox;
80e606d6e210b17dd9dd582d4d3ec70acb4f3213d5chudy@google.com
81ea5488b9655fc7d71345c3a823de85f8b74e3279chudy@google.com    QFrame fCanvasFrame;
82ea5488b9655fc7d71345c3a823de85f8b74e3279chudy@google.com    QVBoxLayout fCanvasLayout;
832d537a18f49cb492358c2b051f4786075dd9406cchudy@google.com    QLabel fCanvasToggle;
84ea5488b9655fc7d71345c3a823de85f8b74e3279chudy@google.com
85ea5488b9655fc7d71345c3a823de85f8b74e3279chudy@google.com    QHBoxLayout fRasterLayout;
86ea5488b9655fc7d71345c3a823de85f8b74e3279chudy@google.com    QLabel fRasterLabel;
87ea5488b9655fc7d71345c3a823de85f8b74e3279chudy@google.com    QCheckBox fRasterCheckBox;
88ea5488b9655fc7d71345c3a823de85f8b74e3279chudy@google.com
89ea5488b9655fc7d71345c3a823de85f8b74e3279chudy@google.com    QHBoxLayout fGLLayout;
90ea5488b9655fc7d71345c3a823de85f8b74e3279chudy@google.com    QLabel fGLLabel;
91ea5488b9655fc7d71345c3a823de85f8b74e3279chudy@google.com    QCheckBox fGLCheckBox;
92ea5488b9655fc7d71345c3a823de85f8b74e3279chudy@google.com
937dcae67cae277549accdd38d0496b72d00151239chudy@google.com    QFrame fZoomFrame;
947dcae67cae277549accdd38d0496b72d00151239chudy@google.com    QHBoxLayout fZoomLayout;
952d537a18f49cb492358c2b051f4786075dd9406cchudy@google.com    QLabel fZoomSetting;
962d537a18f49cb492358c2b051f4786075dd9406cchudy@google.com    QLineEdit fZoomBox;
97902ebe5eb41a350b766238b3b103c22fe9fc0fb5chudy@google.com};
98902ebe5eb41a350b766238b3b103c22fe9fc0fb5chudy@google.com
99902ebe5eb41a350b766238b3b103c22fe9fc0fb5chudy@google.com#endif /* SKSETTINGSWIDGET_H_ */
100