Changeset 11796
- Timestamp:
- 08/05/11 16:19:54 (13 years ago)
- Location:
- trunk/FACT++/gui
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/gui/FactGui.h
r11791 r11796 2960 2960 fStatusBar->showMessage(tipText, 3000); 2961 2961 } 2962 2962 2963 void UpdatePatch(int isw) 2963 2964 { … … 3457 3458 connect(fRatesCanv, SIGNAL(signalPixelMoveOver(int)), 3458 3459 this, SLOT(slot_CameraMouseMove(int))); 3460 connect(fEventCanv1, SIGNAL(signalCurrentPixel(int)), 3461 this, SLOT(slot_CameraMouseMove(int))); 3462 connect(fEventCanv2, SIGNAL(signalCurrentPixel(int)), 3463 this, SLOT(slot_CameraMouseMove(int))); 3464 connect(fEventCanv3, SIGNAL(signalCurrentPixel(int)), 3465 this, SLOT(slot_CameraMouseMove(int))); 3466 connect(fEventCanv4, SIGNAL(signalCurrentPixel(int)), 3467 this, SLOT(slot_CameraMouseMove(int))); 3468 3459 3469 connect(fRatesCanv, SIGNAL(signalPixelDoubleClick(int)), 3460 3470 this, SLOT(slot_CameraDoubleClick(int))); -
trunk/FACT++/gui/MainWindow.h
r11779 r11796 191 191 virtual void slot_CameraDoubleClick(int) = 0; 192 192 virtual void slot_CameraMouseMove(int) = 0; 193 194 193 void slot_TimeUpdate(); 195 194 }; -
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 } -
trunk/FACT++/gui/QCameraWidget.h
r11779 r11796 24 24 int64_t fMax; 25 25 26 int lastFace; 26 27 public: 27 28 QCameraWidget(QWidget *pparent = 0);
Note:
See TracChangeset
for help on using the changeset viewer.