summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-08-18 04:40:06 +0200
committerTreeki <treeki@gmail.com>2012-08-18 04:40:06 +0200
commit060f6a4abf60444fd45ec08a71f4ce95b7555883 (patch)
tree83f556b68c3fbe71ed310bd74e4511d4ba0fcc02
parenta55b7493b1bd54e9d1231fa18300e0f882700fe3 (diff)
downloadLayoutStudio-060f6a4abf60444fd45ec08a71f4ce95b7555883.tar.gz
LayoutStudio-060f6a4abf60444fd45ec08a71f4ce95b7555883.zip
sorted out ranges and steps and crap for the SRT spinboxes
-rw-r--r--lspaneeditor.cpp21
-rw-r--r--lspaneeditor.h16
2 files changed, 24 insertions, 13 deletions
diff --git a/lspaneeditor.cpp b/lspaneeditor.cpp
index ee7e310..e63cb4f 100644
--- a/lspaneeditor.cpp
+++ b/lspaneeditor.cpp
@@ -86,10 +86,10 @@ void LSPaneEditor::createPaneTab() {
gLayout = new QGridLayout(geoBox);
m_width = new QDoubleSpinBox(geoBox);
- m_width->setRange(0.0, 100000.0);
+ m_width->setRange(-100000.0, 100000.0);
connect(m_width, SIGNAL(valueChanged(double)), SLOT(handleWidthChanged(double)));
m_height = new QDoubleSpinBox(geoBox);
- m_height->setRange(0.0, 100000.0);
+ m_height->setRange(-100000.0, 100000.0);
connect(m_height, SIGNAL(valueChanged(double)), SLOT(handleHeightChanged(double)));
m_horzOrigin = new QComboBox(geoBox);
@@ -130,14 +130,15 @@ void LSPaneEditor::createPaneTab() {
QGroupBox *posBox = new QGroupBox("Positioning", m_paneTab);
gLayout = new QGridLayout(posBox);
- m_transX = new QDoubleSpinBox(posBox);
- m_transY = new QDoubleSpinBox(posBox);
- m_transZ = new QDoubleSpinBox(posBox);
- m_rotX = new QDoubleSpinBox(posBox);
- m_rotY = new QDoubleSpinBox(posBox);
- m_rotZ = new QDoubleSpinBox(posBox);
- m_scaleX = new QDoubleSpinBox(posBox);
- m_scaleY = new QDoubleSpinBox(posBox);
+ for (int i = 0; i < 8; i++) {
+ m_transSpinBoxes[i] = new QDoubleSpinBox(posBox);
+ m_transSpinBoxes[i]->setDecimals(3);
+ m_transSpinBoxes[i]->setRange(-100000.0, 100000.0);
+ }
+
+ for (int i = 0; i < 3; i++) {
+ m_rotSpinBoxes[i]->setSingleStep(10.0);
+ }
connect(m_transX, SIGNAL(valueChanged(double)), SLOT(handleTransXChanged(double)));
connect(m_transY, SIGNAL(valueChanged(double)), SLOT(handleTransYChanged(double)));
diff --git a/lspaneeditor.h b/lspaneeditor.h
index 22a7a7d..9aaf942 100644
--- a/lspaneeditor.h
+++ b/lspaneeditor.h
@@ -38,9 +38,19 @@ private:
QComboBox *m_horzOrigin, *m_vertOrigin;
QCheckBox *m_widescreen; //, *m_visible;
- QDoubleSpinBox *m_transX, *m_transY, *m_transZ;
- QDoubleSpinBox *m_rotX, *m_rotY, *m_rotZ;
- QDoubleSpinBox *m_scaleX, *m_scaleY;
+ union {
+ QDoubleSpinBox *m_srtSpinBoxes[8];
+ struct {
+ QDoubleSpinBox *m_transSpinBoxes[3];
+ QDoubleSpinBox *m_rotSpinBoxes[3];
+ QDoubleSpinBox *m_scaleSpinBoxes[2];
+ };
+ struct {
+ QDoubleSpinBox *m_transX, *m_transY, *m_transZ;
+ QDoubleSpinBox *m_rotX, *m_rotY, *m_rotZ;
+ QDoubleSpinBox *m_scaleX, *m_scaleY;
+ };
+ };
void createPaneTab();