Migrate some more old settings from old Channels.xml so they are translatable

This commit is contained in:
Mark Watkins 2016-03-17 08:56:59 +10:00
parent a231b1589c
commit 037289e6be
3 changed files with 149 additions and 39 deletions

View File

@ -174,6 +174,8 @@ extern ChannelID POS_Orientation, POS_Inclination;
const QString GRP_CPAP = "CPAP";
const QString GRP_POS = "POS";
const QString GRP_OXI = "OXI";
const QString GRP_JOURNAL = "JOURNAL";
const QString GRP_SLEEP = "SLEEP";
#endif // MACHINE_COMMON_H

View File

@ -473,6 +473,136 @@ void init()
ch->addOption(7, QObject::tr("ASV (Variable EPAP)"));
ch->addOption(8, QObject::tr("AVAPS"));
// <channel id="0x0800" class="data" name="BPSys" details="Blood Pressure Systolic" label="BPS" unit="mmHg" color="red"/>
// <channel id="0x0801" class="data" name="BPDia" details="Blood Pressure Diastolic" label="BPD" unit="mmHg" color="blue"/>
// <channel id="0x0802" class="data" name="Glucose" details="Blood Glucose" label="BGL" unit="mmol/L" color="black"/>
// <channel id="0x0803" class="data" scope="!day" name="Weight" details="Weight" label="Weight" unit="Kg" color="black"/>
schema::channel.add(GRP_JOURNAL, ch = new Channel(Journal_Weight = 0x0803, DATA, MT_JOURNAL, DAY,
"Weight", QObject::tr("Weight"),
QObject::tr("Weight"),
QObject::tr("Weight"), STR_UNIT_KG,
DOUBLE, Qt::black));
// Kids grow... but that adds a whole nother layer of complexity.
// <channel id="0x0804" class="data" scope="!day" name="Height" details="Height" label="Height" unit="cm" color="blue"/>
schema::channel.add(GRP_JOURNAL, ch = new Channel(0x0804, DATA, MT_JOURNAL, DAY,
"Height", QObject::tr("Height"),
QObject::tr("Physical Height"),
QObject::tr("Height"), STR_UNIT_CM,
DOUBLE, Qt::black));
// <channel id="0x0805" class="data" name="BookmarkNotes" details="Session Bookmark Notes" label="Bookmark Notes" unit="text" color="orange"/>
schema::channel.add(GRP_JOURNAL, ch = new Channel(0x0805, DATA, MT_JOURNAL, DAY,
"BookmarkNotes", QObject::tr("Notes"),
QObject::tr("Bookmark Notes"),
QObject::tr("Notes"), QString(),
STRING, Qt::black));
// <channel id="0x0806" class="data" name="BMI" details="Body Mass Index" label="BMI" unit="kg/m2" color="orange"/>
schema::channel.add(GRP_JOURNAL, ch = new Channel(Journal_BMI = 0x0806, DATA, MT_JOURNAL, DAY,
"BMI", QObject::tr("BMI"),
QObject::tr("Body Mass Index"),
QObject::tr("BMI"), QString(),
DOUBLE, Qt::black));
// <channel id="0x0807" class="data" name="ZombieMeter" details="How good you feel." label="Alive" unit="0-10" color="orange"/>
schema::channel.add(GRP_JOURNAL, ch = new Channel(Journal_ZombieMeter = 0x0807, DATA, MT_JOURNAL, DAY,
"ZombieMeter", QObject::tr("Zombie"),
QObject::tr("How you feel (0 = like crap, 10 = unstoppable)"),
QObject::tr("Zombie"), QString(),
DOUBLE, Qt::black));
// <channel id="0x0808" class="data" name="BookmarkStart" details="Session Bookmark Start" label="Bookmark Start" unit="duration" color="orange"/>
schema::channel.add(GRP_JOURNAL, ch = new Channel(0x0808, DATA, MT_JOURNAL, DAY,
"BookmarkStart", QObject::tr("Start"),
QObject::tr("Bookmark Start"),
QObject::tr("Start"), QString(),
INTEGER, Qt::black));
// <channel id="0x0809" class="data" name="BookmarkEnd" details="Session Bookmark End" label="Bookmark End" unit="duration" color="orange"/>
schema::channel.add(GRP_JOURNAL, ch = new Channel(0x0809, DATA, MT_JOURNAL, DAY,
"BookmarkEnd", QObject::tr("End"),
QObject::tr("Bookmark End"),
QObject::tr("End"), QString(),
DOUBLE, Qt::black));
// <channel id="0x080a" class="data" scope="!day" name="LastUpdated" details="Last Updated" label="Last Updated" unit="timestamp" color="orange"/>
schema::channel.add(GRP_JOURNAL, ch = new Channel(0x080a, DATA, MT_JOURNAL, DAY,
"LastUpdated", QObject::tr("Last Updated"),
QObject::tr("Last Updated"),
QObject::tr("Last Updated"), QString(),
DATETIME, Qt::black));
// <channel id="0xd000" class="data" scope="!day" unique="true" name="Journal" details="Journal Notes" label="Journal" type="richtext"/>
schema::channel.add(GRP_JOURNAL, ch = new Channel(Journal_Notes = 0xd000, DATA, MT_JOURNAL, DAY,
"Journal", QObject::tr("Journal Notes"),
QObject::tr("Journal Notes"),
QObject::tr("Journal"), QString(),
RICHTEXT, Qt::black));
// <channel id="0x2000" class="data" name="SleepStage" details="Sleep Stage" label="Sleep Stage" unit="1=Awake 2=REM 3=Light Sleep 4=Deep Sleep" color="dark grey"/>
schema::channel.add(GRP_SLEEP, ch = new Channel(ZEO_SleepStage = 0x2000, WAVEFORM, MT_SLEEPSTAGE, SESSION,
"SleepStage", QObject::tr("Sleep Stage"),
QObject::tr("1=Awake 2=REM 3=Light Sleep 4=Deep Sleep"),
QObject::tr("Sleep Stage"), QString(),
INTEGER, Qt::darkGray));
// <channel id="0x2001" class="data" name="ZeoBW" details="Zeo Brainwave" label="ZeoWave" color="black"/>
schema::channel.add(GRP_SLEEP, ch = new Channel(0x2001, WAVEFORM, MT_SLEEPSTAGE, SESSION,
"ZeoBW", QObject::tr("Brain Wave"),
QObject::tr("Brain Wave"),
QObject::tr("BrainWave"), QString(),
INTEGER, Qt::black));
// <channel id="0x2002" class="data" name="Awakenings" details="Awakenings" label="Awakenings" color="black"/>
schema::channel.add(GRP_SLEEP, ch = new Channel(ZEO_Awakenings = 0x2002, DATA, MT_SLEEPSTAGE, SESSION,
"Awakenings", QObject::tr("Awakenings"),
QObject::tr("Number of Awakenings"),
QObject::tr("Awakenings"), QString(),
INTEGER, Qt::black));
// <channel id="0x2003" class="data" name="MorningFeel" details="ZEO Morning Feel" label="Morning Feel" color="black"/>
schema::channel.add(GRP_SLEEP, ch = new Channel(ZEO_MorningFeel= 0x2003, DATA, MT_SLEEPSTAGE, SESSION,
"MorningFeel", QObject::tr("Morning Feel"),
QObject::tr("How you felt in the morning"),
QObject::tr("Morning Feel"), QString(),
INTEGER, Qt::black));
// <channel id="0x2004" class="data" name="TimeInWake" details="Time In Wake" label="Time In Wake" color="red"/>
schema::channel.add(GRP_SLEEP, ch = new Channel(ZEO_TimeInWake = 0x2004, DATA, MT_SLEEPSTAGE, SESSION,
"TimeInWake", QObject::tr("Time Awake"),
QObject::tr("Time spent awake"),
QObject::tr("Time Awake"), STR_UNIT_Minutes,
INTEGER, Qt::black));
// <channel id="0x2005" class="data" name="TimeInREM" details="Time In REM Sleep" label="Time In REM" color="green"/>
schema::channel.add(GRP_SLEEP, ch = new Channel(ZEO_TimeInREM = 0x2005, DATA, MT_SLEEPSTAGE, SESSION,
"TimeInREM", QObject::tr("Time In REM Sleep"),
QObject::tr("Time spent in REM Sleep"),
QObject::tr("Time in REM Sleep"), STR_UNIT_Minutes,
INTEGER, Qt::black));
// <channel id="0x2006" class="data" name="TimeInLight" details="Time In Light Sleep" label="Time In Light" color="blue"/>
schema::channel.add(GRP_SLEEP, ch = new Channel(ZEO_TimeInLight = 0x2006, DATA, MT_SLEEPSTAGE, SESSION,
"TimeInLight", QObject::tr("Time In Light Sleep"),
QObject::tr("Time spent in light sleep"),
QObject::tr("Time in Light Sleep"), STR_UNIT_Minutes,
INTEGER, Qt::black));
// <channel id="0x2007" class="data" name="TimeInDeep" details="Time In Deep Sleep" label="Time In Deep" color="magenta"/>
schema::channel.add(GRP_SLEEP, ch = new Channel(ZEO_TimeInDeep= 0x2007, DATA, MT_SLEEPSTAGE, SESSION,
"TimeInDeep", QObject::tr("Time In Deep Sleep"),
QObject::tr("Time spent in deep sleep"),
QObject::tr("Time in Deep Sleep"), STR_UNIT_Minutes,
INTEGER, Qt::black));
// <channel id="0x2008" class="data" name="TimeToZ" details="Time To Sleep" label="Time To Z" color="magenta"/>
schema::channel.add(GRP_SLEEP, ch = new Channel(ZEO_TimeInDeep= 0x2008, DATA, MT_SLEEPSTAGE, SESSION,
"TimeToZ", QObject::tr("Time to Sleep"),
QObject::tr("Time taken to get to sleep"),
QObject::tr("Time to Sleep"), STR_UNIT_Minutes,
INTEGER, Qt::black));
// <channel id="0x2009" class="data" name="ZeoZQ" details="ZEO ZQ" label="ZEO ZQ" color="magenta"/>
schema::channel.add(GRP_SLEEP, ch = new Channel(ZEO_ZQ=0x2009, DATA, MT_SLEEPSTAGE, SESSION,
"ZeoZQ", QObject::tr("Zeo ZQ"),
QObject::tr("Zeo sleep quality measurement"),
QObject::tr("ZEO Zq"), QString(),
INTEGER, Qt::black));
// <channel id="0x1200" class="setting" scope="!session" name="PAPMode" details="PAP Mode" label="PAP Mode" type="integer">
// <option id="0" value="CPAP"/>
@ -550,24 +680,24 @@ void init()
// OXI_Plethy=schema::channel["Plethy"].id();
// CPAP_AHI=schema::channel["AHI"].id();
// CPAP_RDI=schema::channel["RDI"].id();
Journal_Notes = schema::channel["Journal"].id();
Journal_Weight = schema::channel["Weight"].id();
Journal_BMI = schema::channel["BMI"].id();
Journal_ZombieMeter = schema::channel["ZombieMeter"].id();
LastUpdated = schema::channel["LastUpdated"].id();
Bookmark_Start = schema::channel["BookmarkStart"].id();
Bookmark_End = schema::channel["BookmarkEnd"].id();
Bookmark_Notes = schema::channel["BookmarkNotes"].id();
// Journal_Notes = schema::channel["Journal"].id();
// Journal_Weight = schema::channel["Weight"].id();
// Journal_BMI = schema::channel["BMI"].id();
// Journal_ZombieMeter = schema::channel["ZombieMeter"].id();
// LastUpdated = schema::channel["LastUpdated"].id();
// Bookmark_Start = schema::channel["BookmarkStart"].id();
// Bookmark_End = schema::channel["BookmarkEnd"].id();
// Bookmark_Notes = schema::channel["BookmarkNotes"].id();
ZEO_SleepStage = schema::channel["SleepStage"].id();
ZEO_ZQ = schema::channel["ZeoZQ"].id();
ZEO_Awakenings = schema::channel["Awakenings"].id();
ZEO_MorningFeel = schema::channel["MorningFeel"].id();
ZEO_TimeInWake = schema::channel["TimeInWake"].id();
ZEO_TimeInREM = schema::channel["TimeInREM"].id();
ZEO_TimeInLight = schema::channel["TimeInLight"].id();
ZEO_TimeInDeep = schema::channel["TimeInDeep"].id();
ZEO_TimeToZ = schema::channel["TimeToZ"].id();
// ZEO_SleepStage = schema::channel["SleepStage"].id();
// ZEO_ZQ = schema::channel["ZeoZQ"].id();
// ZEO_Awakenings = schema::channel["Awakenings"].id();
// ZEO_MorningFeel = schema::channel["MorningFeel"].id();
// ZEO_TimeInWake = schema::channel["TimeInWake"].id();
// ZEO_TimeInREM = schema::channel["TimeInREM"].id();
// ZEO_TimeInLight = schema::channel["TimeInLight"].id();
// ZEO_TimeInDeep = schema::channel["TimeInDeep"].id();
// ZEO_TimeToZ = schema::channel["TimeToZ"].id();
schema::channel[CPAP_Leak].setShowInOverview(true);
schema::channel[CPAP_RespRate].setShowInOverview(true);

