[gegl-qt] Examples: Improve QWidget transformation example a bit



commit bdc95152e40e7e49a3958582d88dc1bf86c9ab64
Author: Jon Nordby <jononor gmail com>
Date:   Sun Jul 31 20:04:08 2011 +0200

    Examples: Improve QWidget transformation example a bit
    
    Add descriptions in the spin buttons, and saner max/min/step values.

 .../transformation-controls.cpp                    |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/examples/qwidget-transformations/transformation-controls.cpp b/examples/qwidget-transformations/transformation-controls.cpp
index 53b6ebe..d3312b2 100644
--- a/examples/qwidget-transformations/transformation-controls.cpp
+++ b/examples/qwidget-transformations/transformation-controls.cpp
@@ -17,14 +17,31 @@ TransformationControls::buildUi()
     // X translation
     m_xSpinBox = new QDoubleSpinBox(this);
     layout->addWidget(m_xSpinBox);
+    m_xSpinBox->setMaximum(1000.0);
+    m_xSpinBox->setMinimum(-1000.0);
+    m_xSpinBox->setPrefix("X: ");
+    m_xSpinBox->setSuffix(" px");
+    m_xSpinBox->setDecimals(0);
+    m_xSpinBox->setSingleStep(20.0);
 
     // Y translation
     m_ySpinBox = new QDoubleSpinBox(this);
     layout->addWidget(m_ySpinBox);
+    m_ySpinBox->setMaximum(1000.0);
+    m_ySpinBox->setMinimum(-1000.0);
+    m_ySpinBox->setPrefix("Y: ");
+    m_ySpinBox->setSuffix(" px");
+    m_ySpinBox->setDecimals(0);
+    m_ySpinBox->setSingleStep(20.0);
 
     // Scale
     m_scaleSpinBox = new QDoubleSpinBox(this);
     layout->addWidget(m_scaleSpinBox);
+    m_scaleSpinBox->setMaximum(5.0);
+    m_scaleSpinBox->setMinimum(0.2);
+    m_scaleSpinBox->setPrefix("Scale: ");
+    m_scaleSpinBox->setSuffix(" x");
+    m_scaleSpinBox->setSingleStep(0.2);
 
     this->setLayout(layout);
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]