2012-06-29 14:21:22 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Copyright 2012 Google Inc.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
|
|
* found in the LICENSE file.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef SKSETTINGSWIDGET_H_
|
|
|
|
#define SKSETTINGSWIDGET_H_
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
#include <QHBoxLayout>
|
|
|
|
#include <QTextEdit>
|
|
|
|
#include <QFrame>
|
|
|
|
#include <QLabel>
|
|
|
|
#include <QRadioButton>
|
|
|
|
#include <QCheckBox>
|
2012-07-09 20:26:53 +00:00
|
|
|
#include <QLineEdit>
|
2012-06-29 14:21:22 +00:00
|
|
|
|
|
|
|
/** \class SkSettingsWidget
|
|
|
|
|
|
|
|
The SettingsWidget contains multiple checkboxes and toggles for altering
|
|
|
|
the visibility.
|
|
|
|
*/
|
|
|
|
class SkSettingsWidget : public QWidget {
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
Constructs a widget with the specified parent for layout purposes.
|
|
|
|
@param parent The parent container of this widget
|
|
|
|
*/
|
2012-07-31 12:49:52 +00:00
|
|
|
SkSettingsWidget();
|
2012-06-29 14:21:22 +00:00
|
|
|
|
2013-01-17 16:30:56 +00:00
|
|
|
/** Sets the displayed user zoom level. A scale of 1.0 represents no zoom. */
|
|
|
|
void setZoomText(float scale);
|
2012-07-09 20:26:53 +00:00
|
|
|
|
|
|
|
QRadioButton* getVisibilityButton();
|
|
|
|
|
2012-07-26 19:38:22 +00:00
|
|
|
QCheckBox* getGLCheckBox() {
|
|
|
|
return &fGLCheckBox;
|
|
|
|
}
|
|
|
|
|
|
|
|
QCheckBox* getRasterCheckBox() {
|
|
|
|
return &fRasterCheckBox;
|
|
|
|
}
|
|
|
|
|
2013-02-06 20:13:54 +00:00
|
|
|
QCheckBox* getOverdrawVizCheckBox() {
|
|
|
|
return &fOverdrawVizCheckBox;
|
|
|
|
}
|
|
|
|
|
2012-07-09 20:26:53 +00:00
|
|
|
private slots:
|
|
|
|
void updateCommand(int newCommand);
|
2012-07-12 14:31:25 +00:00
|
|
|
void updateHit(int newHit);
|
2012-07-09 20:26:53 +00:00
|
|
|
|
|
|
|
signals:
|
|
|
|
void scrollingPreferences(bool isStickyActivate);
|
|
|
|
void showStyle(bool isSingleCommand);
|
|
|
|
void visibilityFilter(bool isEnabled);
|
|
|
|
|
2012-06-29 14:21:22 +00:00
|
|
|
private:
|
2012-07-09 20:26:53 +00:00
|
|
|
QVBoxLayout mainFrameLayout;
|
|
|
|
QFrame mainFrame;
|
|
|
|
QVBoxLayout fVerticalLayout;
|
2012-06-29 14:21:22 +00:00
|
|
|
|
2012-07-09 20:26:53 +00:00
|
|
|
QLabel fVisibileText;
|
|
|
|
QFrame fVisibleFrame;
|
|
|
|
QVBoxLayout fVisibleFrameLayout;
|
|
|
|
QRadioButton fVisibleOn;
|
|
|
|
QRadioButton fVisibleOff;
|
2012-06-29 14:21:22 +00:00
|
|
|
|
2012-07-09 20:26:53 +00:00
|
|
|
QLabel fCommandToggle;
|
|
|
|
QFrame fCommandFrame;
|
|
|
|
QVBoxLayout fCommandLayout;
|
2012-06-29 14:21:22 +00:00
|
|
|
|
2012-07-31 12:49:52 +00:00
|
|
|
QHBoxLayout fCurrentCommandLayout;
|
2012-07-09 20:26:53 +00:00
|
|
|
QLabel fCurrentCommandLabel;
|
2012-07-12 14:31:25 +00:00
|
|
|
QLineEdit fCurrentCommandBox;
|
2012-06-29 14:21:22 +00:00
|
|
|
|
2012-07-31 12:49:52 +00:00
|
|
|
QHBoxLayout fCommandHitLayout;
|
2012-07-12 14:31:25 +00:00
|
|
|
QLabel fCommandHitLabel;
|
|
|
|
QLineEdit fCommandHitBox;
|
|
|
|
|
2012-07-26 19:38:22 +00:00
|
|
|
QFrame fCanvasFrame;
|
|
|
|
QVBoxLayout fCanvasLayout;
|
2012-07-31 12:49:52 +00:00
|
|
|
QLabel fCanvasToggle;
|
2012-07-26 19:38:22 +00:00
|
|
|
|
|
|
|
QHBoxLayout fRasterLayout;
|
|
|
|
QLabel fRasterLabel;
|
|
|
|
QCheckBox fRasterCheckBox;
|
|
|
|
|
2013-02-06 20:13:54 +00:00
|
|
|
QHBoxLayout fOverdrawVizLayout;
|
|
|
|
QLabel fOverdrawVizLabel;
|
|
|
|
QCheckBox fOverdrawVizCheckBox;
|
|
|
|
|
2012-07-26 19:38:22 +00:00
|
|
|
QHBoxLayout fGLLayout;
|
|
|
|
QLabel fGLLabel;
|
|
|
|
QCheckBox fGLCheckBox;
|
|
|
|
|
2012-07-09 20:26:53 +00:00
|
|
|
QFrame fZoomFrame;
|
|
|
|
QHBoxLayout fZoomLayout;
|
2012-07-31 12:49:52 +00:00
|
|
|
QLabel fZoomSetting;
|
|
|
|
QLineEdit fZoomBox;
|
2012-06-29 14:21:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* SKSETTINGSWIDGET_H_ */
|