1. 08 Mar, 2021 1 commit
    • Arjen Hiemstra's avatar
      SensorDataModel: Do not insert columns that are out of range · b64edc57
      Arjen Hiemstra authored
      It may happen that the metadata for a later column arrives before an
      earlier one. In that case, we call beginInsertColumns with an out of
      range column index.
      
      This was verified to fix the the issue (and it still preserves the
      correct order) by scrambling the metadata requests in `sensorsChanged()`
      using std::shuffle and having the autotest still pass.
      
      BUG: 433064
      b64edc57
  2. 01 Mar, 2021 3 commits
  3. 28 Jan, 2021 1 commit
  4. 25 Jan, 2021 1 commit
  5. 05 Jan, 2021 2 commits
    • Arjen Hiemstra's avatar
      Add a "ready" property to SensorDataModel · f59359af
      Arjen Hiemstra authored
      This indicates the model has loaded the metadata for the current sensors
      and thus querying metadata properties for these sensors will not return
      invalid results.
      f59359af
    • Arjen Hiemstra's avatar
      Add API to Sensor and models to query current update rate · 8a5fb2ce
      Arjen Hiemstra authored
      This allows us to change things to read the update rate from sensors
      rather than needing to hardcode this. Right now the value for Sensor and
      SensorDataModel is hardcoded to 500ms, which matches the new update rate
      of KSystemStats. However, this new API allows us to change this without
      needing to update everything else in the future.
      8a5fb2ce
  6. 03 Dec, 2020 1 commit
  7. 26 Nov, 2020 1 commit
    • David Redondo's avatar
      Allow using ExtendedLegend without setting a chart on it · 39aa0184
      David Redondo authored
      This will be useful for SensorFaces that are not based on a QuickCharts chart.
      We already implicitely require the type of sourceModel to be SensorDataModel
      to format the sensor values. Make this explicit by stating the type. Use the data
      provided by the model for the legend. The colors can be injected into the model
      by the SensorFace to provide them to Legend. If "chart" is set, we continue
      using it.
      39aa0184
  8. 25 Nov, 2020 1 commit
    • David Redondo's avatar
      Do not insert non existing columns · 74db33b1
      David Redondo authored
      d->sensors is what we derive columnCount() from, when the sensors are changed
      or the model is reset we called beginInsertColumns for each sensor making the
      outwards state of the model inconsistent. For example
      when setting the sensors to a list of 4 sensors, beginInsertColumns would be
      called 4 times, making some outside observers of the model think it would have
      8 columns. So we need to initialize sensorInfos to avoid this.
      Found when using the model with a QTransposeProxyModel.
      74db33b1
  9. 23 Sep, 2020 1 commit
  10. 02 Jun, 2020 1 commit
    • Arjen Hiemstra's avatar
      Make SensorDataModel::sensorsChanged more stupid · efe78d56
      Arjen Hiemstra authored
      Rather than trying to figure out what the differences are, just remove
      all old sensors and add the new ones. This ensures the sort order of the
      new sensors is correct, instead of sorting being sort of random.
      efe78d56
  11. 28 May, 2020 2 commits
  12. 07 May, 2020 1 commit
    • Arjen Hiemstra's avatar
      Add KSysGuard::Sensors library · 5cfc09fd
      Arjen Hiemstra authored
      Summary:
      This adds a new library for communicating with a new KSysGuard
      DBus-based daemon that provides sensors. The daemon will be
      posted by d_ed later on.
      
      This new library pretty much maps the different objects from
      the daemon to C++ objects.
      
      Depends on D28333
      
      Test Plan: None yet, needs the new daemon.
      
      Reviewers: #plasma, davidedmundson
      
      Reviewed By: #plasma, davidedmundson
      
      Subscribers: ngraham, mart, zzag, plasma-devel
      
      Tags: #plasma
      
      Differential Revision: https://phabricator.kde.org/D28141
      5cfc09fd