2021-12-14 12:17:04 +01:00
|
|
|
package info.nightscout.androidaps.tile
|
|
|
|
|
|
|
|
import info.nightscout.androidaps.R
|
2022-01-10 21:15:43 +01:00
|
|
|
import info.nightscout.androidaps.interaction.TileConfigurationActivity
|
2021-12-14 12:17:04 +01:00
|
|
|
import info.nightscout.androidaps.interaction.actions.BolusActivity
|
|
|
|
import info.nightscout.androidaps.interaction.actions.ECarbActivity
|
|
|
|
import info.nightscout.androidaps.interaction.actions.TempTargetActivity
|
|
|
|
|
2022-01-10 21:15:43 +01:00
|
|
|
object ActionSource: TileSource {
|
2021-12-14 12:17:04 +01:00
|
|
|
|
2022-01-10 21:15:43 +01:00
|
|
|
override fun getActions(): List<Action> {
|
2021-12-14 12:17:04 +01:00
|
|
|
return listOf(
|
|
|
|
Action(
|
|
|
|
id = 0,
|
2022-01-10 21:15:43 +01:00
|
|
|
settingName = "wizzard",
|
2021-12-14 12:17:04 +01:00
|
|
|
nameRes = R.string.menu_wizard,
|
|
|
|
iconRes = R.drawable.ic_calculator_green,
|
2022-01-10 21:15:43 +01:00
|
|
|
activityClass = TileConfigurationActivity::class.java.getName(),
|
|
|
|
background = false,
|
|
|
|
actionString = "",
|
2021-12-14 12:17:04 +01:00
|
|
|
),
|
|
|
|
Action(
|
|
|
|
id = 1,
|
2022-01-10 21:15:43 +01:00
|
|
|
settingName = "bolus",
|
2021-12-14 12:17:04 +01:00
|
|
|
nameRes = R.string.action_bolus,
|
|
|
|
iconRes = R.drawable.ic_bolus_carbs,
|
|
|
|
activityClass = BolusActivity::class.java.getName(),
|
2022-01-10 21:15:43 +01:00
|
|
|
background = false,
|
|
|
|
actionString = "",
|
2021-12-14 12:17:04 +01:00
|
|
|
),
|
|
|
|
Action(
|
|
|
|
id = 2,
|
2022-01-10 21:15:43 +01:00
|
|
|
settingName = "carbs",
|
2021-12-14 12:17:04 +01:00
|
|
|
nameRes = R.string.action_carbs,
|
|
|
|
iconRes = R.drawable.ic_carbs_orange,
|
|
|
|
activityClass = ECarbActivity::class.java.getName(),
|
2022-01-10 21:15:43 +01:00
|
|
|
background = false,
|
|
|
|
actionString = "",
|
2021-12-14 12:17:04 +01:00
|
|
|
),
|
|
|
|
Action(
|
|
|
|
id = 3,
|
2022-01-10 21:15:43 +01:00
|
|
|
settingName = "temp_target",
|
2021-12-14 12:17:04 +01:00
|
|
|
nameRes = R.string.menu_tempt,
|
|
|
|
iconRes = R.drawable.ic_temptarget_flat,
|
|
|
|
activityClass = TempTargetActivity::class.java.getName(),
|
2022-01-10 21:15:43 +01:00
|
|
|
background = false,
|
|
|
|
actionString = "",
|
2021-12-14 12:17:04 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|