Changeset 11796 for trunk/FACT++/gui/QCameraWidget.cc
- Timestamp:
- 08/05/11 16:19:54 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/gui/QCameraWidget.cc
r11786 r11796 12 12 fMin = -1; 13 13 fMax = -1; 14 lastFace = -1; 14 15 CalculatePixelsColor(); 16 15 17 } 16 18 void QCameraWidget::paintGL() … … 30 32 void QCameraWidget::drawCamera(bool alsoWire) 31 33 { 34 if (!pixelColorUpToDate) 35 CalculatePixelsColor(); 32 36 glLineWidth(1.0); 33 37 for (int i=0;i<ACTUAL_NUM_PIXELS;i++) … … 61 65 { 62 66 int face = PixelAtPosition(cEvent->pos()); 63 if (face != -1 ) {67 if (face != -1 && lastFace != face) { 64 68 emit signalPixelMoveOver(face); 69 cout << "Emitting" << endl; 65 70 } 71 lastFace = face; 66 72 } 67 73 void QCameraWidget::mouseDoubleClickEvent(QMouseEvent* cEvent) … … 96 102 { 97 103 fMin = min; 98 CalculatePixelsColor(); 104 pixelColorUpToDate = false; 105 if (isVisible()) 106 updateGL(); 99 107 } 100 108 void QCameraWidget::SetMax(int64_t max) 101 109 { 102 110 fMax = max; 103 CalculatePixelsColor(); 111 pixelColorUpToDate = false; 112 if (isVisible()) 113 updateGL(); 104 114 } 105 115 const char* QCameraWidget::GetName() … … 152 162 pixelsColor[i][2] = weight1*bb[index] + weight0*bb[index+1]; 153 163 } 164 pixelColorUpToDate = true; 154 165 } 155 166 void QCameraWidget::SetData(const valarray<double> &ddata) … … 158 169 for (int i=0;i<ACTUAL_NUM_PIXELS;i++) 159 170 fData[i] = ddata[i]; 160 CalculatePixelsColor(); 161 updateGL(); 171 pixelColorUpToDate = false; 172 if (isVisible()) 173 updateGL(); 162 174 }
Note:
See TracChangeset
for help on using the changeset viewer.