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


Ignore:
Timestamp:
Aug 24, 2021, 5:33:19 PM (3 months ago)
Author:
Sanahuja Guillaume
Message:

prepare for graphs buffering

File:
1 edited

Legend:

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

    r269 r437  
    127127    double max = dom->attribute("max").toDouble();
    128128    double step = dom->attribute("step").toDouble();
    129     int decimals = dom->attribute("decimals").toInt();
     129    uint16_t decimals = dom->attribute("decimals").toUShort();
    130130    widget = new DoubleSpinBox(this, row, col, name, suffix, value, min, max,
    131131                               step, decimals);
     
    139139    double max = dom->attribute("max").toDouble();
    140140    double step = dom->attribute("step").toDouble();
    141     int decimals = dom->attribute("decimals").toInt();
     141    uint16_t decimals = dom->attribute("decimals").toUShort();
    142142    widget = new Vector3DSpinBox(this, row, col, name, value, min, max, step,
    143143                                 decimals);
     
    148148  }
    149149  if (type == "ComboBox") {
    150     int value = dom->attribute("value").toInt();
     150    uint16_t value = dom->attribute("value").toUShort();
    151151    widget = new ComboBox(this, row, col, name, value);
    152152  }
     
    158158    float ymax = dom->attribute("max").toFloat();
    159159    int enabled = dom->attribute("enabled").toInt();
    160     int period = dom->attribute("period").toInt();
    161     if (enabled == 1) {
    162       widget = new DataPlot1D(this, row, col, name, ymin, ymax, true, period);
    163     } else {
    164       widget = new DataPlot1D(this, row, col, name, ymin, ymax, false, 100);
     160    uint16_t period = dom->attribute("period").toUShort();
     161    uint16_t nb_buffering = dom->attribute("nb_buf").toUShort();
     162    if (enabled == 1) {
     163      widget = new DataPlot1D(this, row, col, name, ymin, ymax, true, period,nb_buffering);
     164    } else {
     165      widget = new DataPlot1D(this, row, col, name, ymin, ymax, false, 100,nb_buffering);
    165166    }
    166167  }
     
    173174    QString y_name = dom->attribute("y_name");
    174175    int enabled = dom->attribute("enabled").toInt();
    175     int period = dom->attribute("period").toInt();
     176    uint16_t period = dom->attribute("period").toUShort();
     177    uint16_t nb_buffering = dom->attribute("nb_buf").toUShort();
    176178    if (enabled == 1) {
    177179      widget = new DataPlot2D(this, row, col, name, x_name, y_name, xmin, xmax,
    178                               ymin, ymax, true, period);
     180                              ymin, ymax, true, period,nb_buffering);
    179181    } else {
    180182      widget = new DataPlot2D(this, row, col, name, x_name, y_name, xmin, xmax,
    181                               ymin, ymax, false, 100);
     183                              ymin, ymax, false, 100,nb_buffering);
    182184    }
    183185  }
     
    187189    QString y_name = dom->attribute("y_name");
    188190    int enabled = dom->attribute("enabled").toInt();
    189     int period = dom->attribute("period").toInt();
     191    uint16_t period = dom->attribute("period").toUShort();
    190192    QString type = dom->attribute("type");
    191193    int samples = dom->attribute("samples").toInt();
     
    210212    uint32_t nb_samples = dom->attribute("nb_samples").toUInt();
    211213    int enabled = dom->attribute("enabled").toInt();
    212     int period = dom->attribute("period").toInt();
     214    uint16_t period = dom->attribute("period").toUShort();
    213215    int invert_axis = dom->attribute("invert_axis").toInt();
    214216    bool invert_axis_bool;
     
    234236    int height = dom->attribute("height").toInt();
    235237    int enabled = dom->attribute("enabled").toInt();
    236     int period = dom->attribute("period").toInt();
     238    uint16_t period = dom->attribute("period").toUShort();
    237239    if (enabled == 1) {
    238240      widget = new Picture(this, row, col, name, width, height, true, period);
     
    242244  }
    243245  if (type == "Map") {
    244     int period = dom->attribute("period").toInt();
     246    uint16_t period = dom->attribute("period").toUShort();
    245247    int enabled = dom->attribute("enabled").toInt();
    246248    int i = 0;
Note: See TracChangeset for help on using the changeset viewer.