Changeset 12103


Ignore:
Timestamp:
09/15/11 12:44:14 (13 years ago)
Author:
lyard
Message:
added auto highlight of pixels
Location:
trunk/FACT++/gui
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/gui/QCameraWidget.cc

    r12093 r12103  
    1212        fEnable.assign(1440, true);
    1313        lastFace = -1;
     14        fShowPixelMoveOver = true;
     15        fShowPatchMoveOver = true;
    1416
    1517        CalculatePixelsColor();
     
    252254    {
    253255        int face = PixelAtPosition(cEvent->pos());
     256//        cout << face << endl;
    254257        if (face != -1 && lastFace != face) {
    255258            emit signalPixelMoveOver(face);
    256259        }
     260        if (lastFace != face)
     261        {
     262            if (fShowPixelMoveOver)
     263                fWhite = face;
     264
     265            if (fShowPatchMoveOver)
     266                if (face != -1)
     267                    fWhitePatch = pixelsPatch[face];
     268                else
     269                    fWhitePatch = -1;
     270        }
     271
     272        if (fShowPixelMoveOver || fShowPatchMoveOver)
     273            if (lastFace != face && isVisible())
     274                updateGL();
     275
    257276        lastFace = face;
    258277    }
     
    279298
    280299    }
    281 
     300    void QCameraWidget::ShowPixelCursor(bool on)
     301    {
     302        fShowPixelMoveOver = on;
     303        if (isVisible() && autoRefresh)
     304            updateGL();
     305    }
     306    void QCameraWidget::ShowPatchCursor(bool on)
     307    {
     308        fShowPatchMoveOver = on;
     309        if (isVisible() && autoRefresh)
     310            updateGL();
     311    }
    282312    void QCameraWidget::SetEnable(int idx, bool b)
    283313     {
  • trunk/FACT++/gui/QCameraWidget.h

    r12054 r12103  
    2424
    2525    int lastFace;
    26 
     26    bool fShowPixelMoveOver;
     27    bool fShowPatchMoveOver;
    2728
    2829public:
     
    5152
    5253
     54     void ShowPixelCursor(bool);
     55     void ShowPatchCursor(bool);
     56
    5357private:
    5458     void CalculatePixelsColor();
  • trunk/FACT++/gui/RawEventsViewer/RawEventsViewer.cc

    r12053 r12103  
    10371037    }
    10381038
    1039     if (calibInputFile->HasKey("NROI"))
    1040     {
    1041         cout << "Looks like you're trying to load a regular raw data file as DRS calib. aborting." << endl;
    1042         delete calibInputFile;
    1043         calibInputFile = NULL;
    1044         return;
    1045     }
     1039//    if (calibInputFile->HasKey("NROI"))
     1040//    {
     1041//        cout << "Looks like you're trying to load a regular raw data file as DRS calib. aborting." << endl;
     1042//        delete calibInputFile;
     1043//        calibInputFile = NULL;
     1044//        return;
     1045//    }
    10461046
    10471047    if (!calibInputFile->SetPtrAddress("BaselineMean", baseLineMean)){
Note: See TracChangeset for help on using the changeset viewer.