import QtQuick 6.0 QtObject { function getBatteryIcon(soc) { if (soc === undefined || soc === null || soc < 0) { return "\uf244"; //  } var socNum = Math.floor(soc); if (socNum <= 20) return "\uf244"; //  if (socNum <= 40) return "\uf243"; //  if (socNum <= 60) return "\uf242"; //  if (socNum <= 80) return "\uf241"; //  return "\uf240"; //  } function getDirectionIcon(direction) { if (!direction) return ""; switch (direction) { case "charge": return "\uf185"; //  case "discharge": return "\uf0e7"; //  case "idle": return "\uf186"; //  default: return ""; } } }