globals.js 608 B

12345678910111213141516171819202122232425262728
  1. var tabBarModel = [["App Control", "appctrl.qml"], ["SysInfo", "sysinfo.qml"], ["Network", "ifedit.qml"], ["Storage Dev.", "stgdev.qml"]];
  2. var zeroBasedLabels = false;
  3. var ledGrey = "qrc:/img/led-grey24.png";
  4. var ledGreen = "qrc:/img/led-green24.png";
  5. var ledRed = "qrc:/img/led-red24.png";
  6. function getIoModuleXPos(index)
  7. {
  8. if(index >= 9)
  9. index -= 9;
  10. var cx = (800 - 20) / 9;
  11. return 10 + index * cx + index * 1.25;
  12. }
  13. function getIoModuleYPos(index)
  14. {
  15. return (index < 9) ? 50 : 265;
  16. }
  17. function isInternalIo(index)
  18. {
  19. return (index < 2);
  20. }
  21. function trunc(num)
  22. {
  23. return parseInt(num, 10);
  24. }