Changeset 12940 for fact/tools
- Timestamp:
- 02/24/12 20:43:27 (13 years ago)
- Location:
- fact/tools
- Files:
-
- 7 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/tools/Edd/Edd.cc
r12910 r12940 65 65 66 66 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 68 73 delete RD; 69 74 if (Tmpfile != NULL) fclose(Tmpfile); … … 75 80 struct ItemDetails N; 76 81 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) + ")"); 78 83 N.Board = Board; 79 84 N.Chip = Chip; 80 85 N.Channel = Channel; 81 86 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))); 83 88 N.Trigger->attach(this); 84 89 85 90 if (List.isEmpty()) { 86 QPen Pen = N. Signal->pen();91 QPen Pen = N.Curve->pen(); 87 92 Pen.setWidth(2); 88 N. Signal->setPen(Pen);93 N.Curve->setPen(Pen); 89 94 } 90 95 List.append(N); … … 101 106 ClearCurve(0); 102 107 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) + ")"); 104 109 List.first().Board = Board; 105 110 List.first().Chip = Chip; … … 239 244 for (int i=0; i<List.size(); i++) { 240 245 241 if (PersistanceAction->isChecked()) List[i]. Signal->setStyle(QwtPlotCurve::Dots);246 if (PersistanceAction->isChecked()) List[i].Curve->setStyle(QwtPlotCurve::Dots); 242 247 else { 243 248 ClearCurve(i); 244 List[i]. Signal->setStyle(QwtPlotCurve::Lines);249 List[i].Curve->setStyle(QwtPlotCurve::Lines); 245 250 } 246 251 … … 298 303 299 304 emit(PixelData(Pixel)); 300 }301 302 // Remove list entry303 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 }309 305 } 310 306 -
fact/tools/Edd/Edd.h
r11360 r12940 17 17 struct ItemDetails { 18 18 unsigned int Board, Chip, Channel; 19 QwtPlotCurve * Signal;19 QwtPlotCurve *Curve; 20 20 QwtPlotMarker *Trigger; 21 21 }; … … 45 45 private slots: 46 46 void PlotTraces(); 47 void DeleteCurve(QwtPlotCurve *);48 47 void NewEventNum(int); 49 48
Note:
See TracChangeset
for help on using the changeset viewer.