Index: /trunk/FACT++/gui/FactGui.h
===================================================================
--- /trunk/FACT++/gui/FactGui.h	(revision 11642)
+++ /trunk/FACT++/gui/FactGui.h	(revision 11643)
@@ -127,6 +127,9 @@
     int fWhite;
 
+    int64_t fMin;
+    int64_t fMax;
+
 public:
-    Camera() : fData(1440), fBold(1440), fEnable(1440), fWhite(-1)
+    Camera() : fData(1440), fBold(1440), fEnable(1440), fWhite(-1), fMin(-1), fMax(-1)
     {
         CreatePalette();
@@ -148,4 +151,6 @@
     void Toggle(int idx) { fEnable[idx]=!fEnable[idx]; }
     double GetData(int idx) const { return fData[idx]; }
+    void SetMin(int64_t min) { fMin=min; }
+    void SetMax(int64_t max) { fMax=max; }
 
     const char *GetName() const { return "Camera"; }
@@ -213,4 +218,9 @@
                 dmin = fData[i];
         }
+
+        if (fMin<0)
+            dmin = fMin;
+        if (fMax<0)
+            dmax = fMax;
 
         const double min   = dmin;
@@ -2709,4 +2719,23 @@
         fRatesCanv->GetCanvas()->Update();
     }
+
+    void on_fRatesMin_valueChanged(int min)
+    {
+        Camera *cam = (Camera*)fRatesCanv->GetCanvas()->FindObject("Camera");
+        cam->SetMin(min);
+
+        fRatesCanv->GetCanvas()->Modified();
+        fRatesCanv->GetCanvas()->Update();
+    }
+
+    void on_fRatesMax_valueChanged(int max)
+    {
+        Camera *cam = (Camera*)fRatesCanv->GetCanvas()->FindObject("Camera");
+        cam->SetMax(max);
+
+        fRatesCanv->GetCanvas()->Modified();
+        fRatesCanv->GetCanvas()->Update();
+    }
+
 #endif
 
Index: /trunk/FACT++/gui/MainWindow.h
===================================================================
--- /trunk/FACT++/gui/MainWindow.h	(revision 11642)
+++ /trunk/FACT++/gui/MainWindow.h	(revision 11643)
@@ -154,4 +154,6 @@
     virtual void on_fThresholdPatch_valueChanged(int) = 0;
     virtual void on_fPixelIdx_valueChanged(int) = 0;
+    virtual void on_fRatesMin_valueChanged(int) = 0;
+    virtual void on_fRatesMax_valueChanged(int) = 0;
 
     void on_fPixelEnableAll_clicked();
Index: /trunk/FACT++/gui/design.ui
===================================================================
--- /trunk/FACT++/gui/design.ui	(revision 11642)
+++ /trunk/FACT++/gui/design.ui	(revision 11643)
@@ -2750,8 +2750,17 @@
             <item row="0" column="1" rowspan="2">
              <widget class="QGroupBox" name="fRatesControls">
+              <property name="sizePolicy">
+               <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+                <horstretch>0</horstretch>
+                <verstretch>0</verstretch>
+               </sizepolicy>
+              </property>
               <property name="title">
                <string>Controls</string>
               </property>
-              <layout class="QGridLayout" name="gridLayout_64">
+              <layout class="QGridLayout" name="gridLayout_64" columnstretch="0">
+               <property name="sizeConstraint">
+                <enum>QLayout::SetMinimumSize</enum>
+               </property>
                <item row="1" column="0">
                 <layout class="QVBoxLayout" name="verticalLayout_5">
@@ -3097,4 +3106,93 @@
                  </property>
                 </widget>
+               </item>
+               <item row="2" column="0">
+                <layout class="QGridLayout" name="gridLayout_66" rowstretch="0,0" columnstretch="0,0">
+                 <property name="sizeConstraint">
+                  <enum>QLayout::SetDefaultConstraint</enum>
+                 </property>
+                 <property name="topMargin">
+                  <number>0</number>
+                 </property>
+                 <item row="0" column="0">
+                  <widget class="QLabel" name="label_173">
+                   <property name="sizePolicy">
+                    <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
+                     <horstretch>0</horstretch>
+                     <verstretch>0</verstretch>
+                    </sizepolicy>
+                   </property>
+                   <property name="text">
+                    <string>MIn</string>
+                   </property>
+                  </widget>
+                 </item>
+                 <item row="0" column="1">
+                  <widget class="QSpinBox" name="fRatesMin">
+                   <property name="sizePolicy">
+                    <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+                     <horstretch>0</horstretch>
+                     <verstretch>0</verstretch>
+                    </sizepolicy>
+                   </property>
+                   <property name="alignment">
+                    <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+                   </property>
+                   <property name="specialValueText">
+                    <string>auto</string>
+                   </property>
+                   <property name="suffix">
+                    <string> Hz</string>
+                   </property>
+                   <property name="minimum">
+                    <number>-1</number>
+                   </property>
+                   <property name="maximum">
+                    <number>2147483647</number>
+                   </property>
+                  </widget>
+                 </item>
+                 <item row="1" column="0">
+                  <widget class="QLabel" name="label_174">
+                   <property name="sizePolicy">
+                    <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
+                     <horstretch>0</horstretch>
+                     <verstretch>0</verstretch>
+                    </sizepolicy>
+                   </property>
+                   <property name="text">
+                    <string>Max</string>
+                   </property>
+                  </widget>
+                 </item>
+                 <item row="1" column="1">
+                  <widget class="QSpinBox" name="fRatesMax">
+                   <property name="sizePolicy">
+                    <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+                     <horstretch>0</horstretch>
+                     <verstretch>0</verstretch>
+                    </sizepolicy>
+                   </property>
+                   <property name="alignment">
+                    <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+                   </property>
+                   <property name="specialValueText">
+                    <string>auto</string>
+                   </property>
+                   <property name="suffix">
+                    <string> Hz</string>
+                   </property>
+                   <property name="minimum">
+                    <number>-1</number>
+                   </property>
+                   <property name="maximum">
+                    <number>2147483647</number>
+                   </property>
+                   <property name="value">
+                    <number>1000</number>
+                   </property>
+                  </widget>
+                 </item>
+                </layout>
                </item>
               </layout>
