Changeset 221 in flair-src for trunk/tools/FlairGCS/src/Layout.cpp


Ignore:
Timestamp:
Feb 22, 2018, 3:38:55 PM (4 years ago)
Author:
Sanahuja Guillaume
Message:

add us plot

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/FlairGCS/src/Layout.cpp

    r88 r221  
    1818#include "DataPlot2D.h"
    1919#include "RangeFinderPlot.h"
     20#include "UsSensorPlot.h"
    2021#include "Picture.h"
    2122#include "Map.h"
     
    180181    }
    181182  }
     183  if (type == "UsSensorPlot") {
     184    float ymin = dom.attribute("ymin").toFloat();
     185    float ymax = dom.attribute("ymax").toFloat();
     186    QString y_name = dom.attribute("y_name");
     187    int enabled = dom.attribute("enabled").toInt();
     188    int period = dom.attribute("period").toInt();
     189    QString type = dom.attribute("type");
     190    int samples = dom.attribute("samples").toInt();
     191    if (enabled == 1) {
     192      widget = new UsSensorPlot(this, row, col, name, y_name,
     193                              ymin, ymax, samples,type,true, period);
     194    } else {
     195      widget = new UsSensorPlot(this, row, col, name,  y_name,
     196                              ymin, ymax, samples,type,false, 100);
     197    }
     198  }
    182199  if (type == "RangeFinderPlot") {
    183200    float xmin = dom.attribute("xmin").toFloat();
Note: See TracChangeset for help on using the changeset viewer.