Changeset 11705


Ignore:
Timestamp:
07/29/11 18:06:37 (13 years ago)
Author:
tbretz
Message:
Added some ifdef to make it compile with Qwt 5.2; little change to the program options (so they are easier to be used in a file; made --file the first positional argument; fixed the include path to Coonfiguration.h
File:
1 edited

Legend:

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

    r11704 r11705  
    2323#include <qwt_symbol.h>
    2424
    25 #include "../../src/Configuration.h"
     25#include "src/Configuration.h"
    2626
    2727//Coordinates of an hexagon of radius 1 and center 0
     
    15201520    nsamples++;
    15211521 //   if (nsamples > 5)
    1522         boardsTimeHistoItem.setSamples(xval, yval, nsamples);
     1522#if QWT_VERSION < 0x060000
     1523       boardsTimeHistoItem.setData(xval, yval, nsamples);
     1524#else
     1525       boardsTimeHistoItem.setSamples(xval, yval, nsamples);
     1526#endif
    15231527
    15241528    it = pixelHistoMap.begin();
     
    15551559    nsamples++;
    15561560//    if (nsamples > 5)
    1557         startCellHistoItem.setSamples(xval, yval, nsamples);
     1561#if QWT_VERSION < 0x060000
     1562       startCellHistoItem.setData(xval, yval, nsamples);
     1563#else
     1564       startCellHistoItem.setSamples(xval, yval, nsamples);
     1565#endif
    15581566
    15591567    it = timeMarksMap.begin();
     
    15901598    nsamples++;
    15911599 //   if (nsamples > 5)
    1592         startTimeMarkHistoItem.setSamples(xval, yval, nsamples);
     1600#if QWT_VERSION < 0x060000
     1601       startTimeMarkHistoItem.setData(xval, yval, nsamples);
     1602#else
     1603       startTimeMarkHistoItem.setSamples(xval, yval, nsamples);
     1604#endif
    15931605
    15941606    it = delayMap.begin();
     
    16251637    nsamples++;
    16261638  //  if (nsamples > 5)
    1627         triggerDelayHistoItem.setSamples(xval, yval, nsamples);
     1639#if QWT_VERSION < 0x060000
     1640       triggerDelayHistoItem.setData(xval, yval, nsamples);
     1641#else
     1642       triggerDelayHistoItem.setSamples(xval, yval, nsamples);
     1643#endif
    16281644
    16291645
     
    17641780#endif
    17651781    }
    1766     pixelValueCurveItem.setRawSamples(xval, yval, viewer->nRoi);
     1782#if QWT_VERSION < 0x060000
     1783       pixelValueCurveItem.setRawData(xval, yval, viewer->nRoi);
     1784#else
     1785       pixelValueCurveItem.setRawSamples(xval, yval, viewer->nRoi);
     1786#endif
    17671787
    17681788    QStack< QRectF > stack;
     
    19521972    po::options_description configs("Raw Events Viewer Options");
    19531973    configs.add_options()
    1954         ("colorRange", vars<double>(), "Range of the display colours")
    1955         ("colorRed", vars<double>(), "Range of red values")
    1956         ("colorGreen", vars<double>(), "Range of green values")
    1957         ("colorBlue", vars<double>(), "Range of blue values")
     1974        ("color.range", vars<double>(), "Range of the display colours")
     1975        ("color.red", vars<double>(), "Range of red values")
     1976        ("color.rreen", vars<double>(), "Range of green values")
     1977        ("color.blue", vars<double>(), "Range of blue values")
    19581978        ("file,f", var<string>(), "File to be loaded at startup")
    19591979        ;
    19601980    conf.AddOptions(configs);
     1981
     1982    po::positional_options_description p;
     1983    p.add("file", 1); // The first positional options
     1984    conf.SetArgumentPositions(p);
     1985
    19611986}
    19621987/************************************************************
     
    19711996        return -1;
    19721997
    1973     if (conf.Has("colorRange"))
    1974     {
    1975         vector<double> value = conf.Vec<double>("colorRange");
     1998    if (conf.Has("color.range"))
     1999    {
     2000        vector<double> value = conf.Vec<double>("color.range");
    19762001        if (value.size() != 5)
    19772002        {
     
    19832008    }
    19842009
    1985     if (conf.Has("colorRed"))
    1986     {
    1987         vector<double> value = conf.Vec<double>("colorRed");
     2010    if (conf.Has("color.red"))
     2011    {
     2012        vector<double> value = conf.Vec<double>("color.red");
    19882013        if (value.size() != 5)
    19892014        {
     
    19952020    }
    19962021
    1997     if (conf.Has("colorGreen"))
    1998     {
    1999         vector<double> value = conf.Vec<double>("colorGreen");
     2022    if (conf.Has("color.green"))
     2023    {
     2024        vector<double> value = conf.Vec<double>("color.green");
    20002025        if (value.size() != 5)
    20012026        {
     
    20072032    }
    20082033
    2009     if (conf.Has("colorBlue"))
    2010     {
    2011         vector<double> value = conf.Vec<double>("colorBlue");
     2034    if (conf.Has("color.blue"))
     2035    {
     2036        vector<double> value = conf.Vec<double>("color.blue");
    20122037        if (value.size() != 5)
    20132038        {
     
    20222047
    20232048    if (!QGLFormat::hasOpenGL()) {
    2024         std::cout << "This system has no OpenGL support" << std::endl;
     2049        std::cerr << "This system has no OpenGL support" << std::endl;
    20252050        return 1;
    20262051    }
Note: See TracChangeset for help on using the changeset viewer.