Changeset 11643
- Timestamp:
- 07/27/11 09:28:08 (13 years ago)
- Location:
- trunk/FACT++/gui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/gui/FactGui.h
r11641 r11643 127 127 int fWhite; 128 128 129 int64_t fMin; 130 int64_t fMax; 131 129 132 public: 130 Camera() : fData(1440), fBold(1440), fEnable(1440), fWhite(-1) 133 Camera() : fData(1440), fBold(1440), fEnable(1440), fWhite(-1), fMin(-1), fMax(-1) 131 134 { 132 135 CreatePalette(); … … 148 151 void Toggle(int idx) { fEnable[idx]=!fEnable[idx]; } 149 152 double GetData(int idx) const { return fData[idx]; } 153 void SetMin(int64_t min) { fMin=min; } 154 void SetMax(int64_t max) { fMax=max; } 150 155 151 156 const char *GetName() const { return "Camera"; } … … 213 218 dmin = fData[i]; 214 219 } 220 221 if (fMin<0) 222 dmin = fMin; 223 if (fMax<0) 224 dmax = fMax; 215 225 216 226 const double min = dmin; … … 2709 2719 fRatesCanv->GetCanvas()->Update(); 2710 2720 } 2721 2722 void on_fRatesMin_valueChanged(int min) 2723 { 2724 Camera *cam = (Camera*)fRatesCanv->GetCanvas()->FindObject("Camera"); 2725 cam->SetMin(min); 2726 2727 fRatesCanv->GetCanvas()->Modified(); 2728 fRatesCanv->GetCanvas()->Update(); 2729 } 2730 2731 void on_fRatesMax_valueChanged(int max) 2732 { 2733 Camera *cam = (Camera*)fRatesCanv->GetCanvas()->FindObject("Camera"); 2734 cam->SetMax(max); 2735 2736 fRatesCanv->GetCanvas()->Modified(); 2737 fRatesCanv->GetCanvas()->Update(); 2738 } 2739 2711 2740 #endif 2712 2741 -
trunk/FACT++/gui/MainWindow.h
r11635 r11643 154 154 virtual void on_fThresholdPatch_valueChanged(int) = 0; 155 155 virtual void on_fPixelIdx_valueChanged(int) = 0; 156 virtual void on_fRatesMin_valueChanged(int) = 0; 157 virtual void on_fRatesMax_valueChanged(int) = 0; 156 158 157 159 void on_fPixelEnableAll_clicked(); -
trunk/FACT++/gui/design.ui
r11641 r11643 2750 2750 <item row="0" column="1" rowspan="2"> 2751 2751 <widget class="QGroupBox" name="fRatesControls"> 2752 <property name="sizePolicy"> 2753 <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> 2754 <horstretch>0</horstretch> 2755 <verstretch>0</verstretch> 2756 </sizepolicy> 2757 </property> 2752 2758 <property name="title"> 2753 2759 <string>Controls</string> 2754 2760 </property> 2755 <layout class="QGridLayout" name="gridLayout_64"> 2761 <layout class="QGridLayout" name="gridLayout_64" columnstretch="0"> 2762 <property name="sizeConstraint"> 2763 <enum>QLayout::SetMinimumSize</enum> 2764 </property> 2756 2765 <item row="1" column="0"> 2757 2766 <layout class="QVBoxLayout" name="verticalLayout_5"> … … 3097 3106 </property> 3098 3107 </widget> 3108 </item> 3109 <item row="2" column="0"> 3110 <layout class="QGridLayout" name="gridLayout_66" rowstretch="0,0" columnstretch="0,0"> 3111 <property name="sizeConstraint"> 3112 <enum>QLayout::SetDefaultConstraint</enum> 3113 </property> 3114 <property name="topMargin"> 3115 <number>0</number> 3116 </property> 3117 <item row="0" column="0"> 3118 <widget class="QLabel" name="label_173"> 3119 <property name="sizePolicy"> 3120 <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> 3121 <horstretch>0</horstretch> 3122 <verstretch>0</verstretch> 3123 </sizepolicy> 3124 </property> 3125 <property name="text"> 3126 <string>MIn</string> 3127 </property> 3128 </widget> 3129 </item> 3130 <item row="0" column="1"> 3131 <widget class="QSpinBox" name="fRatesMin"> 3132 <property name="sizePolicy"> 3133 <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> 3134 <horstretch>0</horstretch> 3135 <verstretch>0</verstretch> 3136 </sizepolicy> 3137 </property> 3138 <property name="alignment"> 3139 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> 3140 </property> 3141 <property name="specialValueText"> 3142 <string>auto</string> 3143 </property> 3144 <property name="suffix"> 3145 <string> Hz</string> 3146 </property> 3147 <property name="minimum"> 3148 <number>-1</number> 3149 </property> 3150 <property name="maximum"> 3151 <number>2147483647</number> 3152 </property> 3153 </widget> 3154 </item> 3155 <item row="1" column="0"> 3156 <widget class="QLabel" name="label_174"> 3157 <property name="sizePolicy"> 3158 <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> 3159 <horstretch>0</horstretch> 3160 <verstretch>0</verstretch> 3161 </sizepolicy> 3162 </property> 3163 <property name="text"> 3164 <string>Max</string> 3165 </property> 3166 </widget> 3167 </item> 3168 <item row="1" column="1"> 3169 <widget class="QSpinBox" name="fRatesMax"> 3170 <property name="sizePolicy"> 3171 <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> 3172 <horstretch>0</horstretch> 3173 <verstretch>0</verstretch> 3174 </sizepolicy> 3175 </property> 3176 <property name="alignment"> 3177 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> 3178 </property> 3179 <property name="specialValueText"> 3180 <string>auto</string> 3181 </property> 3182 <property name="suffix"> 3183 <string> Hz</string> 3184 </property> 3185 <property name="minimum"> 3186 <number>-1</number> 3187 </property> 3188 <property name="maximum"> 3189 <number>2147483647</number> 3190 </property> 3191 <property name="value"> 3192 <number>1000</number> 3193 </property> 3194 </widget> 3195 </item> 3196 </layout> 3099 3197 </item> 3100 3198 </layout>
Note:
See TracChangeset
for help on using the changeset viewer.