Changeset View
Changeset View
Standalone View
Standalone View
Modules/energy/package/contents/ui/main.qml
Show First 20 Lines • Show All 95 Lines • ▼ Show 20 Line(s) | 93 | function modifier_chargeState(value) { | |||
---|---|---|---|---|---|
96 | case 1: return i18n("Charging") | 96 | case 1: return i18n("Charging") | ||
97 | case 2: return i18n("Discharging") | 97 | case 2: return i18n("Discharging") | ||
98 | case 3: return i18n("Fully charged") | 98 | case 3: return i18n("Fully charged") | ||
99 | } | 99 | } | ||
100 | } | 100 | } | ||
101 | 101 | | |||
102 | function modifier_technology(value) { | 102 | function modifier_technology(value) { | ||
103 | switch(value) { | 103 | switch(value) { | ||
104 | case 0: return i18n("Unknown Technology") | 104 | case 0: return i18n("Unknown technology") | ||
105 | case 1: return i18n("Lithium Ion") | 105 | case 1: return i18n("Lithium ion") | ||
106 | case 2: return i18n("Lithium Polymer") | 106 | case 2: return i18n("Lithium polymer") | ||
107 | case 3: return i18n("Lithium Iron Phosphate") | 107 | case 3: return i18n("Lithium iron phosphate") | ||
108 | case 4: return i18n("LeadAcid") | 108 | case 4: return i18n("Lead acid") | ||
109 | case 5: return i18n("Lead Acid") | 109 | case 5: return i18n("Nickel cadmium") | ||
110 | case 6: return i18n("Nickel Metal Hydride") | 110 | case 6: return i18n("Nickel metal hydride") | ||
alexde: Wouldn't it be better to define 0 as a default value? | |||||
alexde: Now you have two times the case 6 | |||||
111 | } | 111 | } | ||
112 | } | 112 | } | ||
113 | 113 | | |||
114 | implicitWidth: units.gridUnit * 30 | 114 | implicitWidth: units.gridUnit * 30 | ||
115 | implicitHeight: !!currentBattery ? units.gridUnit * 30 : units.gridUnit * 12 | 115 | implicitHeight: !!currentBattery ? units.gridUnit * 30 : units.gridUnit * 12 | ||
116 | 116 | | |||
117 | readonly property var timespanComboChoices: [i18n("Last hour"),i18n("Last 2 hours"),i18n("Last 12 hours"),i18n("Last 24 hours"),i18n("Last 48 hours"), i18n("Last 7 days")] | 117 | readonly property var timespanComboChoices: [i18n("Last hour"),i18n("Last 2 hours"),i18n("Last 12 hours"),i18n("Last 24 hours"),i18n("Last 48 hours"), i18n("Last 7 days")] | ||
118 | readonly property var timespanComboDurations: [3600, 7200, 43200, 86400, 172800, 604800] | 118 | readonly property var timespanComboDurations: [3600, 7200, 43200, 86400, 172800, 604800] | ||
▲ Show 20 Lines • Show All 402 Lines • Show Last 20 Lines |
Wouldn't it be better to define 0 as a default value?