View File

@ -46,30 +46,8 @@ Important: One id code per item, DO NOT CHANGE ID NUMBERS!!!
<group name="OXI">
</group>
<group name="SLEEP">
<channel id="0x2000" class="data" name="SleepStage" details="Sleep Stage" label="Sleep Stage" unit="1=Awake 2=REM 3=Light Sleep 4=Deep Sleep" color="dark grey"/>
<channel id="0x2001" class="data" name="ZeoBW" details="Zeo Brainwave" label="ZeoWave" color="black"/>
<channel id="0x2002" class="data" name="Awakenings" details="Awakenings" label="Awakenings" color="black"/>
<channel id="0x2003" class="data" name="MorningFeel" details="ZEO Morning Feel" label="Morning Feel" color="black"/>
<channel id="0x2004" class="data" name="TimeInWake" details="Time In Wake" label="Time In Wake" color="red"/>
<channel id="0x2005" class="data" name="TimeInREM" details="Time In REM Sleep" label="Time In REM" color="green"/>
<channel id="0x2006" class="data" name="TimeInLight" details="Time In Light Sleep" label="Time In Light" color="blue"/>
<channel id="0x2007" class="data" name="TimeInDeep" details="Time In Deep Sleep" label="Time In Deep" color="magenta"/>
<channel id="0x2008" class="data" name="TimeToZ" details="Time To Sleep" label="Time To Z" color="magenta"/>
<channel id="0x2009" class="data" name="ZeoZQ" details="ZEO ZQ" label="ZEO ZQ" color="magenta"/>
</group>
<group name="GENERAL">
<channel id="0x0800" class="data" name="BPSys" details="Blood Pressure Systolic" label="BPS" unit="mmHg" color="red"/>
<channel id="0x0801" class="data" name="BPDia" details="Blood Pressure Diastolic" label="BPD" unit="mmHg" color="blue"/>
<channel id="0x0802" class="data" name="Glucose" details="Blood Glucose" label="BGL" unit="mmol/L" color="black"/>
<channel id="0x0803" class="data" scope="!day" name="Weight" details="Weight" label="Weight" unit="Kg" color="black"/>
<channel id="0x0804" class="data" scope="!day" name="Height" details="Height" label="Height" unit="cm" color="blue"/>
<channel id="0x0805" class="data" name="BookmarkNotes" details="Session Bookmark Notes" label="Bookmark Notes" unit="text" color="orange"/>
<channel id="0x0806" class="data" name="BMI" details="Body Mass Index" label="BMI" unit="kg/m2" color="orange"/>
<channel id="0x0807" class="data" name="ZombieMeter" details="How good you feel." label="Alive" unit="0-10" color="orange"/>
<channel id="0x0808" class="data" name="BookmarkStart" details="Session Bookmark Start" label="Bookmark Start" unit="duration" color="orange"/>
<channel id="0x0809" class="data" name="BookmarkEnd" details="Session Bookmark End" label="Bookmark End" unit="duration" color="orange"/>
<channel id="0x080a" class="data" scope="!day" name="LastUpdated" details="Last Updated" label="Last Updated" unit="timestamp" color="orange"/>
<channel id="0xd000" class="data" scope="!day" unique="true" name="Journal" details="Journal Notes" label="Journal" type="richtext"/>
</group>
<group name="PRS1">
<!-- PRS1 Settings -->