Changeset 12940 for fact/tools


Ignore:
Timestamp:
02/24/12 20:43:27 (13 years ago)
Author:
ogrimm
Message:
History handling in Edd faster, improved drag and drop functionality, version of Edd for La Palma
Location:
fact/tools
Files:
7 added
2 edited

Legend:

Unmodified
Added
Removed
  • fact/tools/Edd/Edd.cc

    r12910 r12940  
    6565
    6666  SetActive(false);
    67   while (!List.isEmpty()) DeleteCurve(List.last().Signal);
     67
     68  for (int i=0; i<List.size(); i++) {
     69        DeleteCurve(List[i].Curve);
     70        delete List[i].Trigger;
     71  }
     72
    6873  delete RD;
    6974  if (Tmpfile != NULL) fclose(Tmpfile);
     
    7580  struct ItemDetails N;
    7681 
    77   N.Signal = NewCurve(QString::number(Board)+","+QString::number(Chip)+","+ QString::number(Channel)+ " (" + ToPixel(0, Board, Chip, Channel) + ")");
     82  N.Curve = NewCurve(QString::number(Board)+","+QString::number(Chip)+","+ QString::number(Channel)+ " (" + ToPixel(0, Board, Chip, Channel) + ")");
    7883  N.Board = Board;
    7984  N.Chip = Chip;
    8085  N.Channel = Channel;
    8186  N.Trigger = new QwtPlotMarker();
    82   N.Trigger->setSymbol(QwtSymbol(QwtSymbol::Diamond, QBrush(N.Signal->pen().color()), N.Signal->pen(), QSize(10,10)));
     87  N.Trigger->setSymbol(QwtSymbol(QwtSymbol::Diamond, QBrush(N.Curve->pen().color()), N.Curve->pen(), QSize(10,10)));
    8388  N.Trigger->attach(this);
    8489
    8590  if (List.isEmpty()) {
    86     QPen Pen = N.Signal->pen();
     91    QPen Pen = N.Curve->pen();
    8792        Pen.setWidth(2);
    88         N.Signal->setPen(Pen);
     93        N.Curve->setPen(Pen);
    8994  }
    9095  List.append(N);
     
    101106  ClearCurve(0);
    102107
    103   List.first().Signal->setTitle(QString::number(Board)+","+QString::number(Chip)+","+ QString::number(Channel) + " (" + ToPixel(0, Board, Chip, Channel) + ")");
     108  List.first().Curve->setTitle(QString::number(Board)+","+QString::number(Chip)+","+ QString::number(Channel) + " (" + ToPixel(0, Board, Chip, Channel) + ")");
    104109  List.first().Board = Board;
    105110  List.first().Chip = Chip;
     
    239244  for (int i=0; i<List.size(); i++) {
    240245
    241         if (PersistanceAction->isChecked()) List[i].Signal->setStyle(QwtPlotCurve::Dots);
     246        if (PersistanceAction->isChecked()) List[i].Curve->setStyle(QwtPlotCurve::Dots);
    242247        else {
    243248          ClearCurve(i);
    244           List[i].Signal->setStyle(QwtPlotCurve::Lines);
     249          List[i].Curve->setStyle(QwtPlotCurve::Lines);
    245250        }
    246251
     
    298303 
    299304  emit(PixelData(Pixel));
    300 }
    301 
    302 // Remove list entry
    303 void EventScope::DeleteCurve(QwtPlotCurve *Curve) {
    304 
    305   for (int i=0; i<List.size(); i++) if (List[i].Signal == Curve) {
    306         delete List[i].Trigger;
    307     List.removeAt(i);
    308   }
    309305}
    310306
  • fact/tools/Edd/Edd.h

    r11360 r12940  
    1717    struct ItemDetails {
    1818          unsigned int Board, Chip, Channel;
    19       QwtPlotCurve *Signal;
     19      QwtPlotCurve *Curve;
    2020          QwtPlotMarker *Trigger;
    2121    };
     
    4545  private slots:
    4646        void PlotTraces();
    47         void DeleteCurve(QwtPlotCurve *);
    4847        void NewEventNum(int);
    4948
Note: See TracChangeset for help on using the changeset viewer.