Changeset 11740 for trunk/FACT++/gui/RawEventsViewer
- Timestamp:
- 08/02/11 15:43:03 (13 years ago)
- Location:
- trunk/FACT++/gui/RawEventsViewer
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/gui/RawEventsViewer/RawEventsViewer.cc
r11723 r11740 20 20 #include <QtGui/QFileDialog> 21 21 22 #include <qwt _plot_grid.h>23 #include <qwt _symbol.h>22 #include <qwt-qt4/qwt_plot_grid.h> 23 #include <qwt-qt4/qwt_symbol.h> 24 24 25 25 #include "src/Configuration.h" … … 1022 1022 if (whichSlice >= nRoi) 1023 1023 { 1024 whichSlice = 0; 1024 1025 if (!loopCurrentEvent) 1025 1026 { … … 1029 1030 eventStep = backupStep; 1030 1031 } 1031 whichSlice=0;1032 1032 } 1033 1033 emit signalCurrentSlice(whichSlice); … … 1039 1039 if (whichSlice < 0) 1040 1040 { 1041 whichSlice = nRoi-1; 1041 1042 if (!loopCurrentEvent) 1042 1043 { … … 1046 1047 eventStep = backupStep; 1047 1048 } 1048 whichSlice = nRoi-1;1049 1049 } 1050 1050 emit signalCurrentSlice(whichSlice); … … 1641 1641 // startCellHistoZoom->setZoomBase(startCellHistoItem.boundingRect()); 1642 1642 QStack< QRectF > stack; 1643 stack.push(boardsTimeHistoItem.boundingRect()); 1643 // QRectF cRectangle = boardsTimeHistoItem.boundingRect(); 1644 stack.push(scaleBoundingRectangle(boardsTimeHistoItem.boundingRect(), 1.05f));//cRectangle);//boardsTimeHistoItem.boundingRect()); 1644 1645 boardsTimeHistoZoom->setZoomStack(stack); 1645 1646 stack.pop(); 1646 stack.push(s tartCellHistoItem.boundingRect());1647 stack.push(scaleBoundingRectangle(startCellHistoItem.boundingRect(), 1.05f)); 1647 1648 startCellHistoZoom->setZoomStack(stack); 1648 1649 stack.pop(); 1649 stack.push(s tartTimeMarkHistoItem.boundingRect());1650 stack.push(scaleBoundingRectangle(startTimeMarkHistoItem.boundingRect(), 1.05f)); 1650 1651 startTimeMarkHistoZoom->setZoomStack(stack); 1651 1652 stack.pop(); 1652 stack.push( triggerDelayHistoItem.boundingRect());1653 stack.push(scaleBoundingRectangle(triggerDelayHistoItem.boundingRect(), 1.05f)); 1653 1654 triggerDelayHistoZoom->setZoomStack(stack); 1654 1655 stack.pop(); 1655 1656 pixelChanged(viewer->selectedPixel); 1656 1657 1658 1659 } 1660 1657 } 1658 //can't use a ref to rectangle, as the type must be converted first 1659 QRectF UIConnector::scaleBoundingRectangle(QRectF rectangle, float scale) 1660 { 1661 QPointF bottomRight = rectangle.bottomRight(); 1662 QPointF topLeft = rectangle.topLeft(); 1663 QPointF center = rectangle.center(); 1664 return QRectF(topLeft + (topLeft-center)*(scale-1.0f), //top left 1665 bottomRight + (bottomRight-center)*(scale-1.0f)); //bottom right 1666 } 1661 1667 void UIConnector::initHistograms() 1662 1668 { … … 1776 1782 } 1777 1783 #if QWT_VERSION < 0x060000 1778 pixelValueCurveItem.set RawData(xval, yval, viewer->nRoi);1784 pixelValueCurveItem.setData(xval, yval, viewer->nRoi); 1779 1785 #else 1780 pixelValueCurveItem.set RawSamples(xval, yval, viewer->nRoi);1786 pixelValueCurveItem.setSamples(xval, yval, viewer->nRoi); 1781 1787 #endif 1782 1788 1783 1789 QStack< QRectF > stack; 1784 stack.push( pixelValueCurveItem.boundingRect());1790 stack.push(scaleBoundingRectangle(pixelValueCurveItem.boundingRect(), 1.05f)); 1785 1791 curveZoom->setZoomStack(stack); 1786 1792 stack.pop(); … … 1969 1975 ("color.range", vars<double>(), "Range of the display colours") 1970 1976 ("color.red", vars<double>(), "Range of red values") 1971 ("color. rreen", vars<double>(), "Range of green values")1977 ("color.green", vars<double>(), "Range of green values") 1972 1978 ("color.blue", vars<double>(), "Range of blue values") 1973 1979 ("file,f", var<string>(), "File to be loaded at startup") -
trunk/FACT++/gui/RawEventsViewer/RawEventsViewer.h
r11704 r11740 30 30 #include <GL/gl.h> 31 31 32 #include "qwt_plot.h"32 #include <qwt-qt4/qwt_plot.h> 33 33 //#include "qwt_plot_histogram.h" 34 #include "qwt_plot_curve.h"35 36 #include <qwt _plot_zoomer.h>34 #include <qwt-qt4/qwt_plot_curve.h> 35 36 #include <qwt-qt4/qwt_plot_zoomer.h> 37 37 38 38 … … 253 253 int swID; 254 254 bool rescaleWholeCamera; 255 QRectF scaleBoundingRectangle(QRectF rectangle, float scale); 255 256 public: 256 257 QListWidget *boardsTimeList; -
trunk/FACT++/gui/RawEventsViewer/viewer.ui
r11697 r11740 857 857 <class>QwtPlot</class> 858 858 <extends>QFrame</extends> 859 <header>qwt _plot.h</header>859 <header>qwt-qt4/qwt_plot.h</header> 860 860 <container>1</container> 861 861 </customwidget>
Note:
See TracChangeset
for help on using the changeset viewer.