first commit
This commit is contained in:
@@ -0,0 +1,639 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<TrainingPlan>
|
||||
<Person>
|
||||
<FirstName>Herwig</FirstName>
|
||||
<LastName>Birke</LastName>
|
||||
<DayOfBirth>19680524</DayOfBirth>
|
||||
<Height>172</Height>
|
||||
<Weight>71</Weight>
|
||||
</Person>
|
||||
<Sport name="Running">
|
||||
<Pace>true</Pace>
|
||||
<MaxHR>195</MaxHR>
|
||||
<HR name="GA 1">
|
||||
<Desc>Grundlagen Ausdauer 1</Desc>
|
||||
<Min>60</Min>
|
||||
<Max>70</Max>
|
||||
</HR>
|
||||
<HR name="GA 2">
|
||||
<Desc>Grundlagen Ausdauer 2</Desc>
|
||||
<Min>70</Min>
|
||||
<Max>75</Max>
|
||||
</HR>
|
||||
<HR name="KA">
|
||||
<Desc>Kraft Ausdauer</Desc>
|
||||
<Min>75</Min>
|
||||
<Max>80</Max>
|
||||
</HR>
|
||||
<HR name="SK">
|
||||
<Desc>Schnellkraft</Desc>
|
||||
<Min>80</Min>
|
||||
<Max>90</Max>
|
||||
</HR>
|
||||
<HR name="SWA">
|
||||
<Min>90</Min>
|
||||
<Max>100</Max>
|
||||
</HR>
|
||||
</Sport>
|
||||
<Name>Halbmarathon - 1:30</Name>
|
||||
<StartDate>20100816</StartDate>
|
||||
<Day num="2">
|
||||
<Desc>Intervall RT</Desc>
|
||||
<Session num="0">
|
||||
<Sport>Running</Sport>
|
||||
<Desc>Intervall RT</Desc>
|
||||
<Task num="0">
|
||||
<Desc>Aufwärmen</Desc>
|
||||
<Count>1</Count>
|
||||
<Dist>2000</Dist>
|
||||
<HR>GA 1 (117 - 136)</HR>
|
||||
<Pace>328</Pace>
|
||||
<Time>656</Time>
|
||||
</Task>
|
||||
<Task num="1">
|
||||
<Desc>Intervall</Desc>
|
||||
<Count>4</Count>
|
||||
<Dist>2000</Dist>
|
||||
<HR>SK (156 - 175)</HR>
|
||||
<Pace>248</Pace>
|
||||
<Time>496</Time>
|
||||
<PauseDist>700</PauseDist>
|
||||
<PauseHR>GA 1 (117 - 136)</PauseHR>
|
||||
<PausePace>360</PausePace>
|
||||
<PauseTime>252</PauseTime>
|
||||
</Task>
|
||||
<Task num="2">
|
||||
<Desc>Auslaufen</Desc>
|
||||
<Count>1</Count>
|
||||
<Dist>2000</Dist>
|
||||
<HR>GA 1 (117 - 136)</HR>
|
||||
<Pace>328</Pace>
|
||||
<Time>656</Time>
|
||||
</Task>
|
||||
</Session>
|
||||
</Day>
|
||||
<Day num="3">
|
||||
<Desc>Ruhiger Dauerlauf</Desc>
|
||||
<Session num="0">
|
||||
<Sport>Running</Sport>
|
||||
<Desc>Ruhiger Dauerlauf</Desc>
|
||||
<Task num="0">
|
||||
<Desc>Dauerlauf</Desc>
|
||||
<Count>1</Count>
|
||||
<Dist>12000</Dist>
|
||||
<HR>GA 2 (136 - 146)</HR>
|
||||
<Pace>305</Pace>
|
||||
<Time>3660</Time>
|
||||
</Task>
|
||||
</Session>
|
||||
</Day>
|
||||
<Day num="4">
|
||||
<Desc>Tempolauf</Desc>
|
||||
<Session num="0">
|
||||
<Sport>Running</Sport>
|
||||
<Desc>Tempolauf</Desc>
|
||||
<Task num="0">
|
||||
<Desc>Aufwärmen</Desc>
|
||||
<Count>1</Count>
|
||||
<Dist>3000</Dist>
|
||||
<HR>GA 1 (117 - 136)</HR>
|
||||
<Pace>360</Pace>
|
||||
<Time>1080</Time>
|
||||
</Task>
|
||||
<Task num="1">
|
||||
<Desc>Tempolauf</Desc>
|
||||
<Count>1</Count>
|
||||
<Dist>10000</Dist>
|
||||
<HR>SK (156 - 175)</HR>
|
||||
<Pace>265</Pace>
|
||||
<Time>2650</Time>
|
||||
</Task>
|
||||
<Task num="2">
|
||||
<Desc>Auslaufen</Desc>
|
||||
<Count>1</Count>
|
||||
<Dist>2000</Dist>
|
||||
<HR>GA 1 (117 - 136)</HR>
|
||||
<Pace>360</Pace>
|
||||
<Time>720</Time>
|
||||
</Task>
|
||||
</Session>
|
||||
</Day>
|
||||
<Day num="6">
|
||||
<Desc>Ruhiger DL</Desc>
|
||||
<Session num="0">
|
||||
<Sport>Running</Sport>
|
||||
<Desc>Ruhiger DL</Desc>
|
||||
<Task num="0">
|
||||
<Desc>Dauerlauf</Desc>
|
||||
<Count>1</Count>
|
||||
<Dist>12000</Dist>
|
||||
<HR>GA 2 (136 - 146)</HR>
|
||||
<Pace>300</Pace>
|
||||
<Time>3600</Time>
|
||||
</Task>
|
||||
</Session>
|
||||
</Day>
|
||||
<Day num="7">
|
||||
<Desc>Langer DL</Desc>
|
||||
<Session num="0">
|
||||
<Sport>Running</Sport>
|
||||
<Desc>Langer DL</Desc>
|
||||
<Task num="0">
|
||||
<Desc>Dauerlauf</Desc>
|
||||
<Count>1</Count>
|
||||
<Dist>19000</Dist>
|
||||
<HR>GA 1 (117 - 136)</HR>
|
||||
<Pace>345</Pace>
|
||||
<Time>6555</Time>
|
||||
</Task>
|
||||
</Session>
|
||||
</Day>
|
||||
<Day num="9">
|
||||
<Desc>Intervall</Desc>
|
||||
<Session num="0">
|
||||
<Sport>Running</Sport>
|
||||
<Desc>Intervall</Desc>
|
||||
<Task num="0">
|
||||
<Desc>Aufwärmen</Desc>
|
||||
<Count>1</Count>
|
||||
<Dist>3000</Dist>
|
||||
<HR>GA 1 (117 - 136)</HR>
|
||||
<Pace>360</Pace>
|
||||
<Time>1080</Time>
|
||||
</Task>
|
||||
<Task num="1">
|
||||
<Desc>Intervall</Desc>
|
||||
<Count>4</Count>
|
||||
<Dist>1000</Dist>
|
||||
<HR>SK (156 - 175)</HR>
|
||||
<Pace>231</Pace>
|
||||
<Time>231</Time>
|
||||
<PauseDist>400</PauseDist>
|
||||
<PauseHR>GA 1 (117 - 136)</PauseHR>
|
||||
<PausePace>360</PausePace>
|
||||
<PauseTime>144</PauseTime>
|
||||
</Task>
|
||||
<Task num="2">
|
||||
<Desc>Auslaufen</Desc>
|
||||
<Count>1</Count>
|
||||
<Dist>3000</Dist>
|
||||
<HR>GA 1 (117 - 136)</HR>
|
||||
<Pace>360</Pace>
|
||||
<Time>1080</Time>
|
||||
</Task>
|
||||
</Session>
|
||||
</Day>
|
||||
<Day num="10">
|
||||
<Desc>Ruhiger DL</Desc>
|
||||
<Session num="0">
|
||||
<Sport>Running</Sport>
|
||||
<Desc>Ruhiger DL</Desc>
|
||||
<Task num="0">
|
||||
<Desc>Dauerlauf</Desc>
|
||||
<Count>1</Count>
|
||||
<Dist>12000</Dist>
|
||||
<HR>GA 1 (117 - 136)</HR>
|
||||
<Pace>300</Pace>
|
||||
<Time>3600</Time>
|
||||
</Task>
|
||||
</Session>
|
||||
</Day>
|
||||
<Day num="11">
|
||||
<Desc>Tempolauf</Desc>
|
||||
<Session num="0">
|
||||
<Sport>Running</Sport>
|
||||
<Desc>Tempolauf</Desc>
|
||||
<Task num="0">
|
||||
<Desc>Aufwärmen</Desc>
|
||||
<Count>1</Count>
|
||||
<Dist>3000</Dist>
|
||||
<HR>GA 1 (117 - 136)</HR>
|
||||
<Pace>360</Pace>
|
||||
<Time>1080</Time>
|
||||
</Task>
|
||||
<Task num="1">
|
||||
<Desc>Tempolauf</Desc>
|
||||
<Count>1</Count>
|
||||
<Dist>10000</Dist>
|
||||
<HR>SK (156 - 175)</HR>
|
||||
<Pace>265</Pace>
|
||||
<Time>2650</Time>
|
||||
</Task>
|
||||
<Task num="2">
|
||||
<Desc>Auslaufen</Desc>
|
||||
<Count>1</Count>
|
||||
<Dist>2000</Dist>
|
||||
<HR>GA 1 (117 - 136)</HR>
|
||||
<Pace>360</Pace>
|
||||
<Time>720</Time>
|
||||
</Task>
|
||||
</Session>
|
||||
</Day>
|
||||
<Day num="13">
|
||||
<Desc>Ruhiger DL</Desc>
|
||||
<Session num="0">
|
||||
<Sport>Running</Sport>
|
||||
<Desc>Ruhiger DL</Desc>
|
||||
<Task num="0">
|
||||
<Desc>Dauerlauf</Desc>
|
||||
<Count>1</Count>
|
||||
<Dist>12000</Dist>
|
||||
<HR>GA 1 (117 - 136)</HR>
|
||||
<Pace>300</Pace>
|
||||
<Time>3600</Time>
|
||||
</Task>
|
||||
</Session>
|
||||
</Day>
|
||||
<Day num="14">
|
||||
<Desc>Langer DL</Desc>
|
||||
<Session num="0">
|
||||
<Sport>Running</Sport>
|
||||
<Desc>Langer DL</Desc>
|
||||
<Task num="0">
|
||||
<Desc>Dauerlauf</Desc>
|
||||
<Count>1</Count>
|
||||
<Dist>21000</Dist>
|
||||
<HR>GA 1 (117 - 136)</HR>
|
||||
<Pace>345</Pace>
|
||||
<Time>7245</Time>
|
||||
</Task>
|
||||
</Session>
|
||||
</Day>
|
||||
<Day num="16">
|
||||
<Desc>Intervall RT</Desc>
|
||||
<Session num="0">
|
||||
<Sport>Running</Sport>
|
||||
<Desc>Intervall RT</Desc>
|
||||
<Task num="0">
|
||||
<Desc>Aufwärmen</Desc>
|
||||
<Count>1</Count>
|
||||
<Dist>2000</Dist>
|
||||
<HR>GA 1 (117 - 136)</HR>
|
||||
<Pace>328</Pace>
|
||||
<Time>656</Time>
|
||||
</Task>
|
||||
<Task num="1">
|
||||
<Desc>Intervall</Desc>
|
||||
<Count>4</Count>
|
||||
<Dist>2000</Dist>
|
||||
<HR>SK (156 - 175)</HR>
|
||||
<Pace>248</Pace>
|
||||
<Time>496</Time>
|
||||
<PauseDist>700</PauseDist>
|
||||
<PauseHR>GA 1 (117 - 136)</PauseHR>
|
||||
<PausePace>360</PausePace>
|
||||
<PauseTime>252</PauseTime>
|
||||
</Task>
|
||||
<Task num="2">
|
||||
<Desc>Auslaufen</Desc>
|
||||
<Count>1</Count>
|
||||
<Dist>2000</Dist>
|
||||
<HR>GA 1 (117 - 136)</HR>
|
||||
<Pace>328</Pace>
|
||||
<Time>656</Time>
|
||||
</Task>
|
||||
</Session>
|
||||
</Day>
|
||||
<Day num="17">
|
||||
<Desc>Ruhiger DL</Desc>
|
||||
<Session num="0">
|
||||
<Sport>Running</Sport>
|
||||
<Desc>Ruhiger DL</Desc>
|
||||
<Task num="0">
|
||||
<Desc>Dauerlauf</Desc>
|
||||
<Count>1</Count>
|
||||
<Dist>12000</Dist>
|
||||
<HR>GA 1 (117 - 136)</HR>
|
||||
<Pace>300</Pace>
|
||||
<Time>3600</Time>
|
||||
</Task>
|
||||
</Session>
|
||||
</Day>
|
||||
<Day num="18">
|
||||
<Desc>Tempolauf</Desc>
|
||||
<Session num="0">
|
||||
<Sport>Running</Sport>
|
||||
<Desc>Tempolauf</Desc>
|
||||
<Task num="0">
|
||||
<Desc>Aufwärmen</Desc>
|
||||
<Count>1</Count>
|
||||
<Dist>3000</Dist>
|
||||
<HR>GA 1 (117 - 136)</HR>
|
||||
<Pace>360</Pace>
|
||||
<Time>1080</Time>
|
||||
</Task>
|
||||
<Task num="1">
|
||||
<Desc>Tempolauf</Desc>
|
||||
<Count>1</Count>
|
||||
<Dist>10000</Dist>
|
||||
<HR>SK (156 - 175)</HR>
|
||||
<Pace>265</Pace>
|
||||
<Time>2650</Time>
|
||||
</Task>
|
||||
<Task num="2">
|
||||
<Desc>Auslaufen</Desc>
|
||||
<Count>1</Count>
|
||||
<Dist>2000</Dist>
|
||||
<HR>GA 1 (117 - 136)</HR>
|
||||
<Pace>360</Pace>
|
||||
<Time>720</Time>
|
||||
</Task>
|
||||
</Session>
|
||||
</Day>
|
||||
<Day num="20">
|
||||
<Desc>Ruhiger DL</Desc>
|
||||
<Session num="0">
|
||||
<Sport>Running</Sport>
|
||||
<Desc>Ruhiger DL</Desc>
|
||||
<Task num="0">
|
||||
<Desc>Dauerlauf</Desc>
|
||||
<Count>1</Count>
|
||||
<Dist>12000</Dist>
|
||||
<HR>GA 1 (117 - 136)</HR>
|
||||
<Pace>300</Pace>
|
||||
<Time>3600</Time>
|
||||
</Task>
|
||||
</Session>
|
||||
</Day>
|
||||
<Day num="21">
|
||||
<Desc>Langer DL</Desc>
|
||||
<Session num="0">
|
||||
<Sport>Running</Sport>
|
||||
<Desc>Langer DL</Desc>
|
||||
<Task num="0">
|
||||
<Desc>Dauerlauf</Desc>
|
||||
<Count>1</Count>
|
||||
<Dist>23000</Dist>
|
||||
<HR>GA 1 (117 - 136)</HR>
|
||||
<Pace>345</Pace>
|
||||
<Time>7935</Time>
|
||||
</Task>
|
||||
</Session>
|
||||
</Day>
|
||||
<Day num="23">
|
||||
<Desc>Intervall</Desc>
|
||||
<Session num="0">
|
||||
<Sport>Running</Sport>
|
||||
<Desc>Intervall</Desc>
|
||||
<Task num="0">
|
||||
<Desc>Aufwärmen</Desc>
|
||||
<Count>1</Count>
|
||||
<Dist>3000</Dist>
|
||||
<HR>GA 1 (117 - 136)</HR>
|
||||
<Pace>360</Pace>
|
||||
<Time>1080</Time>
|
||||
</Task>
|
||||
<Task num="1">
|
||||
<Desc>Intervall</Desc>
|
||||
<Count>5</Count>
|
||||
<Dist>1000</Dist>
|
||||
<HR>SK (156 - 175)</HR>
|
||||
<Pace>231</Pace>
|
||||
<Time>231</Time>
|
||||
<PauseDist>400</PauseDist>
|
||||
<PauseHR>GA 1 (117 - 136)</PauseHR>
|
||||
<PausePace>360</PausePace>
|
||||
<PauseTime>144</PauseTime>
|
||||
</Task>
|
||||
<Task num="2">
|
||||
<Desc>Auslaufen</Desc>
|
||||
<Count>1</Count>
|
||||
<Dist>3000</Dist>
|
||||
<HR>GA 1 (117 - 136)</HR>
|
||||
<Pace>360</Pace>
|
||||
<Time>1080</Time>
|
||||
</Task>
|
||||
</Session>
|
||||
</Day>
|
||||
<Day num="24">
|
||||
<Desc>Ruhiger DL</Desc>
|
||||
<Session num="0">
|
||||
<Sport>Running</Sport>
|
||||
<Desc>Ruhiger DL</Desc>
|
||||
<Task num="0">
|
||||
<Desc>Dauerlauf</Desc>
|
||||
<Count>1</Count>
|
||||
<Dist>12000</Dist>
|
||||
<HR>GA 1 (117 - 136)</HR>
|
||||
<Pace>300</Pace>
|
||||
<Time>3600</Time>
|
||||
</Task>
|
||||
</Session>
|
||||
</Day>
|
||||
<Day num="25">
|
||||
<Desc>Jogging Steigerungen</Desc>
|
||||
<Session num="0">
|
||||
<Sport>Running</Sport>
|
||||
<Desc>Jogging Steigerungen</Desc>
|
||||
<Task num="0">
|
||||
<Desc>Jogging Steigerungen</Desc>
|
||||
<Count>1</Count>
|
||||
<Dist>8000</Dist>
|
||||
<HR>GA 1 (117 - 136)</HR>
|
||||
<Pace>360</Pace>
|
||||
<Time>2880</Time>
|
||||
</Task>
|
||||
</Session>
|
||||
</Day>
|
||||
<Day num="27">
|
||||
<Desc>Speed Up</Desc>
|
||||
<Session num="0">
|
||||
<Sport>Running</Sport>
|
||||
<Desc>Jogging Steigerungen</Desc>
|
||||
<Task num="0">
|
||||
<Desc>Jogging Steigerungen</Desc>
|
||||
<Count>1</Count>
|
||||
<Dist>5000</Dist>
|
||||
<HR>GA 1 (117 - 136)</HR>
|
||||
<Pace>360</Pace>
|
||||
<Time>1800</Time>
|
||||
</Task>
|
||||
</Session>
|
||||
</Day>
|
||||
<Day num="28">
|
||||
<Desc>Rennen 10km</Desc>
|
||||
<Session num="0">
|
||||
<Sport>Running</Sport>
|
||||
<Desc>Rennen 10km</Desc>
|
||||
<Task num="0">
|
||||
<Desc>Rennen</Desc>
|
||||
<Count>1</Count>
|
||||
<Dist>10000</Dist>
|
||||
<HR>SWA (175 - 195)</HR>
|
||||
<Pace>235</Pace>
|
||||
<Time>2350</Time>
|
||||
</Task>
|
||||
</Session>
|
||||
</Day>
|
||||
<Day num="30">
|
||||
<Desc>Jogging</Desc>
|
||||
<Session num="0">
|
||||
<Sport>Running</Sport>
|
||||
<Desc>Jogging</Desc>
|
||||
<Task num="0">
|
||||
<Desc>Jogging</Desc>
|
||||
<Count>1</Count>
|
||||
<Dist>16000</Dist>
|
||||
<HR>GA 1 (117 - 136)</HR>
|
||||
<Pace>345</Pace>
|
||||
<Time>5520</Time>
|
||||
</Task>
|
||||
</Session>
|
||||
</Day>
|
||||
<Day num="31">
|
||||
<Desc>Ruhiger DL</Desc>
|
||||
<Session num="0">
|
||||
<Sport>Running</Sport>
|
||||
<Desc>Ruhiger DL</Desc>
|
||||
<Task num="0">
|
||||
<Desc>Ruhiger DL</Desc>
|
||||
<Count>1</Count>
|
||||
<Dist>14000</Dist>
|
||||
<HR>GA 1 (117 - 136)</HR>
|
||||
<Pace>300</Pace>
|
||||
<Time>4200</Time>
|
||||
</Task>
|
||||
</Session>
|
||||
</Day>
|
||||
<Day num="32">
|
||||
<Desc>Kurzer Tempolauf</Desc>
|
||||
<Session num="0">
|
||||
<Sport>Running</Sport>
|
||||
<Desc>Kurzer Tempolauf</Desc>
|
||||
<Task num="0">
|
||||
<Desc>Aufwärmen</Desc>
|
||||
<Count>1</Count>
|
||||
<Dist>3000</Dist>
|
||||
<HR>GA 1 (117 - 136)</HR>
|
||||
<Pace>360</Pace>
|
||||
<Time>1080</Time>
|
||||
</Task>
|
||||
<Task num="1">
|
||||
<Desc>Tempolauf</Desc>
|
||||
<Count>1</Count>
|
||||
<Dist>5000</Dist>
|
||||
<HR>SK (156 - 175)</HR>
|
||||
<Pace>265</Pace>
|
||||
<Time>1325</Time>
|
||||
</Task>
|
||||
<Task num="2">
|
||||
<Desc>Auslaufen</Desc>
|
||||
<Count>1</Count>
|
||||
<Dist>2000</Dist>
|
||||
<HR>GA 1 (117 - 136)</HR>
|
||||
<Pace>360</Pace>
|
||||
<Time>720</Time>
|
||||
</Task>
|
||||
</Session>
|
||||
</Day>
|
||||
<Day num="34">
|
||||
<Desc>Langer DL</Desc>
|
||||
<Session num="0">
|
||||
<Sport>Running</Sport>
|
||||
<Desc>Langer DL</Desc>
|
||||
<Task num="0">
|
||||
<Desc>Dauerlauf</Desc>
|
||||
<Count>1</Count>
|
||||
<Dist>19000</Dist>
|
||||
<HR>GA 1 (117 - 136)</HR>
|
||||
<Pace>345</Pace>
|
||||
<Time>6555</Time>
|
||||
</Task>
|
||||
</Session>
|
||||
</Day>
|
||||
<Day num="35">
|
||||
<Desc>Jogging</Desc>
|
||||
<Session num="0">
|
||||
<Sport>Running</Sport>
|
||||
<Desc>Jogging</Desc>
|
||||
<Task num="0">
|
||||
<Desc>Jogging</Desc>
|
||||
<Count>1</Count>
|
||||
<Dist>11000</Dist>
|
||||
<HR>GA 1 (117 - 136)</HR>
|
||||
<Pace>345</Pace>
|
||||
<Time>3795</Time>
|
||||
</Task>
|
||||
</Session>
|
||||
</Day>
|
||||
<Day num="37">
|
||||
<Desc>Intervall RT</Desc>
|
||||
<Session num="0">
|
||||
<Sport>Running</Sport>
|
||||
<Desc>Intervall RT</Desc>
|
||||
<Task num="0">
|
||||
<Desc>Aufwärmen</Desc>
|
||||
<Count>1</Count>
|
||||
<Dist>2000</Dist>
|
||||
<HR>GA 1 (117 - 136)</HR>
|
||||
<Pace>328</Pace>
|
||||
<Time>656</Time>
|
||||
</Task>
|
||||
<Task num="1">
|
||||
<Desc>Intervall</Desc>
|
||||
<Count>3</Count>
|
||||
<Dist>3000</Dist>
|
||||
<HR>SK (156 - 175)</HR>
|
||||
<Pace>248</Pace>
|
||||
<Time>744</Time>
|
||||
<PauseDist>1000</PauseDist>
|
||||
<PauseHR>GA 1 (117 - 136)</PauseHR>
|
||||
<PausePace>360</PausePace>
|
||||
<PauseTime>360</PauseTime>
|
||||
</Task>
|
||||
<Task num="2">
|
||||
<Desc>Auslaufen</Desc>
|
||||
<Count>1</Count>
|
||||
<Dist>2000</Dist>
|
||||
<HR>GA 1 (117 - 136)</HR>
|
||||
<Pace>328</Pace>
|
||||
<Time>656</Time>
|
||||
</Task>
|
||||
</Session>
|
||||
</Day>
|
||||
<Day num="39">
|
||||
<Desc>Jogging</Desc>
|
||||
<Session num="0">
|
||||
<Sport>Running</Sport>
|
||||
<Desc>Jogging</Desc>
|
||||
<Task num="0">
|
||||
<Desc>Jogging</Desc>
|
||||
<Count>1</Count>
|
||||
<Dist>8000</Dist>
|
||||
<HR>GA 1 (117 - 136)</HR>
|
||||
<Pace>345</Pace>
|
||||
<Time>2760</Time>
|
||||
</Task>
|
||||
</Session>
|
||||
</Day>
|
||||
<Day num="41">
|
||||
<Desc>peed Up</Desc>
|
||||
<Session num="0">
|
||||
<Sport>Running</Sport>
|
||||
<Desc>Jogging Steigerungen</Desc>
|
||||
<Task num="0">
|
||||
<Desc>Jogging Steigerungen</Desc>
|
||||
<Count>1</Count>
|
||||
<Dist>5000</Dist>
|
||||
<HR>GA 1 (117 - 136)</HR>
|
||||
<Pace>360</Pace>
|
||||
<Time>1800</Time>
|
||||
</Task>
|
||||
</Session>
|
||||
</Day>
|
||||
<Day num="42">
|
||||
<Desc>Halbmarathon</Desc>
|
||||
<Session num="0">
|
||||
<Sport>Running</Sport>
|
||||
<Desc>Halbmarathon</Desc>
|
||||
<Task num="0">
|
||||
<Desc>Halbmarathon</Desc>
|
||||
<Count>1</Count>
|
||||
<Dist>21100</Dist>
|
||||
<HR>SWA (175 - 195)</HR>
|
||||
<Pace>247</Pace>
|
||||
<Time>5232</Time>
|
||||
</Task>
|
||||
</Session>
|
||||
</Day>
|
||||
</TrainingPlan>
|
||||
@@ -0,0 +1,416 @@
|
||||
#############################################################################
|
||||
# Makefile for building: qtTrainingPlan
|
||||
# Generated by qmake (2.01a) (Qt 4.6.2) on: Mon May 31 07:25:13 2010
|
||||
# Project: qtTrainingPlan.pro
|
||||
# Template: app
|
||||
# Command: /usr/bin/qmake-qt4 -spec /usr/share/qt4/mkspecs/linux-g++ -unix CONFIG+=debug -o Makefile qtTrainingPlan.pro
|
||||
#############################################################################
|
||||
|
||||
####### Compiler, tools and options
|
||||
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
DEFINES = -DQT_WEBKIT_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
|
||||
CFLAGS = -pipe -g -Wall -W -D_REENTRANT $(DEFINES)
|
||||
CXXFLAGS = -pipe -g -Wall -W -D_REENTRANT $(DEFINES)
|
||||
INCPATH = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtWebKit -I/usr/include/qt4 -I. -I.
|
||||
LINK = g++
|
||||
LFLAGS =
|
||||
LIBS = $(SUBLIBS) -L/usr/lib -lQtWebKit -lQtXml -lQtGui -lQtCore -lpthread
|
||||
AR = ar cqs
|
||||
RANLIB =
|
||||
QMAKE = /usr/bin/qmake-qt4
|
||||
TAR = tar -cf
|
||||
COMPRESS = gzip -9f
|
||||
COPY = cp -f
|
||||
SED = sed
|
||||
COPY_FILE = $(COPY)
|
||||
COPY_DIR = $(COPY) -r
|
||||
STRIP = strip
|
||||
INSTALL_FILE = install -m 644 -p
|
||||
INSTALL_DIR = $(COPY_DIR)
|
||||
INSTALL_PROGRAM = install -m 755 -p
|
||||
DEL_FILE = rm -f
|
||||
SYMLINK = ln -f -s
|
||||
DEL_DIR = rmdir
|
||||
MOVE = mv -f
|
||||
CHK_DIR_EXISTS= test -d
|
||||
MKDIR = mkdir -p
|
||||
|
||||
####### Output directory
|
||||
|
||||
OBJECTS_DIR = ./
|
||||
|
||||
####### Files
|
||||
|
||||
SOURCES = main.cpp \
|
||||
mainwindow.cpp \
|
||||
ctraining.cpp \
|
||||
common.cpp \
|
||||
ctime.cpp \
|
||||
cclientdata.cpp \
|
||||
cedittraining.cpp \
|
||||
ceditday.cpp \
|
||||
ceditsession.cpp \
|
||||
cedittask.cpp \
|
||||
cedittasks.cpp \
|
||||
cexportpdf.cpp \
|
||||
ceditsport.cpp \
|
||||
cedithr.cpp moc_mainwindow.cpp \
|
||||
moc_cedittraining.cpp \
|
||||
moc_ceditday.cpp \
|
||||
moc_ceditsession.cpp \
|
||||
moc_cedittask.cpp \
|
||||
moc_cedittasks.cpp \
|
||||
moc_cexportpdf.cpp \
|
||||
moc_ceditsport.cpp \
|
||||
moc_cedithr.cpp
|
||||
OBJECTS = main.o \
|
||||
mainwindow.o \
|
||||
ctraining.o \
|
||||
common.o \
|
||||
ctime.o \
|
||||
cclientdata.o \
|
||||
cedittraining.o \
|
||||
ceditday.o \
|
||||
ceditsession.o \
|
||||
cedittask.o \
|
||||
cedittasks.o \
|
||||
cexportpdf.o \
|
||||
ceditsport.o \
|
||||
cedithr.o \
|
||||
moc_mainwindow.o \
|
||||
moc_cedittraining.o \
|
||||
moc_ceditday.o \
|
||||
moc_ceditsession.o \
|
||||
moc_cedittask.o \
|
||||
moc_cedittasks.o \
|
||||
moc_cexportpdf.o \
|
||||
moc_ceditsport.o \
|
||||
moc_cedithr.o
|
||||
DIST = /usr/share/qt4/mkspecs/common/g++.conf \
|
||||
/usr/share/qt4/mkspecs/common/unix.conf \
|
||||
/usr/share/qt4/mkspecs/common/linux.conf \
|
||||
/usr/share/qt4/mkspecs/qconfig.pri \
|
||||
/usr/share/qt4/mkspecs/features/qt_functions.prf \
|
||||
/usr/share/qt4/mkspecs/features/qt_config.prf \
|
||||
/usr/share/qt4/mkspecs/features/exclusive_builds.prf \
|
||||
/usr/share/qt4/mkspecs/features/default_pre.prf \
|
||||
/usr/share/qt4/mkspecs/features/debug.prf \
|
||||
/usr/share/qt4/mkspecs/features/default_post.prf \
|
||||
/usr/share/qt4/mkspecs/features/warn_on.prf \
|
||||
/usr/share/qt4/mkspecs/features/qt.prf \
|
||||
/usr/share/qt4/mkspecs/features/unix/thread.prf \
|
||||
/usr/share/qt4/mkspecs/features/moc.prf \
|
||||
/usr/share/qt4/mkspecs/features/resources.prf \
|
||||
/usr/share/qt4/mkspecs/features/uic.prf \
|
||||
/usr/share/qt4/mkspecs/features/yacc.prf \
|
||||
/usr/share/qt4/mkspecs/features/lex.prf \
|
||||
/usr/share/qt4/mkspecs/features/include_source_dir.prf \
|
||||
qtTrainingPlan.pro
|
||||
QMAKE_TARGET = qtTrainingPlan
|
||||
DESTDIR =
|
||||
TARGET = qtTrainingPlan
|
||||
|
||||
first: all
|
||||
####### Implicit rules
|
||||
|
||||
.SUFFIXES: .o .c .cpp .cc .cxx .C
|
||||
|
||||
.cpp.o:
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
|
||||
|
||||
.cc.o:
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
|
||||
|
||||
.cxx.o:
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
|
||||
|
||||
.C.o:
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
|
||||
|
||||
####### Build rules
|
||||
|
||||
all: Makefile $(TARGET)
|
||||
|
||||
$(TARGET): ui_mainwindow.h ui_cedittraining.h ui_ceditday.h ui_ceditsession.h ui_cedittask.h ui_cedittasks.h ui_cexportpdf.h ui_ceditsport.h ui_cedithr.h $(OBJECTS)
|
||||
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
|
||||
|
||||
Makefile: qtTrainingPlan.pro /usr/share/qt4/mkspecs/linux-g++/qmake.conf /usr/share/qt4/mkspecs/common/g++.conf \
|
||||
/usr/share/qt4/mkspecs/common/unix.conf \
|
||||
/usr/share/qt4/mkspecs/common/linux.conf \
|
||||
/usr/share/qt4/mkspecs/qconfig.pri \
|
||||
/usr/share/qt4/mkspecs/features/qt_functions.prf \
|
||||
/usr/share/qt4/mkspecs/features/qt_config.prf \
|
||||
/usr/share/qt4/mkspecs/features/exclusive_builds.prf \
|
||||
/usr/share/qt4/mkspecs/features/default_pre.prf \
|
||||
/usr/share/qt4/mkspecs/features/debug.prf \
|
||||
/usr/share/qt4/mkspecs/features/default_post.prf \
|
||||
/usr/share/qt4/mkspecs/features/warn_on.prf \
|
||||
/usr/share/qt4/mkspecs/features/qt.prf \
|
||||
/usr/share/qt4/mkspecs/features/unix/thread.prf \
|
||||
/usr/share/qt4/mkspecs/features/moc.prf \
|
||||
/usr/share/qt4/mkspecs/features/resources.prf \
|
||||
/usr/share/qt4/mkspecs/features/uic.prf \
|
||||
/usr/share/qt4/mkspecs/features/yacc.prf \
|
||||
/usr/share/qt4/mkspecs/features/lex.prf \
|
||||
/usr/share/qt4/mkspecs/features/include_source_dir.prf \
|
||||
/usr/lib/libQtWebKit.prl \
|
||||
/usr/lib/libQtXml.prl \
|
||||
/usr/lib/libQtGui.prl \
|
||||
/usr/lib/libQtCore.prl
|
||||
$(QMAKE) -spec /usr/share/qt4/mkspecs/linux-g++ -unix CONFIG+=debug -o Makefile qtTrainingPlan.pro
|
||||
/usr/share/qt4/mkspecs/common/g++.conf:
|
||||
/usr/share/qt4/mkspecs/common/unix.conf:
|
||||
/usr/share/qt4/mkspecs/common/linux.conf:
|
||||
/usr/share/qt4/mkspecs/qconfig.pri:
|
||||
/usr/share/qt4/mkspecs/features/qt_functions.prf:
|
||||
/usr/share/qt4/mkspecs/features/qt_config.prf:
|
||||
/usr/share/qt4/mkspecs/features/exclusive_builds.prf:
|
||||
/usr/share/qt4/mkspecs/features/default_pre.prf:
|
||||
/usr/share/qt4/mkspecs/features/debug.prf:
|
||||
/usr/share/qt4/mkspecs/features/default_post.prf:
|
||||
/usr/share/qt4/mkspecs/features/warn_on.prf:
|
||||
/usr/share/qt4/mkspecs/features/qt.prf:
|
||||
/usr/share/qt4/mkspecs/features/unix/thread.prf:
|
||||
/usr/share/qt4/mkspecs/features/moc.prf:
|
||||
/usr/share/qt4/mkspecs/features/resources.prf:
|
||||
/usr/share/qt4/mkspecs/features/uic.prf:
|
||||
/usr/share/qt4/mkspecs/features/yacc.prf:
|
||||
/usr/share/qt4/mkspecs/features/lex.prf:
|
||||
/usr/share/qt4/mkspecs/features/include_source_dir.prf:
|
||||
/usr/lib/libQtWebKit.prl:
|
||||
/usr/lib/libQtXml.prl:
|
||||
/usr/lib/libQtGui.prl:
|
||||
/usr/lib/libQtCore.prl:
|
||||
qmake: FORCE
|
||||
@$(QMAKE) -spec /usr/share/qt4/mkspecs/linux-g++ -unix CONFIG+=debug -o Makefile qtTrainingPlan.pro
|
||||
|
||||
dist:
|
||||
@$(CHK_DIR_EXISTS) .tmp/qtTrainingPlan1.0.0 || $(MKDIR) .tmp/qtTrainingPlan1.0.0
|
||||
$(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/qtTrainingPlan1.0.0/ && $(COPY_FILE) --parents mainwindow.h ctraining.h common.h ctime.h cclientdata.h cedittraining.h ceditday.h ceditsession.h cedittask.h cedittasks.h cexportpdf.h ceditsport.h cedithr.h .tmp/qtTrainingPlan1.0.0/ && $(COPY_FILE) --parents main.cpp mainwindow.cpp ctraining.cpp common.cpp ctime.cpp cclientdata.cpp cedittraining.cpp ceditday.cpp ceditsession.cpp cedittask.cpp cedittasks.cpp cexportpdf.cpp ceditsport.cpp cedithr.cpp .tmp/qtTrainingPlan1.0.0/ && $(COPY_FILE) --parents mainwindow.ui cedittraining.ui ceditday.ui ceditsession.ui cedittask.ui cedittasks.ui cexportpdf.ui ceditsport.ui cedithr.ui .tmp/qtTrainingPlan1.0.0/ && $(COPY_FILE) --parents qtTrainingPlan_de_AT.ts qtTrainingPlan_de_DE.ts .tmp/qtTrainingPlan1.0.0/ && (cd `dirname .tmp/qtTrainingPlan1.0.0` && $(TAR) qtTrainingPlan1.0.0.tar qtTrainingPlan1.0.0 && $(COMPRESS) qtTrainingPlan1.0.0.tar) && $(MOVE) `dirname .tmp/qtTrainingPlan1.0.0`/qtTrainingPlan1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/qtTrainingPlan1.0.0
|
||||
|
||||
|
||||
clean:compiler_clean
|
||||
-$(DEL_FILE) $(OBJECTS)
|
||||
-$(DEL_FILE) *~ core *.core
|
||||
|
||||
|
||||
####### Sub-libraries
|
||||
|
||||
distclean: clean
|
||||
-$(DEL_FILE) $(TARGET)
|
||||
-$(DEL_FILE) Makefile
|
||||
|
||||
|
||||
mocclean: compiler_moc_header_clean compiler_moc_source_clean
|
||||
|
||||
mocables: compiler_moc_header_make_all compiler_moc_source_make_all
|
||||
|
||||
compiler_moc_header_make_all: moc_mainwindow.cpp moc_cedittraining.cpp moc_ceditday.cpp moc_ceditsession.cpp moc_cedittask.cpp moc_cedittasks.cpp moc_cexportpdf.cpp moc_ceditsport.cpp moc_cedithr.cpp
|
||||
compiler_moc_header_clean:
|
||||
-$(DEL_FILE) moc_mainwindow.cpp moc_cedittraining.cpp moc_ceditday.cpp moc_ceditsession.cpp moc_cedittask.cpp moc_cedittasks.cpp moc_cexportpdf.cpp moc_ceditsport.cpp moc_cedithr.cpp
|
||||
moc_mainwindow.cpp: cclientdata.h \
|
||||
ctime.h \
|
||||
common.h \
|
||||
ctraining.h \
|
||||
mainwindow.h
|
||||
/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) mainwindow.h -o moc_mainwindow.cpp
|
||||
|
||||
moc_cedittraining.cpp: cedittraining.h
|
||||
/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) cedittraining.h -o moc_cedittraining.cpp
|
||||
|
||||
moc_ceditday.cpp: ceditday.h
|
||||
/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) ceditday.h -o moc_ceditday.cpp
|
||||
|
||||
moc_ceditsession.cpp: ceditsession.h
|
||||
/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) ceditsession.h -o moc_ceditsession.cpp
|
||||
|
||||
moc_cedittask.cpp: ctime.h \
|
||||
common.h \
|
||||
cedittask.h
|
||||
/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) cedittask.h -o moc_cedittask.cpp
|
||||
|
||||
moc_cedittasks.cpp: ctime.h \
|
||||
common.h \
|
||||
cedittasks.h
|
||||
/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) cedittasks.h -o moc_cedittasks.cpp
|
||||
|
||||
moc_cexportpdf.cpp: cexportpdf.h
|
||||
/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) cexportpdf.h -o moc_cexportpdf.cpp
|
||||
|
||||
moc_ceditsport.cpp: ceditsport.h
|
||||
/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) ceditsport.h -o moc_ceditsport.cpp
|
||||
|
||||
moc_cedithr.cpp: cedithr.h
|
||||
/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) cedithr.h -o moc_cedithr.cpp
|
||||
|
||||
compiler_rcc_make_all:
|
||||
compiler_rcc_clean:
|
||||
compiler_image_collection_make_all: qmake_image_collection.cpp
|
||||
compiler_image_collection_clean:
|
||||
-$(DEL_FILE) qmake_image_collection.cpp
|
||||
compiler_moc_source_make_all:
|
||||
compiler_moc_source_clean:
|
||||
compiler_uic_make_all: ui_mainwindow.h ui_cedittraining.h ui_ceditday.h ui_ceditsession.h ui_cedittask.h ui_cedittasks.h ui_cexportpdf.h ui_ceditsport.h ui_cedithr.h
|
||||
compiler_uic_clean:
|
||||
-$(DEL_FILE) ui_mainwindow.h ui_cedittraining.h ui_ceditday.h ui_ceditsession.h ui_cedittask.h ui_cedittasks.h ui_cexportpdf.h ui_ceditsport.h ui_cedithr.h
|
||||
ui_mainwindow.h: mainwindow.ui
|
||||
/usr/bin/uic-qt4 mainwindow.ui -o ui_mainwindow.h
|
||||
|
||||
ui_cedittraining.h: cedittraining.ui
|
||||
/usr/bin/uic-qt4 cedittraining.ui -o ui_cedittraining.h
|
||||
|
||||
ui_ceditday.h: ceditday.ui
|
||||
/usr/bin/uic-qt4 ceditday.ui -o ui_ceditday.h
|
||||
|
||||
ui_ceditsession.h: ceditsession.ui
|
||||
/usr/bin/uic-qt4 ceditsession.ui -o ui_ceditsession.h
|
||||
|
||||
ui_cedittask.h: cedittask.ui
|
||||
/usr/bin/uic-qt4 cedittask.ui -o ui_cedittask.h
|
||||
|
||||
ui_cedittasks.h: cedittasks.ui
|
||||
/usr/bin/uic-qt4 cedittasks.ui -o ui_cedittasks.h
|
||||
|
||||
ui_cexportpdf.h: cexportpdf.ui
|
||||
/usr/bin/uic-qt4 cexportpdf.ui -o ui_cexportpdf.h
|
||||
|
||||
ui_ceditsport.h: ceditsport.ui
|
||||
/usr/bin/uic-qt4 ceditsport.ui -o ui_ceditsport.h
|
||||
|
||||
ui_cedithr.h: cedithr.ui
|
||||
/usr/bin/uic-qt4 cedithr.ui -o ui_cedithr.h
|
||||
|
||||
compiler_yacc_decl_make_all:
|
||||
compiler_yacc_decl_clean:
|
||||
compiler_yacc_impl_make_all:
|
||||
compiler_yacc_impl_clean:
|
||||
compiler_lex_make_all:
|
||||
compiler_lex_clean:
|
||||
compiler_clean: compiler_moc_header_clean compiler_uic_clean
|
||||
|
||||
####### Compile
|
||||
|
||||
main.o: main.cpp mainwindow.h \
|
||||
cclientdata.h \
|
||||
ctime.h \
|
||||
common.h \
|
||||
ctraining.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp
|
||||
|
||||
mainwindow.o: mainwindow.cpp mainwindow.h \
|
||||
cclientdata.h \
|
||||
ctime.h \
|
||||
common.h \
|
||||
ctraining.h \
|
||||
ui_mainwindow.h \
|
||||
ceditsport.h \
|
||||
cedittraining.h \
|
||||
ceditday.h \
|
||||
ceditsession.h \
|
||||
cedittask.h \
|
||||
cedittasks.h \
|
||||
cexportpdf.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o mainwindow.o mainwindow.cpp
|
||||
|
||||
ctraining.o: ctraining.cpp ctraining.h \
|
||||
common.h \
|
||||
ctime.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ctraining.o ctraining.cpp
|
||||
|
||||
common.o: common.cpp common.h \
|
||||
ctime.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o common.o common.cpp
|
||||
|
||||
ctime.o: ctime.cpp ctime.h \
|
||||
common.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ctime.o ctime.cpp
|
||||
|
||||
cclientdata.o: cclientdata.cpp cclientdata.h \
|
||||
ctime.h \
|
||||
common.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o cclientdata.o cclientdata.cpp
|
||||
|
||||
cedittraining.o: cedittraining.cpp cedittraining.h \
|
||||
ui_cedittraining.h \
|
||||
common.h \
|
||||
ctime.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o cedittraining.o cedittraining.cpp
|
||||
|
||||
ceditday.o: ceditday.cpp ceditday.h \
|
||||
ui_ceditday.h \
|
||||
common.h \
|
||||
ctime.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ceditday.o ceditday.cpp
|
||||
|
||||
ceditsession.o: ceditsession.cpp ceditsession.h \
|
||||
ui_ceditsession.h \
|
||||
common.h \
|
||||
ctime.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ceditsession.o ceditsession.cpp
|
||||
|
||||
cedittask.o: cedittask.cpp cedittask.h \
|
||||
ctime.h \
|
||||
common.h \
|
||||
ui_cedittask.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o cedittask.o cedittask.cpp
|
||||
|
||||
cedittasks.o: cedittasks.cpp cedittasks.h \
|
||||
ctime.h \
|
||||
common.h \
|
||||
ui_cedittasks.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o cedittasks.o cedittasks.cpp
|
||||
|
||||
cexportpdf.o: cexportpdf.cpp cexportpdf.h \
|
||||
ui_cexportpdf.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o cexportpdf.o cexportpdf.cpp
|
||||
|
||||
ceditsport.o: ceditsport.cpp ceditsport.h \
|
||||
ui_ceditsport.h \
|
||||
common.h \
|
||||
ctime.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ceditsport.o ceditsport.cpp
|
||||
|
||||
cedithr.o: cedithr.cpp cedithr.h \
|
||||
ui_cedithr.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o cedithr.o cedithr.cpp
|
||||
|
||||
moc_mainwindow.o: moc_mainwindow.cpp
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_mainwindow.o moc_mainwindow.cpp
|
||||
|
||||
moc_cedittraining.o: moc_cedittraining.cpp
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_cedittraining.o moc_cedittraining.cpp
|
||||
|
||||
moc_ceditday.o: moc_ceditday.cpp
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_ceditday.o moc_ceditday.cpp
|
||||
|
||||
moc_ceditsession.o: moc_ceditsession.cpp
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_ceditsession.o moc_ceditsession.cpp
|
||||
|
||||
moc_cedittask.o: moc_cedittask.cpp
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_cedittask.o moc_cedittask.cpp
|
||||
|
||||
moc_cedittasks.o: moc_cedittasks.cpp
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_cedittasks.o moc_cedittasks.cpp
|
||||
|
||||
moc_cexportpdf.o: moc_cexportpdf.cpp
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_cexportpdf.o moc_cexportpdf.cpp
|
||||
|
||||
moc_ceditsport.o: moc_ceditsport.cpp
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_ceditsport.o moc_ceditsport.cpp
|
||||
|
||||
moc_cedithr.o: moc_cedithr.cpp
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_cedithr.o moc_cedithr.cpp
|
||||
|
||||
####### Install
|
||||
|
||||
install: FORCE
|
||||
|
||||
uninstall: FORCE
|
||||
|
||||
FORCE:
|
||||
|
||||
+479
@@ -0,0 +1,479 @@
|
||||
#include "cclientdata.h"
|
||||
|
||||
// DAY
|
||||
CClientData::CClientData(int iDay, const QString& szDesc)
|
||||
{
|
||||
Clear(false);
|
||||
m_lpDay = new DATA_DAY;
|
||||
m_lpDay->iNum = iDay;
|
||||
m_lpDay->szDesc = szDesc;
|
||||
}
|
||||
|
||||
// SESSION
|
||||
CClientData::CClientData(int iSession, const QString& szDesc, const QString& szSport)
|
||||
{
|
||||
Clear(false);
|
||||
m_lpSession = new DATA_SESSION;
|
||||
m_lpSession->iNum = iSession;
|
||||
m_lpSession->szDesc = szDesc;
|
||||
m_lpSession->szSport = szSport;
|
||||
}
|
||||
|
||||
// TASK
|
||||
CClientData::CClientData(int iTask, const QString& szDesc, uint32_t dwCount, CTime Time, uint32_t dwDist, const QString& szHR, uint32_t dwPace, CTime PauseTime, uint32_t dwPauseDist, const QString& szPauseHR, uint32_t dwPausePace)
|
||||
{
|
||||
Clear(false);
|
||||
m_lpTask = new DATA_TASK;
|
||||
m_lpTask->iNum = iTask;
|
||||
m_lpTask->szDesc = szDesc;
|
||||
m_lpTask->dwCount = dwCount;
|
||||
m_lpTask->Time = Time;
|
||||
m_lpTask->dwDist = dwDist;
|
||||
m_lpTask->szHR = szHR;
|
||||
m_lpTask->dwPace = dwPace;
|
||||
m_lpTask->PauseTime = PauseTime;
|
||||
m_lpTask->dwPauseDist = dwPauseDist;
|
||||
m_lpTask->szPauseHR = szPauseHR;
|
||||
m_lpTask->dwPausePace = dwPausePace;
|
||||
}
|
||||
|
||||
// SPORT
|
||||
CClientData::CClientData(const QString& szSport, uint32_t dwMaxHR, bool bPace)
|
||||
{
|
||||
Clear(false);
|
||||
m_lpSport = new DATA_SPORT;
|
||||
m_lpSport->szName = szSport;
|
||||
m_lpSport->dwMaxHR = dwMaxHR;
|
||||
m_lpSport->bPace = bPace;
|
||||
}
|
||||
|
||||
//
|
||||
CClientData::CClientData(const QString& szName, const QString& szDesc, uint32_t dwMin, uint32_t dwMax)
|
||||
{
|
||||
Clear(false);
|
||||
m_lpHR = new DATA_HR;
|
||||
m_lpHR->szName = szName;
|
||||
m_lpHR->szDesc = szDesc;
|
||||
m_lpHR->dwMin = dwMin;
|
||||
m_lpHR->dwMax = dwMax;
|
||||
}
|
||||
|
||||
CClientData::CClientData(const QString& szFirstName, const QString& szLastName, const QDate& DayOfBirth, uint32_t dwHeight, uint32_t dwWeight)
|
||||
{
|
||||
Clear(false);
|
||||
m_lpPerson = new DATA_PERSON;
|
||||
m_lpPerson->szFirstName = szFirstName;
|
||||
m_lpPerson->szLastName = szLastName;
|
||||
m_lpPerson->DayOfBirth = DayOfBirth;
|
||||
m_lpPerson->dwHeight = dwHeight;
|
||||
m_lpPerson->dwWeight = dwWeight;
|
||||
}
|
||||
|
||||
CClientData::~CClientData()
|
||||
{
|
||||
Clear();
|
||||
}
|
||||
|
||||
void CClientData::Clear(bool bDelete)
|
||||
{
|
||||
if(bDelete)
|
||||
{
|
||||
DELETE(m_lpDay);
|
||||
DELETE(m_lpSession);
|
||||
DELETE(m_lpTask);
|
||||
DELETE(m_lpSport);
|
||||
DELETE(m_lpHR);
|
||||
DELETE(m_lpPerson);
|
||||
}
|
||||
m_lpDay = 0;
|
||||
m_lpSession = 0;
|
||||
m_lpTask = 0;
|
||||
m_lpSport = 0;
|
||||
m_lpHR = 0;
|
||||
m_lpPerson = 0;
|
||||
}
|
||||
|
||||
void CClientData::SetDay(int iDay)
|
||||
{
|
||||
if(m_lpDay)
|
||||
m_lpDay->iNum = iDay;
|
||||
}
|
||||
|
||||
void CClientData::SetDayDesc(const QString& szDesc)
|
||||
{
|
||||
if(m_lpDay)
|
||||
m_lpDay->szDesc = szDesc;
|
||||
}
|
||||
|
||||
void CClientData::SetSession(int iSession)
|
||||
{
|
||||
if(m_lpSession)
|
||||
m_lpSession->iNum = iSession;
|
||||
}
|
||||
|
||||
void CClientData::SetSessionDesc(const QString& szDesc)
|
||||
{
|
||||
if(m_lpSession)
|
||||
m_lpSession->szDesc = szDesc;
|
||||
}
|
||||
|
||||
void CClientData::SetSessionSport(const QString& szSport)
|
||||
{
|
||||
if(m_lpSession)
|
||||
m_lpSession->szSport = szSport;
|
||||
}
|
||||
|
||||
void CClientData::SetTask(int iTask)
|
||||
{
|
||||
if(m_lpTask)
|
||||
m_lpTask->iNum = iTask;
|
||||
}
|
||||
|
||||
void CClientData::SetTaskDesc(const QString& szDesc)
|
||||
{
|
||||
if(m_lpTask)
|
||||
m_lpTask->szDesc = szDesc;
|
||||
}
|
||||
void CClientData::SetTaskCount(uint32_t dwCount)
|
||||
{
|
||||
if(m_lpTask)
|
||||
m_lpTask->dwCount = dwCount;
|
||||
}
|
||||
|
||||
void CClientData::SetTaskTime(const CTime& Time)
|
||||
{
|
||||
if(m_lpTask)
|
||||
m_lpTask->Time = Time;
|
||||
}
|
||||
|
||||
void CClientData::SetTaskDist(uint32_t dwDist)
|
||||
{
|
||||
if(m_lpTask)
|
||||
m_lpTask->dwDist = dwDist;
|
||||
}
|
||||
|
||||
void CClientData::SetTaskHR(const QString& szHR)
|
||||
{
|
||||
if(m_lpTask)
|
||||
m_lpTask->szHR = szHR;
|
||||
}
|
||||
|
||||
void CClientData::SetTaskPace(uint32_t dwPace)
|
||||
{
|
||||
if(m_lpTask)
|
||||
m_lpTask->dwPace = dwPace;
|
||||
}
|
||||
|
||||
void CClientData::SetTaskPauseTime(const CTime& PauseTime)
|
||||
{
|
||||
if(m_lpTask && m_lpTask->dwCount > 1)
|
||||
m_lpTask->PauseTime = PauseTime;
|
||||
}
|
||||
|
||||
void CClientData::SetTaskPauseDist(uint32_t dwPauseDist)
|
||||
{
|
||||
if(m_lpTask && m_lpTask->dwCount > 1)
|
||||
m_lpTask->dwPauseDist = dwPauseDist;
|
||||
}
|
||||
|
||||
void CClientData::SetTaskPauseHR(const QString& szPauseHR)
|
||||
{
|
||||
if(m_lpTask && m_lpTask->dwCount > 1)
|
||||
m_lpTask->szPauseHR = szPauseHR;
|
||||
}
|
||||
|
||||
void CClientData::SetTaskPausePace(uint32_t dwPausePace)
|
||||
{
|
||||
if(m_lpTask && m_lpTask->dwCount > 1)
|
||||
m_lpTask->dwPausePace = dwPausePace;
|
||||
}
|
||||
|
||||
void CClientData::SetSportName(const QString& szName)
|
||||
{
|
||||
if(m_lpSport)
|
||||
m_lpSport->szName = szName;
|
||||
}
|
||||
|
||||
void CClientData::SetSportMaxHR(uint32_t dwMaxHR)
|
||||
{
|
||||
if(m_lpSport)
|
||||
m_lpSport->dwMaxHR = dwMaxHR;
|
||||
}
|
||||
|
||||
void CClientData::SetSportPace(bool bPace)
|
||||
{
|
||||
if(m_lpSport)
|
||||
m_lpSport->bPace = bPace;
|
||||
}
|
||||
|
||||
void CClientData::SetHRName(const QString& szName)
|
||||
{
|
||||
if(m_lpHR)
|
||||
m_lpHR->szName = szName;
|
||||
}
|
||||
|
||||
void CClientData::SetHRDesc(const QString& szDesc)
|
||||
{
|
||||
if(m_lpHR)
|
||||
m_lpHR->szDesc = szDesc;
|
||||
}
|
||||
|
||||
void CClientData::SetHRMin(uint32_t dwMin)
|
||||
{
|
||||
if(m_lpHR)
|
||||
m_lpHR->dwMin = dwMin;
|
||||
}
|
||||
|
||||
void CClientData::SetHRMax(uint32_t dwMax)
|
||||
{
|
||||
if(m_lpHR)
|
||||
m_lpHR->dwMax = dwMax;
|
||||
}
|
||||
|
||||
void CClientData::SetPersonFirstName(const QString& szFirstName)
|
||||
{
|
||||
if(m_lpPerson)
|
||||
m_lpPerson->szFirstName = szFirstName;
|
||||
}
|
||||
|
||||
void CClientData::SetPersonLastName(const QString& szLastName)
|
||||
{
|
||||
if(m_lpPerson)
|
||||
m_lpPerson->szLastName = szLastName;
|
||||
}
|
||||
|
||||
void CClientData::SetPersonDayOfBirth(const QDate& DayOfBirth)
|
||||
{
|
||||
if(m_lpPerson)
|
||||
m_lpPerson->DayOfBirth = DayOfBirth;
|
||||
}
|
||||
|
||||
void CClientData::SetPersonHeight(uint32_t dwHeight)
|
||||
{
|
||||
if(m_lpPerson)
|
||||
m_lpPerson->dwHeight = dwHeight;
|
||||
}
|
||||
|
||||
void CClientData::SetPersonWeight(uint32_t dwWeight)
|
||||
{
|
||||
if(m_lpPerson)
|
||||
m_lpPerson->dwWeight = dwWeight;
|
||||
}
|
||||
|
||||
int CClientData::GetDay()
|
||||
{
|
||||
if(m_lpDay)
|
||||
return(m_lpDay->iNum);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
QString CClientData::GetDayDesc(bool bWithDayNum)
|
||||
{
|
||||
if(m_lpDay)
|
||||
{
|
||||
if(bWithDayNum)
|
||||
return(m_lpDay->szDesc);
|
||||
else
|
||||
return(m_lpDay->szDesc.mid(m_lpDay->szDesc.indexOf(")")+1));
|
||||
}
|
||||
return(QString(""));
|
||||
}
|
||||
|
||||
int CClientData::GetSession()
|
||||
{
|
||||
if(m_lpSession)
|
||||
return(m_lpSession->iNum);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
QString CClientData::GetSessionDesc()
|
||||
{
|
||||
if(m_lpSession)
|
||||
return(m_lpSession->szDesc);
|
||||
return(QString(""));
|
||||
}
|
||||
|
||||
QString CClientData::GetSessionSport()
|
||||
{
|
||||
if(m_lpSession)
|
||||
return(m_lpSession->szSport);
|
||||
return(QString(""));
|
||||
}
|
||||
|
||||
int CClientData::GetTask()
|
||||
{
|
||||
if(m_lpTask)
|
||||
return(m_lpTask->iNum);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
QString CClientData::GetTaskDesc()
|
||||
{
|
||||
if(m_lpTask)
|
||||
return(m_lpTask->szDesc);
|
||||
return(QString(""));
|
||||
}
|
||||
|
||||
uint32_t CClientData::GetTaskCount()
|
||||
{
|
||||
if(m_lpTask)
|
||||
return(m_lpTask->dwCount);
|
||||
return(0);
|
||||
}
|
||||
|
||||
CTime CClientData::GetTaskTime()
|
||||
{
|
||||
if(m_lpTask)
|
||||
return(m_lpTask->Time);
|
||||
return(CTime(0, 0, 0));
|
||||
}
|
||||
|
||||
uint32_t CClientData::GetTaskDist()
|
||||
{
|
||||
if(m_lpTask)
|
||||
return(m_lpTask->dwDist);
|
||||
return(0);
|
||||
}
|
||||
|
||||
QString CClientData::GetTaskHR()
|
||||
{
|
||||
if(m_lpTask)
|
||||
return(m_lpTask->szHR);
|
||||
return(QString(""));
|
||||
}
|
||||
|
||||
uint32_t CClientData::GetTaskPace()
|
||||
{
|
||||
if(m_lpTask)
|
||||
return(m_lpTask->dwPace);
|
||||
return(0);
|
||||
}
|
||||
|
||||
CTime CClientData::GetTaskPauseTime()
|
||||
{
|
||||
if(m_lpTask && m_lpTask->dwCount > 1)
|
||||
return(m_lpTask->PauseTime);
|
||||
return(CTime(0, 0, 0));
|
||||
}
|
||||
|
||||
uint32_t CClientData::GetTaskPauseDist()
|
||||
{
|
||||
if(m_lpTask && m_lpTask->dwCount > 1)
|
||||
return(m_lpTask->dwPauseDist);
|
||||
return(0);
|
||||
}
|
||||
|
||||
QString CClientData::GetTaskPauseHR()
|
||||
{
|
||||
if(m_lpTask && m_lpTask->dwCount > 1)
|
||||
return(m_lpTask->szPauseHR);
|
||||
return(QString(""));
|
||||
}
|
||||
|
||||
uint32_t CClientData::GetTaskPausePace()
|
||||
{
|
||||
if(m_lpTask && m_lpTask->dwCount > 1)
|
||||
return(m_lpTask->dwPausePace);
|
||||
return(0);
|
||||
}
|
||||
|
||||
QString CClientData::GetSportName()
|
||||
{
|
||||
if(m_lpSport)
|
||||
return(m_lpSport->szName);
|
||||
return(QString(""));
|
||||
}
|
||||
|
||||
uint32_t CClientData::GetSportMaxHR()
|
||||
{
|
||||
if(m_lpSport)
|
||||
return(m_lpSport->dwMaxHR);
|
||||
return(0);
|
||||
}
|
||||
|
||||
bool CClientData::GetSportPace()
|
||||
{
|
||||
if(m_lpSport)
|
||||
return(m_lpSport->bPace);
|
||||
return(0);
|
||||
}
|
||||
|
||||
QString CClientData::GetHRName()
|
||||
{
|
||||
if(m_lpHR)
|
||||
return(m_lpHR->szName);
|
||||
return(QString(""));
|
||||
}
|
||||
|
||||
QString CClientData::GetHRDesc()
|
||||
{
|
||||
if(m_lpHR)
|
||||
return(m_lpHR->szDesc);
|
||||
return(QString(""));
|
||||
}
|
||||
|
||||
uint32_t CClientData::GetHRMin()
|
||||
{
|
||||
if(m_lpHR)
|
||||
return(m_lpHR->dwMin);
|
||||
return(0);
|
||||
}
|
||||
|
||||
uint32_t CClientData::GetHRMax()
|
||||
{
|
||||
if(m_lpHR)
|
||||
return(m_lpHR->dwMax);
|
||||
return(0);
|
||||
}
|
||||
|
||||
QString CClientData::GetPersonFirstName()
|
||||
{
|
||||
if(m_lpPerson)
|
||||
return(m_lpPerson->szFirstName);
|
||||
return(QString(""));
|
||||
}
|
||||
|
||||
QString CClientData::GetPersonLastName()
|
||||
{
|
||||
if(m_lpPerson)
|
||||
return(m_lpPerson->szLastName);
|
||||
return(QString(""));
|
||||
}
|
||||
|
||||
QDate CClientData::GetPersonDayOfBirth()
|
||||
{
|
||||
if(m_lpPerson)
|
||||
return(m_lpPerson->DayOfBirth);
|
||||
return(QDate(0, 0, 0));
|
||||
}
|
||||
|
||||
uint32_t CClientData::GetPersonHeight()
|
||||
{
|
||||
if(m_lpPerson)
|
||||
return(m_lpPerson->dwHeight);
|
||||
return(0);
|
||||
}
|
||||
|
||||
uint32_t CClientData::GetPersonWeight()
|
||||
{
|
||||
if(m_lpPerson)
|
||||
return(m_lpPerson->dwWeight);
|
||||
return(0);
|
||||
}
|
||||
|
||||
int CClientData::GetType()
|
||||
{
|
||||
if(m_lpTask)
|
||||
return(CClientData::TASK);
|
||||
else if(m_lpSession)
|
||||
return(CClientData::SESSION);
|
||||
else if(m_lpDay)
|
||||
return(CClientData::DAY);
|
||||
else if(m_lpSport)
|
||||
return(CClientData::SPORT);
|
||||
else if(m_lpHR)
|
||||
return(CClientData::HR);
|
||||
else if(m_lpPerson)
|
||||
return(CClientData::PERSON);
|
||||
return(0);
|
||||
}
|
||||
+153
@@ -0,0 +1,153 @@
|
||||
#ifndef CCLIENTDATA_H
|
||||
#define CCLIENTDATA_H
|
||||
|
||||
|
||||
#include "ctime.h"
|
||||
#include "common.h"
|
||||
|
||||
|
||||
typedef struct _DATA_PERSON
|
||||
{
|
||||
QString szFirstName;
|
||||
QString szLastName;
|
||||
QDate DayOfBirth;
|
||||
uint32_t dwHeight;
|
||||
uint32_t dwWeight;
|
||||
} DATA_PERSON, *LPDATA_PERSON;
|
||||
|
||||
typedef struct _DATA_HR
|
||||
{
|
||||
QString szName;
|
||||
QString szDesc;
|
||||
uint32_t dwMin;
|
||||
uint32_t dwMax;
|
||||
} DATA_HR, *LPDATA_HR;
|
||||
|
||||
typedef struct _DATA_SPORT
|
||||
{
|
||||
QString szName;
|
||||
uint32_t dwMaxHR;
|
||||
bool bPace;
|
||||
} DATA_SPORT, *LPDATA_SPORT;
|
||||
|
||||
typedef struct _DATA_DAY
|
||||
{
|
||||
int iNum;
|
||||
QString szDesc;
|
||||
} DATA_DAY, *LPDATA_DAY;
|
||||
|
||||
typedef struct _DATA_SESSION
|
||||
{
|
||||
int iNum;
|
||||
QString szDesc;
|
||||
QString szSport;
|
||||
} DATA_SESSION, *LPDATA_SESSION;
|
||||
|
||||
typedef struct _DATA_TASK
|
||||
{
|
||||
int iNum;
|
||||
QString szDesc;
|
||||
uint32_t dwCount;
|
||||
CTime Time;
|
||||
uint32_t dwDist;
|
||||
QString szHR;
|
||||
uint32_t dwPace;
|
||||
CTime PauseTime;
|
||||
uint32_t dwPauseDist;
|
||||
QString szPauseHR;
|
||||
uint32_t dwPausePace;
|
||||
} DATA_TASK, *LPDATA_TASK;
|
||||
|
||||
class CClientData
|
||||
{
|
||||
public:
|
||||
enum FLAGS
|
||||
{
|
||||
DAY = 1,
|
||||
SESSION = 2,
|
||||
TASK = 3,
|
||||
SPORT = 4,
|
||||
HR = 5,
|
||||
PERSON = 6
|
||||
};
|
||||
// DAY
|
||||
CClientData(int iDay, const QString& szDesc);
|
||||
// SESSION
|
||||
CClientData(int iSession, const QString& szDesc, const QString& szSport);
|
||||
// TASK
|
||||
CClientData(int iTask, const QString& szDesc, uint32_t dwCount, CTime Time, uint32_t dwDist, const QString& szHR, uint32_t dwPace, CTime PauseTime = CTime(0, 0, 0), uint32_t dwPauseDist = 0, const QString& szPauseHR = QString(""), uint32_t dwPausePace = 0);
|
||||
// SPORT
|
||||
CClientData(const QString& szSport, uint32_t dwMaxHR, bool bPace);
|
||||
//
|
||||
CClientData(const QString& szName, const QString& szDesc, uint32_t dwMin, uint32_t dwMax);
|
||||
CClientData(const QString& szFirstName, const QString& szLastName, const QDate& DayOfBirth, uint32_t dwHeight, uint32_t dwWeight);
|
||||
~CClientData();
|
||||
|
||||
void Clear(bool bDelete = true);
|
||||
void SetDay(int iDay);
|
||||
void SetDayDesc(const QString& szDesc);
|
||||
void SetSession(int iSession);
|
||||
void SetSessionDesc(const QString& szDesc);
|
||||
void SetSessionSport(const QString& szSport);
|
||||
void SetTask(int iTask);
|
||||
void SetTaskDesc(const QString& szDesc);
|
||||
void SetTaskCount(uint32_t dwCount);
|
||||
void SetTaskTime(const CTime& Time);
|
||||
void SetTaskDist(uint32_t dwDist);
|
||||
void SetTaskHR(const QString& szHR);
|
||||
void SetTaskPace(uint32_t dwPace);
|
||||
void SetTaskPauseTime(const CTime& PauseTime);
|
||||
void SetTaskPauseDist(uint32_t dwPauseDist);
|
||||
void SetTaskPauseHR(const QString& szPauseHR);
|
||||
void SetTaskPausePace(uint32_t dwPausePace);
|
||||
void SetSportName(const QString& szName);
|
||||
void SetSportMaxHR(uint32_t dwMaxHR);
|
||||
void SetSportPace(bool bPace);
|
||||
void SetHRName(const QString& szName);
|
||||
void SetHRDesc(const QString& szDesc);
|
||||
void SetHRMin(uint32_t dwMin);
|
||||
void SetHRMax(uint32_t dwMax);
|
||||
void SetPersonFirstName(const QString& szFirstName);
|
||||
void SetPersonLastName(const QString& szLastName);
|
||||
void SetPersonDayOfBirth(const QDate& DayOfBirth);
|
||||
void SetPersonHeight(uint32_t dwHeight);
|
||||
void SetPersonWeight(uint32_t dwWeight);
|
||||
int GetDay();
|
||||
QString GetDayDesc(bool bWithDayNum = true);
|
||||
int GetSession();
|
||||
QString GetSessionDesc();
|
||||
QString GetSessionSport();
|
||||
int GetTask();
|
||||
QString GetTaskDesc();
|
||||
uint32_t GetTaskCount();
|
||||
CTime GetTaskTime();
|
||||
uint32_t GetTaskDist();
|
||||
QString GetTaskHR();
|
||||
uint32_t GetTaskPace();
|
||||
CTime GetTaskPauseTime();
|
||||
uint32_t GetTaskPauseDist();
|
||||
QString GetTaskPauseHR();
|
||||
uint32_t GetTaskPausePace();
|
||||
QString GetSportName();
|
||||
uint32_t GetSportMaxHR();
|
||||
bool GetSportPace();
|
||||
QString GetHRName();
|
||||
QString GetHRDesc();
|
||||
uint32_t GetHRMin();
|
||||
uint32_t GetHRMax();
|
||||
QString GetPersonFirstName();
|
||||
QString GetPersonLastName();
|
||||
QDate GetPersonDayOfBirth();
|
||||
uint32_t GetPersonHeight();
|
||||
uint32_t GetPersonWeight();
|
||||
int GetType();
|
||||
protected:
|
||||
LPDATA_DAY m_lpDay;
|
||||
LPDATA_SESSION m_lpSession;
|
||||
LPDATA_TASK m_lpTask;
|
||||
LPDATA_SPORT m_lpSport;
|
||||
LPDATA_HR m_lpHR;
|
||||
LPDATA_PERSON m_lpPerson;
|
||||
};
|
||||
|
||||
#endif // CCLIENTDATA_H
|
||||
@@ -0,0 +1,58 @@
|
||||
#include "ceditday.h"
|
||||
#include "ui_ceditday.h"
|
||||
#include "common.h"
|
||||
|
||||
CEditDay::CEditDay(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
m_ui(new Ui::CEditDay)
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
}
|
||||
|
||||
CEditDay::~CEditDay()
|
||||
{
|
||||
delete m_ui;
|
||||
}
|
||||
|
||||
void CEditDay::changeEvent(QEvent *e)
|
||||
{
|
||||
QDialog::changeEvent(e);
|
||||
switch (e->type()) {
|
||||
case QEvent::LanguageChange:
|
||||
m_ui->retranslateUi(this);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void CEditDay::on_buttonBox_accepted()
|
||||
{
|
||||
if(!m_ui->m_lpDesc->text().length())
|
||||
{
|
||||
MESSAGE(tr("Description is empty!"));
|
||||
return;
|
||||
}
|
||||
accept();
|
||||
}
|
||||
|
||||
void CEditDay::on_buttonBox_rejected()
|
||||
{
|
||||
reject();
|
||||
}
|
||||
|
||||
int CEditDay::GetDay()
|
||||
{
|
||||
return(m_ui->m_lpDay->value());
|
||||
}
|
||||
|
||||
QString CEditDay::GetDesc()
|
||||
{
|
||||
return(m_ui->m_lpDesc->text());
|
||||
}
|
||||
|
||||
void CEditDay::Set(int iDay, const QString& szDesc)
|
||||
{
|
||||
m_ui->m_lpDay->setValue(iDay);
|
||||
m_ui->m_lpDesc->setText(szDesc);
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
#ifndef CEDITDAY_H
|
||||
#define CEDITDAY_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class CEditDay;
|
||||
}
|
||||
|
||||
class CEditDay : public QDialog {
|
||||
Q_OBJECT
|
||||
public:
|
||||
CEditDay(QWidget *parent = 0);
|
||||
~CEditDay();
|
||||
|
||||
int GetDay();
|
||||
QString GetDesc();
|
||||
void Set(int iDay, const QString& szDesc);
|
||||
|
||||
protected:
|
||||
void changeEvent(QEvent *e);
|
||||
|
||||
private:
|
||||
Ui::CEditDay *m_ui;
|
||||
|
||||
private slots:
|
||||
void on_buttonBox_rejected();
|
||||
void on_buttonBox_accepted();
|
||||
};
|
||||
|
||||
#endif // CEDITDAY_H
|
||||
+112
@@ -0,0 +1,112 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>CEditDay</class>
|
||||
<widget class="QDialog" name="CEditDay">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>268</width>
|
||||
<height>116</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Day</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Day:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="m_lpDay">
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>999</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Description:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="m_lpDesc"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>CEditDay</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>CEditDay</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
#include "common.h"
|
||||
#include "cedithr.h"
|
||||
#include "ui_cedithr.h"
|
||||
|
||||
CEditHR::CEditHR(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::CEditHR)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
CEditHR::~CEditHR()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void CEditHR::changeEvent(QEvent *e)
|
||||
{
|
||||
QDialog::changeEvent(e);
|
||||
switch (e->type()) {
|
||||
case QEvent::LanguageChange:
|
||||
ui->retranslateUi(this);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
QString CEditHR::GetName()
|
||||
{
|
||||
return(ui->m_lpName->text());
|
||||
}
|
||||
|
||||
QString CEditHR::GetDesc()
|
||||
{
|
||||
return(ui->m_lpDesc->text());
|
||||
}
|
||||
|
||||
uint32_t CEditHR::GetMin()
|
||||
{
|
||||
return(ui->m_lpMinHR->value());
|
||||
}
|
||||
|
||||
uint32_t CEditHR::GetMax()
|
||||
{
|
||||
return(ui->m_lpMaxHR->value());
|
||||
}
|
||||
|
||||
void CEditHR::Set(const QString& szName, const QString& szDesc, uint32_t dwMin, uint32_t dwMax)
|
||||
{
|
||||
ui->m_lpName->setText(szName);
|
||||
ui->m_lpDesc->setText(szDesc);
|
||||
ui->m_lpMinHR->setValue(dwMin);
|
||||
ui->m_lpMaxHR->setValue(dwMax);
|
||||
}
|
||||
|
||||
void CEditHR::on_buttonBox_accepted()
|
||||
{
|
||||
if(!ui->m_lpName->text().length())
|
||||
{
|
||||
MESSAGE(tr("Name is empty!"));
|
||||
return;
|
||||
}
|
||||
accept();
|
||||
}
|
||||
|
||||
void CEditHR::on_buttonBox_rejected()
|
||||
{
|
||||
reject();
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
#ifndef CEDITHR_H
|
||||
#define CEDITHR_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class CEditHR;
|
||||
}
|
||||
|
||||
class CEditHR : public QDialog {
|
||||
Q_OBJECT
|
||||
public:
|
||||
CEditHR(QWidget *parent = 0);
|
||||
~CEditHR();
|
||||
|
||||
QString GetName();
|
||||
QString GetDesc();
|
||||
uint32_t GetMin();
|
||||
uint32_t GetMax();
|
||||
void Set(const QString& szName, const QString& szDesc, uint32_t dwMin, uint32_t dwMax);
|
||||
protected:
|
||||
void changeEvent(QEvent *e);
|
||||
|
||||
private:
|
||||
Ui::CEditHR *ui;
|
||||
|
||||
private slots:
|
||||
void on_buttonBox_rejected();
|
||||
void on_buttonBox_accepted();
|
||||
};
|
||||
|
||||
#endif // CEDITHR_H
|
||||
+132
@@ -0,0 +1,132 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>CEditHR</class>
|
||||
<widget class="QDialog" name="CEditHR">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>286</width>
|
||||
<height>184</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Heartrate</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Name:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="m_lpName"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Desc:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="m_lpDesc"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Heartrate</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Min (%):</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QSpinBox" name="m_lpMinHR">
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Max (%):</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QSpinBox" name="m_lpMaxHR">
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>CEditHR</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>CEditHR</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
@@ -0,0 +1,82 @@
|
||||
#include "ceditsession.h"
|
||||
#include "ui_ceditsession.h"
|
||||
#include "common.h"
|
||||
|
||||
CEditSession::CEditSession(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
m_ui(new Ui::CEditSession)
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
}
|
||||
|
||||
CEditSession::~CEditSession()
|
||||
{
|
||||
delete m_ui;
|
||||
}
|
||||
|
||||
void CEditSession::changeEvent(QEvent *e)
|
||||
{
|
||||
QDialog::changeEvent(e);
|
||||
switch (e->type()) {
|
||||
case QEvent::LanguageChange:
|
||||
m_ui->retranslateUi(this);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void CEditSession::on_buttonBox_accepted()
|
||||
{
|
||||
if(!m_ui->m_lpDesc->text().length())
|
||||
{
|
||||
MESSAGE(tr("Description is empty!"));
|
||||
return;
|
||||
}
|
||||
if(!m_ui->m_lpDay->currentText().length())
|
||||
{
|
||||
MESSAGE(tr("No day selected!"));
|
||||
return;
|
||||
}
|
||||
if(!m_ui->m_lpSport->currentText().length())
|
||||
{
|
||||
MESSAGE(tr("No sport selected!"));
|
||||
return;
|
||||
}
|
||||
accept();
|
||||
}
|
||||
|
||||
void CEditSession::on_buttonBox_rejected()
|
||||
{
|
||||
reject();
|
||||
}
|
||||
|
||||
QString CEditSession::GetDay()
|
||||
{
|
||||
return(m_ui->m_lpDay->currentText());
|
||||
}
|
||||
|
||||
QString CEditSession::GetDesc()
|
||||
{
|
||||
return(m_ui->m_lpDesc->text());
|
||||
}
|
||||
|
||||
QString CEditSession::GetSport()
|
||||
{
|
||||
return(m_ui->m_lpSport->currentText());
|
||||
}
|
||||
|
||||
void CEditSession::Set(const QStringList& DayList, const QStringList& SportList, const QString& szDay, const QString& szDesc, const QString& szSport)
|
||||
{
|
||||
int i;
|
||||
|
||||
for(i = 0;i < DayList.size();i++)
|
||||
m_ui->m_lpDay->addItem(DayList.at(i));
|
||||
|
||||
for(i = 0;i < SportList.size();i++)
|
||||
m_ui->m_lpSport->addItem(SportList.at(i));
|
||||
|
||||
m_ui->m_lpDay->setCurrentIndex(m_ui->m_lpDay->findText(szDay));
|
||||
m_ui->m_lpDesc->setText(szDesc);
|
||||
m_ui->m_lpSport->setCurrentIndex(m_ui->m_lpSport->findText(szSport));
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
#ifndef CEDITSESSION_H
|
||||
#define CEDITSESSION_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class CEditSession;
|
||||
}
|
||||
|
||||
class CEditSession : public QDialog {
|
||||
Q_OBJECT
|
||||
public:
|
||||
CEditSession(QWidget *parent = 0);
|
||||
~CEditSession();
|
||||
|
||||
QString GetDay();
|
||||
QString GetDesc();
|
||||
QString GetSport();
|
||||
void Set(const QStringList& DayList, const QStringList& SportList, const QString& szDay, const QString& szDesc, const QString& szSport);
|
||||
|
||||
protected:
|
||||
void changeEvent(QEvent *e);
|
||||
|
||||
private:
|
||||
Ui::CEditSession *m_ui;
|
||||
|
||||
private slots:
|
||||
void on_buttonBox_accepted();
|
||||
void on_buttonBox_rejected();
|
||||
};
|
||||
|
||||
#endif // CEDITSESSION_H
|
||||
@@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>CEditSession</class>
|
||||
<widget class="QDialog" name="CEditSession">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>194</width>
|
||||
<height>150</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Session</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Description:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="m_lpDesc"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Day:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="m_lpDay"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Sport:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="m_lpSport"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -0,0 +1,66 @@
|
||||
#include "ceditsport.h"
|
||||
#include "ui_ceditsport.h"
|
||||
#include "common.h"
|
||||
|
||||
CEditSport::CEditSport(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::CEditSport)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->m_lpPace->setChecked(true);
|
||||
}
|
||||
|
||||
CEditSport::~CEditSport()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void CEditSport::changeEvent(QEvent *e)
|
||||
{
|
||||
QDialog::changeEvent(e);
|
||||
switch (e->type()) {
|
||||
case QEvent::LanguageChange:
|
||||
ui->retranslateUi(this);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void CEditSport::on_buttonBox_accepted()
|
||||
{
|
||||
if(!ui->m_lpName->text().length())
|
||||
{
|
||||
MESSAGE(tr("Name is empty!"));
|
||||
return;
|
||||
}
|
||||
accept();
|
||||
}
|
||||
|
||||
void CEditSport::on_buttonBox_rejected()
|
||||
{
|
||||
reject();
|
||||
}
|
||||
|
||||
QString CEditSport::GetName()
|
||||
{
|
||||
return(ui->m_lpName->text());
|
||||
}
|
||||
|
||||
int CEditSport::GetMaxHR()
|
||||
{
|
||||
return(ui->m_lpMaxHR->value());
|
||||
}
|
||||
|
||||
bool CEditSport::GetPace()
|
||||
{
|
||||
return(ui->m_lpPace->isChecked());
|
||||
}
|
||||
|
||||
void CEditSport::Set(const QString& szName, int iMaxHR, bool bPace)
|
||||
{
|
||||
ui->m_lpName->setText(szName);
|
||||
ui->m_lpMaxHR->setValue(iMaxHR);
|
||||
ui->m_lpPace->setChecked(bPace);
|
||||
ui->m_lpSpeed->setChecked(!bPace);
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
#ifndef CEDITSPORT_H
|
||||
#define CEDITSPORT_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class CEditSport;
|
||||
}
|
||||
|
||||
class CEditSport : public QDialog {
|
||||
Q_OBJECT
|
||||
public:
|
||||
CEditSport(QWidget *parent = 0);
|
||||
~CEditSport();
|
||||
|
||||
QString GetName();
|
||||
int GetMaxHR();
|
||||
bool GetPace();
|
||||
void Set(const QString& szName, int iMaxHR, bool bPace);
|
||||
protected:
|
||||
void changeEvent(QEvent *e);
|
||||
|
||||
private:
|
||||
Ui::CEditSport *ui;
|
||||
|
||||
private slots:
|
||||
void on_buttonBox_rejected();
|
||||
void on_buttonBox_accepted();
|
||||
};
|
||||
|
||||
#endif // CEDITSPORT_H
|
||||
+120
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>CEditSport</class>
|
||||
<widget class="QDialog" name="CEditSport">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>194</width>
|
||||
<height>145</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Sport</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Name:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="m_lpName"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Max. HR:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="m_lpMaxHR">
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>250</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>180</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="m_lpPace">
|
||||
<property name="text">
|
||||
<string>Pace</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="m_lpSpeed">
|
||||
<property name="text">
|
||||
<string>Speed</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>CEditSport</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>CEditSport</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
+351
@@ -0,0 +1,351 @@
|
||||
#include "cedittask.h"
|
||||
#include "ui_cedittask.h"
|
||||
#include "common.h"
|
||||
#include "ctime.h"
|
||||
|
||||
CEditTask::CEditTask(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
m_ui(new Ui::CEditTask)
|
||||
{
|
||||
m_bChanging = false;
|
||||
m_ui->setupUi(this);
|
||||
m_ui->m_lpGroupPause->setVisible(false);
|
||||
}
|
||||
|
||||
CEditTask::~CEditTask()
|
||||
{
|
||||
delete m_ui;
|
||||
}
|
||||
|
||||
void CEditTask::changeEvent(QEvent *e)
|
||||
{
|
||||
QDialog::changeEvent(e);
|
||||
switch (e->type()) {
|
||||
case QEvent::LanguageChange:
|
||||
m_ui->retranslateUi(this);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void CEditTask::on_buttonBox_accepted()
|
||||
{
|
||||
if(!m_ui->m_lpDesc->text().length())
|
||||
{
|
||||
MESSAGE(tr("Description is empty!"));
|
||||
return;
|
||||
}
|
||||
if(!m_ui->m_lpHR->currentText().length())
|
||||
{
|
||||
MESSAGE(tr("No heart rate selected!"));
|
||||
return;
|
||||
}
|
||||
if(m_ui->m_lpCount->value() > 1 && !m_ui->m_lpPauseHR->currentText().length())
|
||||
{
|
||||
MESSAGE(tr("No pause heart rate selected!"));
|
||||
return;
|
||||
}
|
||||
accept();
|
||||
}
|
||||
|
||||
void CEditTask::on_buttonBox_rejected()
|
||||
{
|
||||
reject();
|
||||
}
|
||||
|
||||
|
||||
void CEditTask::on_m_lpCount_valueChanged(int iCount)
|
||||
{
|
||||
if(iCount > 1)
|
||||
m_ui->m_lpGroupPause->setVisible(true);
|
||||
else
|
||||
m_ui->m_lpGroupPause->setVisible(false);
|
||||
|
||||
CalcTotal();
|
||||
}
|
||||
|
||||
QString CEditTask::GetDesc()
|
||||
{
|
||||
return(m_ui->m_lpDesc->text());
|
||||
}
|
||||
|
||||
uint32_t CEditTask::GetCount()
|
||||
{
|
||||
return(m_ui->m_lpCount->value());
|
||||
}
|
||||
|
||||
CTime CEditTask::GetTime()
|
||||
{
|
||||
return((CTime)m_ui->m_lpTime->time());
|
||||
}
|
||||
|
||||
uint32_t CEditTask::GetDist()
|
||||
{
|
||||
return(m_ui->m_lpDist->value());
|
||||
}
|
||||
|
||||
QString CEditTask::GetHR()
|
||||
{
|
||||
return(m_ui->m_lpHR->currentText());
|
||||
}
|
||||
|
||||
uint32_t CEditTask::GetPace()
|
||||
{
|
||||
QTime Time = m_ui->m_lpPace->time();
|
||||
return((uint32_t)Time.hour()*3600+(uint32_t)Time.minute()*60+(uint32_t)Time.second());
|
||||
}
|
||||
|
||||
CTime CEditTask::GetPauseTime()
|
||||
{
|
||||
return(m_ui->m_lpPauseTime->time());
|
||||
}
|
||||
|
||||
uint32_t CEditTask::GetPauseDist()
|
||||
{
|
||||
return(m_ui->m_lpPauseDist->value());
|
||||
}
|
||||
|
||||
QString CEditTask::GetPauseHR()
|
||||
{
|
||||
return(m_ui->m_lpPauseHR->currentText());
|
||||
}
|
||||
|
||||
uint32_t CEditTask::GetPausePace()
|
||||
{
|
||||
QTime Time = m_ui->m_lpPausePace->time();
|
||||
return((uint32_t)Time.hour()*3600+(uint32_t)Time.minute()*60+(uint32_t)Time.second());
|
||||
}
|
||||
|
||||
void CEditTask::Set(const QStringList& HRList, const QString& szDesc, uint32_t dwCount, const QTime& Time, uint32_t dwDist, const QString& szHR, uint32_t dwPace, const QTime& PauseTime, uint32_t dwPauseDist, const QString& szPauseHR, uint32_t dwPausePace)
|
||||
{
|
||||
int i;
|
||||
|
||||
for(i = 0;i < HRList.size();i++)
|
||||
{
|
||||
m_ui->m_lpHR->addItem(HRList.at(i));
|
||||
m_ui->m_lpPauseHR->addItem(HRList.at(i));
|
||||
}
|
||||
|
||||
m_ui->m_lpDesc->setText(szDesc);
|
||||
m_ui->m_lpCount->setValue(dwCount);
|
||||
m_ui->m_lpTime->setTime(Time);
|
||||
m_ui->m_lpDist->setValue(dwDist);
|
||||
m_ui->m_lpHR->setCurrentIndex(m_ui->m_lpHR->findText(szHR));
|
||||
m_ui->m_lpPace->setTime(QTime(HOURS(dwPace), MINUTES(dwPace), SECONDS(dwPace)));
|
||||
if(dwCount > 1)
|
||||
{
|
||||
m_ui->m_lpGroupPause->setVisible(true);
|
||||
m_ui->m_lpPauseTime->setTime(PauseTime);
|
||||
m_ui->m_lpPauseDist->setValue(dwPauseDist);
|
||||
m_ui->m_lpPauseHR->setCurrentIndex(m_ui->m_lpHR->findText(szPauseHR));
|
||||
m_ui->m_lpPausePace->setTime(QTime(HOURS(dwPausePace), MINUTES(dwPausePace), SECONDS(dwPausePace)));
|
||||
}
|
||||
|
||||
CalcTotal();
|
||||
}
|
||||
|
||||
void CEditTask::on_m_lpTime_timeChanged(QTime time)
|
||||
{
|
||||
if(m_bChanging)
|
||||
{
|
||||
m_bChanging = false;
|
||||
return;
|
||||
}
|
||||
uint32_t dwTime = CTime(time).toDWORD();
|
||||
uint32_t dwDist = m_ui->m_lpDist->value();
|
||||
uint32_t dwPace = CTime(m_ui->m_lpPace->time()).toDWORD();
|
||||
|
||||
if(!dwTime)
|
||||
return;
|
||||
|
||||
if(dwDist)
|
||||
{
|
||||
m_bChanging = true;
|
||||
dwPace = dwTime*1000/dwDist;
|
||||
m_ui->m_lpPace->setTime(QTime(HOURS(dwPace), MINUTES(dwPace), SECONDS(dwPace)));
|
||||
}
|
||||
else if(dwPace)
|
||||
{
|
||||
m_bChanging = true;
|
||||
dwDist = dwPace*dwTime*1000;
|
||||
m_ui->m_lpDist->setValue(dwDist);
|
||||
}
|
||||
|
||||
CalcTotal();
|
||||
}
|
||||
|
||||
void CEditTask::on_m_lpDist_valueChanged(int dist)
|
||||
{
|
||||
if(m_bChanging)
|
||||
{
|
||||
m_bChanging = false;
|
||||
return;
|
||||
}
|
||||
uint32_t dwTime = CTime(m_ui->m_lpTime->time()).toDWORD();
|
||||
uint32_t dwDist = dist;
|
||||
uint32_t dwPace = CTime(m_ui->m_lpPace->time()).toDWORD();
|
||||
|
||||
if(!dwDist)
|
||||
return;
|
||||
|
||||
if(dwTime)
|
||||
{
|
||||
m_bChanging = true;
|
||||
dwPace = dwTime*1000/dwDist;
|
||||
m_ui->m_lpPace->setTime(QTime(HOURS(dwPace), MINUTES(dwPace), SECONDS(dwPace)));
|
||||
}
|
||||
else if(dwPace)
|
||||
{
|
||||
m_bChanging = true;
|
||||
dwDist = dwPace*dwTime*1000;
|
||||
m_ui->m_lpDist->setValue(dwDist);
|
||||
}
|
||||
|
||||
CalcTotal();
|
||||
}
|
||||
|
||||
void CEditTask::on_m_lpPace_timeChanged(QTime time)
|
||||
{
|
||||
if(m_bChanging)
|
||||
{
|
||||
m_bChanging = false;
|
||||
return;
|
||||
}
|
||||
uint32_t dwTime = CTime(m_ui->m_lpTime->time()).toDWORD();
|
||||
uint32_t dwDist = m_ui->m_lpDist->value();
|
||||
uint32_t dwPace = CTime(time).toDWORD();
|
||||
|
||||
if(!dwPace)
|
||||
return;
|
||||
|
||||
if(dwDist)
|
||||
{
|
||||
m_bChanging = true;
|
||||
dwTime = dwPace*dwDist/1000;
|
||||
m_ui->m_lpTime->setTime(QTime(HOURS(dwTime), MINUTES(dwTime), SECONDS(dwTime)));
|
||||
}
|
||||
else if(dwTime)
|
||||
{
|
||||
m_bChanging = true;
|
||||
dwDist = dwTime*dwPace*1000;
|
||||
m_ui->m_lpDist->setValue(dwDist);
|
||||
}
|
||||
|
||||
CalcTotal();
|
||||
}
|
||||
|
||||
void CEditTask::on_m_lpPauseTime_timeChanged(QTime time)
|
||||
{
|
||||
if(m_bChanging)
|
||||
{
|
||||
m_bChanging = false;
|
||||
return;
|
||||
}
|
||||
uint32_t dwTime = CTime(time).toDWORD();
|
||||
uint32_t dwDist = m_ui->m_lpPauseDist->value();
|
||||
uint32_t dwPace = CTime(m_ui->m_lpPausePace->time()).toDWORD();
|
||||
|
||||
if(!dwTime)
|
||||
return;
|
||||
|
||||
if(dwDist)
|
||||
{
|
||||
m_bChanging = true;
|
||||
dwPace = dwTime*1000/dwDist;
|
||||
m_ui->m_lpPausePace->setTime(QTime(HOURS(dwPace), MINUTES(dwPace), SECONDS(dwPace)));
|
||||
}
|
||||
else if(dwPace)
|
||||
{
|
||||
m_bChanging = true;
|
||||
dwDist = dwPace*dwTime*1000;
|
||||
m_ui->m_lpPauseDist->setValue(dwDist);
|
||||
}
|
||||
|
||||
CalcTotal();
|
||||
}
|
||||
|
||||
void CEditTask::on_m_lpPauseDist_valueChanged(int dist)
|
||||
{
|
||||
if(m_bChanging)
|
||||
{
|
||||
m_bChanging = false;
|
||||
return;
|
||||
}
|
||||
uint32_t dwTime = CTime(m_ui->m_lpPauseTime->time()).toDWORD();
|
||||
uint32_t dwDist = dist;
|
||||
uint32_t dwPace = CTime(m_ui->m_lpPausePace->time()).toDWORD();
|
||||
|
||||
if(!dwDist)
|
||||
return;
|
||||
|
||||
if(dwTime)
|
||||
{
|
||||
m_bChanging = true;
|
||||
dwPace = dwTime*1000/dwDist;
|
||||
m_ui->m_lpPausePace->setTime(QTime(HOURS(dwPace), MINUTES(dwPace), SECONDS(dwPace)));
|
||||
}
|
||||
else if(dwPace)
|
||||
{
|
||||
m_bChanging = true;
|
||||
dwDist = dwPace*dwTime*1000;
|
||||
m_ui->m_lpPauseDist->setValue(dwDist);
|
||||
}
|
||||
|
||||
CalcTotal();
|
||||
}
|
||||
|
||||
void CEditTask::on_m_lpPausePace_timeChanged(QTime time)
|
||||
{
|
||||
if(m_bChanging)
|
||||
{
|
||||
m_bChanging = false;
|
||||
return;
|
||||
}
|
||||
uint32_t dwTime = CTime(m_ui->m_lpPauseTime->time()).toDWORD();
|
||||
uint32_t dwDist = m_ui->m_lpPauseDist->value();
|
||||
uint32_t dwPace = CTime(time).toDWORD();
|
||||
|
||||
if(!dwPace)
|
||||
return;
|
||||
|
||||
if(dwDist)
|
||||
{
|
||||
m_bChanging = true;
|
||||
dwTime = dwPace*dwDist/1000;
|
||||
m_ui->m_lpPauseTime->setTime(QTime(HOURS(dwTime), MINUTES(dwTime), SECONDS(dwTime)));
|
||||
}
|
||||
else if(dwTime)
|
||||
{
|
||||
m_bChanging = true;
|
||||
dwDist = dwTime*dwPace*1000;
|
||||
m_ui->m_lpPauseDist->setValue(dwDist);
|
||||
}
|
||||
|
||||
CalcTotal();
|
||||
}
|
||||
|
||||
void CEditTask::CalcTotal()
|
||||
{
|
||||
int iCount = m_ui->m_lpCount->value();
|
||||
uint32_t dwTime = CTime(m_ui->m_lpTime->time()).toDWORD();
|
||||
uint32_t dwDist = m_ui->m_lpDist->value();
|
||||
uint32_t dwPauseTime = CTime(m_ui->m_lpPauseTime->time()).toDWORD();
|
||||
uint32_t dwPauseDist = m_ui->m_lpPauseDist->value();
|
||||
uint32_t dwTotalTime;
|
||||
uint32_t dwTotalDist;
|
||||
|
||||
dwTotalTime = dwTime*iCount;
|
||||
dwTotalDist = dwDist*iCount;
|
||||
if(iCount > 1)
|
||||
{
|
||||
dwTotalTime += dwPauseTime*(iCount-1);
|
||||
dwTotalDist += dwPauseDist*(iCount-1);
|
||||
}
|
||||
m_ui->m_lpTotalDist->setText(QString(tr("%1")).arg(dwTotalDist));
|
||||
|
||||
uint32_t h = HOURS(dwTotalTime);
|
||||
uint32_t m = MINUTES(dwTotalTime);
|
||||
uint32_t s = SECONDS(dwTotalTime);
|
||||
m_ui->m_lpTotalTime->setTime(QTime(h, m, s));
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
#ifndef CEDITTASK_H
|
||||
#define CEDITTASK_H
|
||||
|
||||
#include <QDialog>
|
||||
#include "ctime.h"
|
||||
|
||||
namespace Ui {
|
||||
class CEditTask;
|
||||
}
|
||||
|
||||
class CEditTask : public QDialog {
|
||||
Q_OBJECT
|
||||
public:
|
||||
CEditTask(QWidget *parent = 0);
|
||||
~CEditTask();
|
||||
|
||||
QString GetDesc();
|
||||
uint32_t GetCount();
|
||||
CTime GetTime();
|
||||
uint32_t GetDist();
|
||||
QString GetHR();
|
||||
uint32_t GetPace();
|
||||
CTime GetPauseTime();
|
||||
uint32_t GetPauseDist();
|
||||
QString GetPauseHR();
|
||||
uint32_t GetPausePace();
|
||||
void Set(const QStringList& HRList, const QString& szDesc, uint32_t dwCount, const QTime& Time, uint32_t dwDist, const QString& szHR, uint32_t dwPace, const QTime& PauseTime, uint32_t dwPauseDist, const QString& szPauseHR, uint32_t dwPausePace);
|
||||
protected:
|
||||
void changeEvent(QEvent *e);
|
||||
|
||||
void CalcTotal();
|
||||
bool m_bChanging;
|
||||
|
||||
private:
|
||||
Ui::CEditTask *m_ui;
|
||||
|
||||
private slots:
|
||||
void on_m_lpTime_timeChanged(QTime date);
|
||||
void on_m_lpDist_valueChanged(int );
|
||||
void on_m_lpPace_timeChanged(QTime date);
|
||||
void on_m_lpPauseTime_timeChanged(QTime date);
|
||||
void on_m_lpPauseDist_valueChanged(int );
|
||||
void on_m_lpPausePace_timeChanged(QTime date);
|
||||
void on_m_lpCount_valueChanged(int );
|
||||
void on_buttonBox_accepted();
|
||||
void on_buttonBox_rejected();
|
||||
};
|
||||
|
||||
#endif // CEDITTASK_H
|
||||
+320
@@ -0,0 +1,320 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>CEditTask</class>
|
||||
<widget class="QDialog" name="CEditTask">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>366</width>
|
||||
<height>332</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Task</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_11">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Description:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="m_lpDesc"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_15">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_13">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Count:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="m_lpCount">
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>999</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Tot. Time:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTimeEdit" name="m_lpTotalTime">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="displayFormat">
|
||||
<string>hh:mm:ss</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_14">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_10">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string>Tot. Dist.:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="m_lpTotalDist">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_12">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="m_lpGroupBasic">
|
||||
<property name="title">
|
||||
<string>Basic</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Time:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTimeEdit" name="m_lpTime">
|
||||
<property name="displayFormat">
|
||||
<string>hh:mm:ss</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Distance:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="m_lpDist">
|
||||
<property name="maximum">
|
||||
<number>999999</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>HR:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="m_lpHR"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QLabel" name="m_lpPaceLabel">
|
||||
<property name="text">
|
||||
<string>Pace:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTimeEdit" name="m_lpPace">
|
||||
<property name="displayFormat">
|
||||
<string>mm:ss</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="m_lpGroupPause">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Pause</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>Time:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTimeEdit" name="m_lpPauseTime">
|
||||
<property name="displayFormat">
|
||||
<string>hh:mm:ss</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string>Distance:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="m_lpPauseDist">
|
||||
<property name="maximum">
|
||||
<number>999999</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>HR:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="m_lpPauseHR"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_9">
|
||||
<item>
|
||||
<widget class="QLabel" name="m_lpPausePaceLabel">
|
||||
<property name="text">
|
||||
<string>Pace:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTimeEdit" name="m_lpPausePace">
|
||||
<property name="displayFormat">
|
||||
<string>mm:ss</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>CEditTask</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>CEditTask</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
+352
@@ -0,0 +1,352 @@
|
||||
#include "cedittasks.h"
|
||||
#include "ui_cedittasks.h"
|
||||
|
||||
CEditTaskS::CEditTaskS(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
m_ui(new Ui::CEditTaskS)
|
||||
{
|
||||
m_bChanging = false;
|
||||
m_ui->setupUi(this);
|
||||
m_ui->m_lpGroupPause->setVisible(false);
|
||||
}
|
||||
|
||||
CEditTaskS::~CEditTaskS()
|
||||
{
|
||||
delete m_ui;
|
||||
}
|
||||
|
||||
void CEditTaskS::changeEvent(QEvent *e)
|
||||
{
|
||||
QDialog::changeEvent(e);
|
||||
switch (e->type()) {
|
||||
case QEvent::LanguageChange:
|
||||
m_ui->retranslateUi(this);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void CEditTaskS::on_buttonBox_accepted()
|
||||
{
|
||||
if(!m_ui->m_lpDesc->text().length())
|
||||
{
|
||||
MESSAGE(tr("Description is empty!"));
|
||||
return;
|
||||
}
|
||||
if(!m_ui->m_lpHR->currentText().length())
|
||||
{
|
||||
MESSAGE(tr("No heart rate selected!"));
|
||||
return;
|
||||
}
|
||||
if(m_ui->m_lpCount->value() > 1 && !m_ui->m_lpPauseHR->currentText().length())
|
||||
{
|
||||
MESSAGE(tr("No pause heart rate selected!"));
|
||||
return;
|
||||
}
|
||||
accept();
|
||||
}
|
||||
|
||||
void CEditTaskS::on_buttonBox_rejected()
|
||||
{
|
||||
reject();
|
||||
}
|
||||
|
||||
void CEditTaskS::on_m_lpCount_valueChanged(int iCount)
|
||||
{
|
||||
if(iCount > 1)
|
||||
m_ui->m_lpGroupPause->setVisible(true);
|
||||
else
|
||||
m_ui->m_lpGroupPause->setVisible(false);
|
||||
|
||||
CalcTotal();
|
||||
}
|
||||
|
||||
QString CEditTaskS::GetDesc()
|
||||
{
|
||||
return(m_ui->m_lpDesc->text());
|
||||
}
|
||||
|
||||
uint32_t CEditTaskS::GetCount()
|
||||
{
|
||||
return(m_ui->m_lpCount->value());
|
||||
}
|
||||
|
||||
CTime CEditTaskS::GetTime()
|
||||
{
|
||||
return(m_ui->m_lpTime->time());
|
||||
}
|
||||
|
||||
uint32_t CEditTaskS::GetDist()
|
||||
{
|
||||
return(m_ui->m_lpDist->value());
|
||||
}
|
||||
|
||||
QString CEditTaskS::GetHR()
|
||||
{
|
||||
return(m_ui->m_lpHR->currentText());
|
||||
}
|
||||
|
||||
uint32_t CEditTaskS::GetPace()
|
||||
{
|
||||
if(!m_ui->m_lpSpeed->value())
|
||||
return(0);
|
||||
return(3600/m_ui->m_lpSpeed->value());
|
||||
}
|
||||
|
||||
CTime CEditTaskS::GetPauseTime()
|
||||
{
|
||||
return(m_ui->m_lpPauseTime->time());
|
||||
}
|
||||
|
||||
uint32_t CEditTaskS::GetPauseDist()
|
||||
{
|
||||
return(m_ui->m_lpPauseDist->value());
|
||||
}
|
||||
|
||||
QString CEditTaskS::GetPauseHR()
|
||||
{
|
||||
return(m_ui->m_lpPauseHR->currentText());
|
||||
}
|
||||
|
||||
uint32_t CEditTaskS::GetPausePace()
|
||||
{
|
||||
if(!m_ui->m_lpPauseSpeed->value())
|
||||
return(0);
|
||||
return(3600/m_ui->m_lpPauseSpeed->value());
|
||||
}
|
||||
|
||||
void CEditTaskS::Set(const QStringList& HRList, const QString& szDesc, uint32_t dwCount, const QTime& Time, uint32_t dwDist, const QString& szHR, uint32_t dwPace, const QTime& PauseTime, uint32_t dwPauseDist, const QString& szPauseHR, uint32_t dwPausePace)
|
||||
{
|
||||
int i;
|
||||
|
||||
for(i = 0;i < HRList.size();i++)
|
||||
{
|
||||
m_ui->m_lpHR->addItem(HRList.at(i));
|
||||
m_ui->m_lpPauseHR->addItem(HRList.at(i));
|
||||
}
|
||||
|
||||
m_ui->m_lpDesc->setText(szDesc);
|
||||
m_ui->m_lpCount->setValue(dwCount);
|
||||
m_ui->m_lpTime->setTime(Time);
|
||||
m_ui->m_lpDist->setValue(dwDist);
|
||||
m_ui->m_lpHR->setCurrentIndex(m_ui->m_lpHR->findText(szHR));
|
||||
if(dwPace)
|
||||
m_ui->m_lpSpeed->setValue(3600/dwPace);
|
||||
if(dwCount > 1)
|
||||
{
|
||||
m_ui->m_lpGroupPause->setVisible(true);
|
||||
m_ui->m_lpPauseTime->setTime(PauseTime);
|
||||
m_ui->m_lpPauseDist->setValue(dwPauseDist);
|
||||
m_ui->m_lpPauseHR->setCurrentIndex(m_ui->m_lpHR->findText(szPauseHR));
|
||||
if(dwPausePace)
|
||||
m_ui->m_lpPauseSpeed->setValue(3600/dwPausePace);
|
||||
}
|
||||
|
||||
CalcTotal();
|
||||
}
|
||||
|
||||
void CEditTaskS::on_m_lpTime_timeChanged(QTime time)
|
||||
{
|
||||
if(m_bChanging)
|
||||
{
|
||||
m_bChanging = false;
|
||||
return;
|
||||
}
|
||||
uint32_t dwTime = CTime(time).toDWORD();
|
||||
uint32_t dwDist = m_ui->m_lpDist->value();
|
||||
uint32_t dwSpeed = m_ui->m_lpSpeed->value();
|
||||
|
||||
if(!dwTime)
|
||||
return;
|
||||
|
||||
if(dwDist)
|
||||
{
|
||||
m_bChanging = true;
|
||||
dwSpeed = 3600*dwDist/dwTime/1000;
|
||||
m_ui->m_lpSpeed->setValue(dwSpeed);
|
||||
}
|
||||
else if(dwSpeed)
|
||||
{
|
||||
m_bChanging = true;
|
||||
dwDist = dwSpeed*dwTime*1000/3600;
|
||||
m_ui->m_lpDist->setValue(dwDist);
|
||||
}
|
||||
|
||||
CalcTotal();
|
||||
}
|
||||
|
||||
void CEditTaskS::on_m_lpDist_valueChanged(int )
|
||||
{
|
||||
if(m_bChanging)
|
||||
{
|
||||
m_bChanging = false;
|
||||
return;
|
||||
}
|
||||
uint32_t dwTime = CTime(m_ui->m_lpTime->time()).toDWORD();
|
||||
uint32_t dwDist = m_ui->m_lpDist->value();
|
||||
uint32_t dwSpeed = m_ui->m_lpSpeed->value();
|
||||
|
||||
if(!dwDist)
|
||||
return;
|
||||
|
||||
if(dwTime)
|
||||
{
|
||||
m_bChanging = true;
|
||||
dwSpeed = 3600*dwDist/dwTime/1000;
|
||||
m_ui->m_lpSpeed->setValue(dwSpeed);
|
||||
}
|
||||
else if(dwSpeed)
|
||||
{
|
||||
m_bChanging = true;
|
||||
dwDist = dwSpeed*dwTime*1000/3600;
|
||||
m_ui->m_lpDist->setValue(dwDist);
|
||||
}
|
||||
|
||||
CalcTotal();
|
||||
}
|
||||
|
||||
void CEditTaskS::on_m_lpSpeed_valueChanged(int speed)
|
||||
{
|
||||
if(m_bChanging)
|
||||
{
|
||||
m_bChanging = false;
|
||||
return;
|
||||
}
|
||||
uint32_t dwTime = CTime(m_ui->m_lpTime->time()).toDWORD();
|
||||
uint32_t dwDist = m_ui->m_lpDist->value();
|
||||
uint32_t dwSpeed = speed;
|
||||
|
||||
if(!dwSpeed)
|
||||
return;
|
||||
|
||||
if(dwDist)
|
||||
{
|
||||
m_bChanging = true;
|
||||
dwTime = dwDist*3600/dwSpeed/1000;
|
||||
m_ui->m_lpTime->setTime(QTime(HOURS(dwTime), MINUTES(dwTime), SECONDS(dwTime)));
|
||||
}
|
||||
else if(dwTime)
|
||||
{
|
||||
m_bChanging = true;
|
||||
dwDist = dwSpeed*dwTime*1000/3600;
|
||||
m_ui->m_lpDist->setValue(dwDist);
|
||||
}
|
||||
|
||||
CalcTotal();
|
||||
}
|
||||
|
||||
void CEditTaskS::on_m_lpPauseTime_timeChanged(QTime time)
|
||||
{
|
||||
if(m_bChanging)
|
||||
{
|
||||
m_bChanging = false;
|
||||
return;
|
||||
}
|
||||
uint32_t dwTime = CTime(time).toDWORD();
|
||||
uint32_t dwDist = m_ui->m_lpPauseDist->value();
|
||||
uint32_t dwSpeed = m_ui->m_lpPauseSpeed->value();
|
||||
|
||||
if(!dwTime)
|
||||
return;
|
||||
|
||||
if(dwDist)
|
||||
{
|
||||
m_bChanging = true;
|
||||
dwSpeed = 3600*dwDist/dwTime/1000;
|
||||
m_ui->m_lpPauseSpeed->setValue(dwSpeed);
|
||||
}
|
||||
else if(dwSpeed)
|
||||
{
|
||||
m_bChanging = true;
|
||||
dwDist = dwSpeed*dwTime*1000/3600;
|
||||
m_ui->m_lpPauseDist->setValue(dwDist);
|
||||
}
|
||||
|
||||
CalcTotal();
|
||||
}
|
||||
|
||||
void CEditTaskS::on_m_lpPauseDist_valueChanged(int )
|
||||
{
|
||||
if(m_bChanging)
|
||||
{
|
||||
m_bChanging = false;
|
||||
return;
|
||||
}
|
||||
uint32_t dwTime = CTime(m_ui->m_lpPauseTime->time()).toDWORD();
|
||||
uint32_t dwDist = m_ui->m_lpPauseDist->value();
|
||||
uint32_t dwSpeed = m_ui->m_lpPauseSpeed->value();
|
||||
|
||||
if(!dwDist)
|
||||
return;
|
||||
|
||||
if(dwTime)
|
||||
{
|
||||
m_bChanging = true;
|
||||
dwSpeed = 3600*dwDist/dwTime/1000;
|
||||
m_ui->m_lpPauseSpeed->setValue(dwSpeed);
|
||||
}
|
||||
else if(dwSpeed)
|
||||
{
|
||||
m_bChanging = true;
|
||||
dwDist = dwSpeed*dwTime*1000/3600;
|
||||
m_ui->m_lpPauseDist->setValue(dwDist);
|
||||
}
|
||||
|
||||
CalcTotal();
|
||||
}
|
||||
|
||||
void CEditTaskS::on_m_lpPauseSpeed_valueChanged(int speed)
|
||||
{
|
||||
if(m_bChanging)
|
||||
{
|
||||
m_bChanging = false;
|
||||
return;
|
||||
}
|
||||
uint32_t dwTime = CTime(m_ui->m_lpPauseTime->time()).toDWORD();
|
||||
uint32_t dwDist = m_ui->m_lpPauseDist->value();
|
||||
uint32_t dwSpeed = speed;
|
||||
|
||||
if(!dwSpeed)
|
||||
return;
|
||||
|
||||
if(dwDist)
|
||||
{
|
||||
m_bChanging = true;
|
||||
dwTime = dwDist*3600/dwSpeed/1000;
|
||||
m_ui->m_lpPauseTime->setTime(QTime(HOURS(dwTime), MINUTES(dwTime), SECONDS(dwTime)));
|
||||
}
|
||||
else if(dwTime)
|
||||
{
|
||||
m_bChanging = true;
|
||||
dwDist = dwSpeed*dwTime*1000/3600;
|
||||
m_ui->m_lpPauseDist->setValue(dwDist);
|
||||
}
|
||||
|
||||
CalcTotal();
|
||||
}
|
||||
|
||||
void CEditTaskS::CalcTotal()
|
||||
{
|
||||
int iCount = m_ui->m_lpCount->value();
|
||||
uint32_t dwTime = CTime(m_ui->m_lpTime->time()).toDWORD();
|
||||
uint32_t dwDist = m_ui->m_lpDist->value();
|
||||
uint32_t dwPauseTime = CTime(m_ui->m_lpPauseTime->time()).toDWORD();
|
||||
uint32_t dwPauseDist = m_ui->m_lpPauseDist->value();
|
||||
uint32_t dwTotalTime;
|
||||
uint32_t dwTotalDist;
|
||||
|
||||
dwTotalTime = dwTime*iCount;
|
||||
dwTotalDist = dwDist*iCount;
|
||||
if(iCount > 1)
|
||||
{
|
||||
dwTotalTime += dwPauseTime*(iCount-1);
|
||||
dwTotalDist += dwPauseDist*(iCount-1);
|
||||
}
|
||||
m_ui->m_lpTotalDist->setText(QString(tr("%1")).arg(dwTotalDist));
|
||||
|
||||
uint32_t h = HOURS(dwTotalTime);
|
||||
uint32_t m = MINUTES(dwTotalTime);
|
||||
uint32_t s = SECONDS(dwTotalTime);
|
||||
m_ui->m_lpTotalTime->setTime(QTime(h, m, s));
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
#ifndef CEDITTASKS_H
|
||||
#define CEDITTASKS_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <stdint.h>
|
||||
#include "ctime.h"
|
||||
|
||||
namespace Ui {
|
||||
class CEditTaskS;
|
||||
}
|
||||
|
||||
class CEditTaskS : public QDialog {
|
||||
Q_OBJECT
|
||||
public:
|
||||
CEditTaskS(QWidget *parent = 0);
|
||||
~CEditTaskS();
|
||||
|
||||
QString GetDesc();
|
||||
uint32_t GetCount();
|
||||
CTime GetTime();
|
||||
uint32_t GetDist();
|
||||
QString GetHR();
|
||||
uint32_t GetPace();
|
||||
CTime GetPauseTime();
|
||||
uint32_t GetPauseDist();
|
||||
QString GetPauseHR();
|
||||
uint32_t GetPausePace();
|
||||
void Set(const QStringList& HRList, const QString& szDesc, uint32_t dwCount, const QTime& Time, uint32_t dwDist, const QString& szHR, uint32_t dwPace, const QTime& PauseTime, uint32_t dwPauseDist, const QString& szPauseHR, uint32_t dwPausePace);
|
||||
|
||||
protected:
|
||||
void changeEvent(QEvent *e);
|
||||
|
||||
void CalcTotal();
|
||||
bool m_bChanging;
|
||||
|
||||
private:
|
||||
Ui::CEditTaskS *m_ui;
|
||||
|
||||
private slots:
|
||||
void on_m_lpCount_valueChanged(int );
|
||||
void on_m_lpTime_timeChanged(QTime date);
|
||||
void on_m_lpDist_valueChanged(int );
|
||||
void on_m_lpSpeed_valueChanged(int );
|
||||
void on_m_lpPauseTime_timeChanged(QTime date);
|
||||
void on_m_lpPauseDist_valueChanged(int );
|
||||
void on_m_lpPauseSpeed_valueChanged(int );
|
||||
void on_buttonBox_accepted();
|
||||
void on_buttonBox_rejected();
|
||||
};
|
||||
|
||||
#endif // CEDITTASKS_H
|
||||
+312
@@ -0,0 +1,312 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>CEditTaskS</class>
|
||||
<widget class="QDialog" name="CEditTaskS">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>366</width>
|
||||
<height>333</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Task</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_11">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Description:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="m_lpDesc"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_15">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_13">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Count:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="m_lpCount">
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>999</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Tot. Time:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTimeEdit" name="m_lpTotalTime">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="displayFormat">
|
||||
<string>hh:mm:ss</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_14">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_10">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string>Tot. Dist.:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="m_lpTotalDist">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_12">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="m_lpGroupBasic">
|
||||
<property name="title">
|
||||
<string>Basic</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Time:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTimeEdit" name="m_lpTime">
|
||||
<property name="displayFormat">
|
||||
<string>hh:mm:ss</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Distance:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="m_lpDist">
|
||||
<property name="maximum">
|
||||
<number>999999</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>HR:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="m_lpHR"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QLabel" name="m_lpSpeedLabel">
|
||||
<property name="text">
|
||||
<string>Speed:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="m_lpSpeed"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="m_lpGroupPause">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Pause</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>Time:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTimeEdit" name="m_lpPauseTime">
|
||||
<property name="displayFormat">
|
||||
<string>hh:mm:ss</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string>Distance:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="m_lpPauseDist">
|
||||
<property name="maximum">
|
||||
<number>999999</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>HR:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="m_lpPauseHR"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_9">
|
||||
<item>
|
||||
<widget class="QLabel" name="m_lpPauseSpeedLabel">
|
||||
<property name="text">
|
||||
<string>Speed:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="m_lpPauseSpeed"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>CEditTaskS</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>CEditTaskS</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
@@ -0,0 +1,52 @@
|
||||
#include "cedittraining.h"
|
||||
#include "ui_cedittraining.h"
|
||||
#include "common.h"
|
||||
|
||||
CEditTraining::CEditTraining(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
m_ui(new Ui::CEditTraining)
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
}
|
||||
|
||||
CEditTraining::~CEditTraining()
|
||||
{
|
||||
delete m_ui;
|
||||
}
|
||||
|
||||
void CEditTraining::changeEvent(QEvent *e)
|
||||
{
|
||||
QDialog::changeEvent(e);
|
||||
switch (e->type()) {
|
||||
case QEvent::LanguageChange:
|
||||
m_ui->retranslateUi(this);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void CEditTraining::on_buttonBox_accepted()
|
||||
{
|
||||
if(!m_ui->m_lpTraining->text().length())
|
||||
{
|
||||
MESSAGE(tr("Name is empty!"));
|
||||
return;
|
||||
}
|
||||
accept();
|
||||
}
|
||||
|
||||
void CEditTraining::on_buttonBox_rejected()
|
||||
{
|
||||
reject();
|
||||
}
|
||||
|
||||
QString CEditTraining::GetTraining()
|
||||
{
|
||||
return(m_ui->m_lpTraining->text());
|
||||
}
|
||||
|
||||
void CEditTraining::SetTraining(const QString& szTraining)
|
||||
{
|
||||
m_ui->m_lpTraining->setText(szTraining);
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
#ifndef CEDITTRAINING_H
|
||||
#define CEDITTRAINING_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class CEditTraining;
|
||||
}
|
||||
|
||||
class CEditTraining : public QDialog {
|
||||
Q_OBJECT
|
||||
public:
|
||||
CEditTraining(QWidget *parent = 0);
|
||||
~CEditTraining();
|
||||
|
||||
QString GetTraining();
|
||||
void SetTraining(const QString& szTraining);
|
||||
|
||||
protected:
|
||||
void changeEvent(QEvent *e);
|
||||
|
||||
private:
|
||||
Ui::CEditTraining *m_ui;
|
||||
|
||||
private slots:
|
||||
void on_buttonBox_rejected();
|
||||
void on_buttonBox_accepted();
|
||||
};
|
||||
|
||||
#endif // CEDITTRAINING_H
|
||||
@@ -0,0 +1,81 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>CEditTraining</class>
|
||||
<widget class="QDialog" name="CEditTraining">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>261</width>
|
||||
<height>80</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Training</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QSplitter" name="splitter">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Training:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="m_lpTraining"/>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>CEditTraining</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>CEditTraining</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
#include <QFileDialog>
|
||||
#include "cexportpdf.h"
|
||||
#include "ui_cexportpdf.h"
|
||||
|
||||
|
||||
CExportPDF::CExportPDF(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::CExportPDF)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
ui->m_lpFormat->addItem("A0", QVariant(5));
|
||||
ui->m_lpFormat->addItem("A1", QVariant(6));
|
||||
ui->m_lpFormat->addItem("A2", QVariant(7));
|
||||
ui->m_lpFormat->addItem("A3", QVariant(8));
|
||||
ui->m_lpFormat->addItem("A4", QVariant(0));
|
||||
ui->m_lpFormat->addItem("A5", QVariant(9));
|
||||
ui->m_lpFormat->addItem("A6", QVariant(10));
|
||||
ui->m_lpFormat->addItem("A7", QVariant(11));
|
||||
ui->m_lpFormat->addItem("A8", QVariant(12));
|
||||
ui->m_lpFormat->addItem("A9", QVariant(13));
|
||||
ui->m_lpFormat->addItem("B0", QVariant(14));
|
||||
ui->m_lpFormat->addItem("B1", QVariant(15));
|
||||
ui->m_lpFormat->addItem("B2", QVariant(17));
|
||||
ui->m_lpFormat->addItem("B3", QVariant(18));
|
||||
ui->m_lpFormat->addItem("B4", QVariant(19));
|
||||
ui->m_lpFormat->addItem("B5", QVariant(1));
|
||||
ui->m_lpFormat->addItem("B6", QVariant(20));
|
||||
ui->m_lpFormat->addItem("B7", QVariant(21));
|
||||
ui->m_lpFormat->addItem("B8", QVariant(22));
|
||||
ui->m_lpFormat->addItem("B9", QVariant(23));
|
||||
ui->m_lpFormat->addItem("B10", QVariant(16));
|
||||
ui->m_lpFormat->addItem("C5E", QVariant(24));
|
||||
ui->m_lpFormat->addItem("Comm10E", QVariant(25));
|
||||
ui->m_lpFormat->addItem("DLE", QVariant(26));
|
||||
ui->m_lpFormat->addItem("Executive", QVariant(4));
|
||||
ui->m_lpFormat->addItem("Folio", QVariant(27));
|
||||
ui->m_lpFormat->addItem("Ledger", QVariant(28));
|
||||
ui->m_lpFormat->addItem("Legal", QVariant(3));
|
||||
ui->m_lpFormat->addItem("Letter", QVariant(2));
|
||||
ui->m_lpFormat->addItem("Tabloid", QVariant(29));
|
||||
ui->m_lpFormat->setCurrentIndex(ui->m_lpFormat->findText("A4"));
|
||||
|
||||
ui->m_lpUnit->addItem("Millimeter", QVariant(0));
|
||||
ui->m_lpUnit->addItem("Point", QVariant(1));
|
||||
ui->m_lpUnit->addItem("Inch", QVariant(2));
|
||||
ui->m_lpUnit->addItem("Pica", QVariant(3));
|
||||
ui->m_lpUnit->addItem("Didot", QVariant(4));
|
||||
ui->m_lpUnit->addItem("Cicero", QVariant(5));
|
||||
ui->m_lpUnit->addItem("DevicePixel", QVariant(6));
|
||||
ui->m_lpUnit->setCurrentIndex(0);
|
||||
}
|
||||
|
||||
CExportPDF::~CExportPDF()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void CExportPDF::changeEvent(QEvent *e)
|
||||
{
|
||||
QDialog::changeEvent(e);
|
||||
switch (e->type()) {
|
||||
case QEvent::LanguageChange:
|
||||
ui->retranslateUi(this);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int CExportPDF::GetFormat()
|
||||
{
|
||||
return(ui->m_lpFormat->itemData(ui->m_lpFormat->currentIndex(), Qt::UserRole).toInt());
|
||||
}
|
||||
|
||||
int CExportPDF::GetWeeks()
|
||||
{
|
||||
return(ui->m_lpWeeksPerSheet->value());
|
||||
}
|
||||
|
||||
int CExportPDF::GetUnit()
|
||||
{
|
||||
return(ui->m_lpUnit->itemData(ui->m_lpUnit->currentIndex(), Qt::UserRole).toInt());
|
||||
}
|
||||
|
||||
double CExportPDF::GetLeft()
|
||||
{
|
||||
return(ui->m_lpLeft->value());
|
||||
}
|
||||
|
||||
double CExportPDF::GetRight()
|
||||
{
|
||||
return(ui->m_lpRight->value());
|
||||
}
|
||||
|
||||
double CExportPDF::GetTop()
|
||||
{
|
||||
return(ui->m_lpTop->value());
|
||||
}
|
||||
|
||||
double CExportPDF::GetBottom()
|
||||
{
|
||||
return(ui->m_lpBottom->value());
|
||||
}
|
||||
|
||||
QString CExportPDF::GetFile()
|
||||
{
|
||||
return(ui->m_lpFileName->text());
|
||||
}
|
||||
|
||||
void CExportPDF::on_m_lpFileNameBrowse_clicked()
|
||||
{
|
||||
QString szFileName = QFileDialog::getSaveFileName(this, "Save PDF", QDir::homePath(), tr("PDF (*.pdf)"));
|
||||
if(szFileName.length())
|
||||
ui->m_lpFileName->setText(szFileName);
|
||||
}
|
||||
|
||||
void CExportPDF::on_m_lpCancel_clicked()
|
||||
{
|
||||
reject();
|
||||
}
|
||||
|
||||
void CExportPDF::on_m_lpOK_clicked()
|
||||
{
|
||||
if(ui->m_lpFileName->text().length())
|
||||
accept();
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
#ifndef CEXPORTPDF_H
|
||||
#define CEXPORTPDF_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QAbstractButton>
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class CExportPDF;
|
||||
}
|
||||
|
||||
class CExportPDF : public QDialog {
|
||||
Q_OBJECT
|
||||
public:
|
||||
CExportPDF(QWidget *parent = 0);
|
||||
~CExportPDF();
|
||||
|
||||
int GetFormat();
|
||||
int GetWeeks();
|
||||
int GetUnit();
|
||||
double GetLeft();
|
||||
double GetRight();
|
||||
double GetTop();
|
||||
double GetBottom();
|
||||
QString GetFile();
|
||||
protected:
|
||||
void changeEvent(QEvent *e);
|
||||
|
||||
private:
|
||||
Ui::CExportPDF *ui;
|
||||
|
||||
private slots:
|
||||
void on_m_lpOK_clicked();
|
||||
void on_m_lpCancel_clicked();
|
||||
void on_m_lpFileNameBrowse_clicked();
|
||||
};
|
||||
|
||||
#endif // CEXPORTPDF_H
|
||||
+274
@@ -0,0 +1,274 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>CExportPDF</class>
|
||||
<widget class="QDialog" name="CExportPDF">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>350</width>
|
||||
<height>256</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Export PDF</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>File name:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="m_lpFileName"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="m_lpFileNameBrowse">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>25</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Format:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="m_lpFormat"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_6">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string>Weeks per Sheet:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="m_lpWeeksPerSheet">
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>6</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Margins</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Unit:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="m_lpUnit"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Left:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Top:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="5" colspan="2">
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Right:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="4" colspan="2">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>Bottom:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="6">
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QDoubleSpinBox" name="m_lpLeft">
|
||||
<property name="value">
|
||||
<double>10.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QDoubleSpinBox" name="m_lpRight">
|
||||
<property name="value">
|
||||
<double>10.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="7">
|
||||
<widget class="QDoubleSpinBox" name="m_lpTop">
|
||||
<property name="value">
|
||||
<double>10.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="7">
|
||||
<widget class="QDoubleSpinBox" name="m_lpBottom">
|
||||
<property name="value">
|
||||
<double>10.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_7">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="m_lpCancel">
|
||||
<property name="text">
|
||||
<string>&Cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="m_lpOK">
|
||||
<property name="text">
|
||||
<string>&OK</string>
|
||||
</property>
|
||||
<property name="default">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
#include "common.h"
|
||||
|
||||
// place your code here
|
||||
char* DWORD2Time(uint32_t dwTime)
|
||||
{
|
||||
if(!dwTime)
|
||||
return(strdup(""));
|
||||
|
||||
uint32_t dwHours = dwTime/3600;
|
||||
uint32_t dwMinutes = (dwTime-(dwHours*3600))/60;
|
||||
uint32_t dwSeconds = (dwTime-(dwHours*3600)-dwMinutes*60);
|
||||
char szStr[100];
|
||||
|
||||
if(dwHours)
|
||||
sprintf(szStr, "%d:%02d:%02d", dwHours, dwMinutes, dwSeconds);
|
||||
else
|
||||
sprintf(szStr, "%d:%02d", dwMinutes, dwSeconds);
|
||||
|
||||
return(strdup(szStr));
|
||||
}
|
||||
|
||||
char* DWORD2String(uint32_t dwValue)
|
||||
{
|
||||
if(!dwValue)
|
||||
return(strdup(""));
|
||||
|
||||
char szStr[100];
|
||||
|
||||
sprintf(szStr, "%d", dwValue);
|
||||
return(strdup(szStr));
|
||||
}
|
||||
|
||||
uint32_t Time2DWORD(char* lpszTime)
|
||||
{
|
||||
if(!strlen(lpszTime))
|
||||
return(0);
|
||||
|
||||
char szHour[100] = {0};
|
||||
char szMinute[100] = {0};
|
||||
char szSecond[100] = {0};
|
||||
char sz[100];
|
||||
|
||||
strcpy(sz, lpszTime);
|
||||
if(strrchr(sz, ':'))
|
||||
{
|
||||
strcpy(szSecond, strrchr(sz, ':')+1);
|
||||
*strrchr(sz, ':') = 0;
|
||||
if(strchr(sz, ':'))
|
||||
{
|
||||
strcpy(szMinute, strchr(sz, ':')+1);
|
||||
*strchr(sz, ':') = 0;
|
||||
strcpy(szHour, sz);
|
||||
}
|
||||
else
|
||||
strcpy(szMinute, sz);
|
||||
}
|
||||
else
|
||||
strcpy(szSecond, sz);
|
||||
|
||||
|
||||
return(atol(szHour)*3600+atol(szMinute)*60+atol(szSecond));
|
||||
}
|
||||
|
||||
uint32_t String2DWORD(char* lpszStr)
|
||||
{
|
||||
if(!strlen(lpszStr))
|
||||
return(0);
|
||||
return(atol(lpszStr));
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
#ifndef COMMON_H
|
||||
#define COMMON_H
|
||||
|
||||
#include <QMessageBox>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <ctype.h>
|
||||
#include "ctime.h"
|
||||
|
||||
#define DELETE(x) if(x){delete x;x=0;}
|
||||
|
||||
#define MESSAGE(x) QMessageBox::information(this, tr("qtTrainingPlan"), x)
|
||||
#define MESSAGE_QUESTION(x) QMessageBox::question(this, tr("qtTrainingPlan"), x, QMessageBox::Yes | QMessageBox::No)
|
||||
|
||||
#define HOURS(x) ((x)/3600)
|
||||
#define MINUTES(x) (((x)/60)%60)
|
||||
#define SECONDS(x) ((x)%60)
|
||||
|
||||
// place your code here
|
||||
char* DWORD2Time(uint32_t dwTime);
|
||||
char* DWORD2String(uint32_t dwValue);
|
||||
uint32_t String2DWORD(char* lpszStr);
|
||||
uint32_t Time2DWORD(char* lpszTime);
|
||||
|
||||
#endif // COMMON_H
|
||||
@@ -0,0 +1,79 @@
|
||||
#include "ctime.h"
|
||||
|
||||
|
||||
CTime::CTime() : QTime()
|
||||
{
|
||||
}
|
||||
|
||||
CTime::CTime(int h, int m, int s, int ms) : QTime(h, m, s, ms)
|
||||
{
|
||||
}
|
||||
|
||||
CTime::CTime(const QTime& param)
|
||||
{
|
||||
setHMS(param.hour(), param.minute(), param.second(), param.msec());
|
||||
}
|
||||
|
||||
CTime::CTime(uint32_t dwTime)
|
||||
{
|
||||
setHMS(HOURS(dwTime), MINUTES(dwTime), SECONDS(dwTime));
|
||||
}
|
||||
|
||||
CTime::CTime(const QString& time)
|
||||
{
|
||||
QString szHour;
|
||||
QString szMinute;
|
||||
QString szSecond;
|
||||
QString tmp = time;
|
||||
|
||||
if(tmp.contains(":"))
|
||||
{
|
||||
szSecond = tmp.mid(tmp.lastIndexOf(":")+1);
|
||||
tmp = tmp.left(tmp.lastIndexOf(":"));
|
||||
}
|
||||
else
|
||||
{
|
||||
szSecond = tmp;
|
||||
tmp = "";
|
||||
}
|
||||
|
||||
if(tmp.contains(":"))
|
||||
{
|
||||
szMinute = tmp.mid(tmp.lastIndexOf(":")+1);
|
||||
tmp = tmp.left(tmp.lastIndexOf(":"));
|
||||
}
|
||||
else
|
||||
{
|
||||
szMinute = tmp;
|
||||
tmp = "";
|
||||
}
|
||||
szHour = tmp;
|
||||
setHMS(szHour.toInt(), szMinute.toInt(), szSecond.toInt());
|
||||
}
|
||||
|
||||
QString CTime::Format()
|
||||
{
|
||||
if(!hour() && !minute() && !second())
|
||||
return(QString(""));
|
||||
QString szTime;
|
||||
if(hour())
|
||||
szTime = toString(QString("h:mm:ss"));
|
||||
else
|
||||
szTime = toString(QString("mm:ss"));
|
||||
return(szTime);
|
||||
}
|
||||
|
||||
const CTime& CTime::operator=(const CTime& param)
|
||||
{
|
||||
setHMS(param.hour(), param.minute(), param.second(), param.msec());
|
||||
return(*this);
|
||||
}
|
||||
|
||||
uint32_t CTime::toDWORD()
|
||||
{
|
||||
uint32_t h = hour();
|
||||
uint32_t m = minute();
|
||||
uint32_t s = second();
|
||||
uint32_t t = h*3600+m*60+s;
|
||||
return(t);
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
#ifndef CTIME_H
|
||||
#define CTIME_H
|
||||
|
||||
#include <QTime>
|
||||
#include <stdint.h>
|
||||
#include "common.h"
|
||||
|
||||
class CTime : public QTime
|
||||
{
|
||||
public:
|
||||
CTime();
|
||||
CTime(int h, int m = 0, int s = 0, int ms = 0);
|
||||
CTime(const QTime& param);
|
||||
CTime(uint32_t dwTime);
|
||||
CTime(const QString& time);
|
||||
QString Format();
|
||||
const CTime& operator=(const CTime& param);
|
||||
uint32_t toDWORD();
|
||||
};
|
||||
|
||||
#endif // CTIME_H
|
||||
+791
@@ -0,0 +1,791 @@
|
||||
#include "ctraining.h"
|
||||
#include "common.h"
|
||||
|
||||
|
||||
CTraining::CTraining()
|
||||
{
|
||||
m_lpPerson = 0;
|
||||
m_lpSport = 0;
|
||||
m_lpTrainingPlan = 0;
|
||||
|
||||
m_lpCurSport = 0;
|
||||
m_lpCurHR = 0;
|
||||
m_lpCurTrainingPlan = 0;
|
||||
m_lpCurTrainingDay = 0;
|
||||
m_lpCurTrainingSession = 0;
|
||||
m_lpCurTrainingTask = 0;
|
||||
}
|
||||
|
||||
CTraining::CTraining(const QString& szFileName)
|
||||
{
|
||||
m_lpPerson = 0;
|
||||
m_lpSport = 0;
|
||||
m_lpTrainingPlan = 0;
|
||||
|
||||
m_lpCurSport = 0;
|
||||
m_lpCurHR = 0;
|
||||
m_lpCurTrainingPlan = 0;
|
||||
m_lpCurTrainingDay = 0;
|
||||
m_lpCurTrainingSession = 0;
|
||||
m_lpCurTrainingTask = 0;
|
||||
|
||||
Load(szFileName);
|
||||
}
|
||||
|
||||
CTraining::~CTraining()
|
||||
{
|
||||
Clean();
|
||||
}
|
||||
|
||||
void CTraining::Clean()
|
||||
{
|
||||
CleanPerson();
|
||||
CleanSport();
|
||||
CleanTrainingPlan();
|
||||
}
|
||||
|
||||
void CTraining::CleanPerson()
|
||||
{
|
||||
DELETE(m_lpPerson);
|
||||
}
|
||||
|
||||
void CTraining::CleanSport()
|
||||
{
|
||||
DELETE(m_lpSport);
|
||||
}
|
||||
|
||||
void CTraining::CleanTrainingPlan()
|
||||
{
|
||||
DELETE(m_lpTrainingPlan);
|
||||
}
|
||||
|
||||
void CTraining::ParsePerson(const QDomElement& Element)
|
||||
{
|
||||
QDomNode Child = Element.firstChild();
|
||||
while(!Child.isNull())
|
||||
{
|
||||
if(Child.toElement().tagName().toLower() == "firstname")
|
||||
{
|
||||
if(!m_lpPerson)
|
||||
m_lpPerson = new CPerson;
|
||||
m_lpPerson->SetFirstName(Child.toElement().text());
|
||||
}
|
||||
else if(Child.toElement().tagName().toLower() == "lastname")
|
||||
{
|
||||
if(!m_lpPerson)
|
||||
m_lpPerson = new CPerson;
|
||||
m_lpPerson->SetLastName(Child.toElement().text());
|
||||
}
|
||||
else if(Child.toElement().tagName().toLower() == "dayofbirth")
|
||||
{
|
||||
if(!m_lpPerson)
|
||||
m_lpPerson = new CPerson;
|
||||
m_lpPerson->SetDayOfBirth(QDate::fromString(Child.toElement().text(), "yyyyMMdd"));
|
||||
}
|
||||
else if(Child.toElement().tagName().toLower() == "height")
|
||||
{
|
||||
if(!m_lpPerson)
|
||||
m_lpPerson = new CPerson;
|
||||
m_lpPerson->SetHeight(Child.toElement().text().toInt());
|
||||
}
|
||||
else if(Child.toElement().tagName().toLower() == "weight")
|
||||
{
|
||||
if(!m_lpPerson)
|
||||
m_lpPerson = new CPerson;
|
||||
m_lpPerson->SetWeight(Child.toElement().text().toInt());
|
||||
}
|
||||
|
||||
Child = Child.nextSibling();
|
||||
}
|
||||
}
|
||||
|
||||
CSport* CTraining::ParseSport(const QDomElement& Element, CSport* lpSportDummy)
|
||||
{
|
||||
QDomNode Child = Element.firstChild();
|
||||
QDomNode Child1;
|
||||
CHR* lpHRDummy;
|
||||
|
||||
if(!m_lpSport)
|
||||
m_lpSport = lpSportDummy = new CSport(Element.attribute("name"));
|
||||
else
|
||||
lpSportDummy = lpSportDummy->Add(Element.attribute("name"));
|
||||
|
||||
while(!Child.isNull())
|
||||
{
|
||||
if(Child.toElement().tagName().toLower() == "maxhr")
|
||||
lpSportDummy->SetMaxHR(Child.toElement().text().toInt());
|
||||
else if(Child.toElement().tagName().toLower() == "hr")
|
||||
{
|
||||
lpHRDummy = lpSportDummy->AddHR(Child.toElement().attribute("name"));
|
||||
Child1 = Child.toElement().firstChild();
|
||||
while(!Child1.isNull())
|
||||
{
|
||||
if(Child1.toElement().tagName().toLower() == "desc")
|
||||
lpHRDummy->SetDesc(Child1.toElement().text());
|
||||
else if(Child1.toElement().tagName().toLower() == "min")
|
||||
lpHRDummy->SetMin(Child1.toElement().text().toInt());
|
||||
else if(Child1.toElement().tagName().toLower() == "max")
|
||||
lpHRDummy->SetMax(Child1.toElement().text().toInt());
|
||||
Child1 = Child1.nextSibling();
|
||||
}
|
||||
}
|
||||
else if(Child.toElement().tagName().toLower() == "pace")
|
||||
{
|
||||
if(Child.toElement().text().toLower() == "true")
|
||||
lpSportDummy->SetPace(true);
|
||||
else
|
||||
lpSportDummy->SetPace(false);
|
||||
}
|
||||
Child = Child.nextSibling();
|
||||
}
|
||||
return(lpSportDummy);
|
||||
}
|
||||
|
||||
CTrainingDay* CTraining::ParseDay(const QDomElement& Element, CTrainingDay* lpTrainingDayDummy)
|
||||
{
|
||||
QDomNode Child = Element.firstChild();
|
||||
int iNum;
|
||||
CTrainingSession* lpTrainingSessionDummy = 0;
|
||||
|
||||
iNum = Element.attribute("num").toInt();
|
||||
if(iNum != -1)
|
||||
{
|
||||
lpTrainingDayDummy = m_lpTrainingPlan->AddDay(iNum);
|
||||
|
||||
while(!Child.isNull())
|
||||
{
|
||||
if(Child.toElement().tagName().toLower() == "desc")
|
||||
lpTrainingDayDummy->SetDesc(Child.toElement().text());
|
||||
else if(Child.toElement().tagName().toLower() == "session")
|
||||
lpTrainingSessionDummy = ParseSession(Child.toElement(), lpTrainingDayDummy, lpTrainingSessionDummy);
|
||||
|
||||
Child = Child.nextSibling();
|
||||
}
|
||||
}
|
||||
return(lpTrainingDayDummy);
|
||||
}
|
||||
|
||||
CTrainingSession* CTraining::ParseSession(const QDomElement& Element, CTrainingDay* lpTrainingDay, CTrainingSession* lpTrainingSessionDummy)
|
||||
{
|
||||
QDomNode Child = Element.firstChild();
|
||||
int iNum;
|
||||
CTrainingTask* lpTrainingTaskDummy = 0;
|
||||
|
||||
iNum = Element.attribute("num").toInt();
|
||||
if(iNum != -1)
|
||||
{
|
||||
lpTrainingSessionDummy = lpTrainingDay->AddTrainingSession(iNum);
|
||||
|
||||
while(!Child.isNull())
|
||||
{
|
||||
if(Child.toElement().tagName().toLower() == "desc")
|
||||
lpTrainingSessionDummy->SetDesc(Child.toElement().text());
|
||||
else if(Child.toElement().tagName().toLower() == "sport")
|
||||
lpTrainingSessionDummy->SetSport(Child.toElement().text());
|
||||
else if(Child.toElement().tagName().toLower() == "task")
|
||||
lpTrainingTaskDummy = ParseTask(Child.toElement(), lpTrainingSessionDummy, lpTrainingTaskDummy);
|
||||
|
||||
Child = Child.nextSibling();
|
||||
}
|
||||
}
|
||||
return(lpTrainingSessionDummy);
|
||||
}
|
||||
|
||||
CTrainingTask* CTraining::ParseTask(const QDomElement& Element, CTrainingSession* lpTrainingSession, CTrainingTask* lpTrainingTaskDummy)
|
||||
{
|
||||
QDomNode Child = Element.firstChild();
|
||||
int iNum;
|
||||
|
||||
iNum = Element.attribute("num").toInt();
|
||||
if(iNum != -1)
|
||||
{
|
||||
lpTrainingTaskDummy = lpTrainingSession->AddTask(iNum);
|
||||
|
||||
while(!Child.isNull())
|
||||
{
|
||||
if(Child.toElement().tagName().toLower() == "desc")
|
||||
lpTrainingTaskDummy->SetDesc(Child.toElement().text());
|
||||
else if(Child.toElement().tagName().toLower() == "count")
|
||||
lpTrainingTaskDummy->SetCount(Child.toElement().text().toInt());
|
||||
else if(Child.toElement().tagName().toLower() == "time")
|
||||
lpTrainingTaskDummy->SetTime(Child.toElement().text().toInt());
|
||||
else if(Child.toElement().tagName().toLower() == "dist")
|
||||
lpTrainingTaskDummy->SetDist(Child.toElement().text().toInt());
|
||||
else if(Child.toElement().tagName().toLower() == "hr")
|
||||
lpTrainingTaskDummy->SetHR(Child.toElement().text());
|
||||
else if(Child.toElement().tagName().toLower() == "pace")
|
||||
lpTrainingTaskDummy->SetPace(Child.toElement().text().toInt());
|
||||
else if(Child.toElement().tagName().toLower() == "pausetime")
|
||||
lpTrainingTaskDummy->SetPauseTime(Child.toElement().text().toInt());
|
||||
else if(Child.toElement().tagName().toLower() == "pausedist")
|
||||
lpTrainingTaskDummy->SetPauseDist(Child.toElement().text().toInt());
|
||||
else if(Child.toElement().tagName().toLower() == "pausehr")
|
||||
lpTrainingTaskDummy->SetPauseHR(Child.toElement().text());
|
||||
else if(Child.toElement().tagName().toLower() == "pausepace")
|
||||
lpTrainingTaskDummy->SetPausePace(Child.toElement().text().toInt());
|
||||
|
||||
Child = Child.nextSibling();
|
||||
}
|
||||
}
|
||||
return(lpTrainingTaskDummy);
|
||||
}
|
||||
|
||||
bool CTraining::Load(const QString& szFileName)
|
||||
{
|
||||
Clean();
|
||||
m_szFileName = szFileName;
|
||||
|
||||
QFile File(szFileName);
|
||||
if(!File.open(QFile::ReadOnly | QFile::Text))
|
||||
return(false);
|
||||
|
||||
QDomDocument Doc;
|
||||
QString errorStr;
|
||||
int errorLine;
|
||||
int errorColumn;
|
||||
if(!Doc.setContent(&File, false, &errorStr, &errorLine, &errorColumn))
|
||||
return(false);
|
||||
|
||||
QDomElement Root = Doc.documentElement();
|
||||
if(Root.tagName().toLower() != "trainingplan")
|
||||
return(false);
|
||||
|
||||
CTrainingDay* lpTrainingDayDummy = 0;
|
||||
CSport* lpSportDummy = 0;
|
||||
QDomNode Child = Root.firstChild();
|
||||
|
||||
while(!Child.isNull())
|
||||
{
|
||||
if(Child.toElement().tagName().toLower() == "person")
|
||||
ParsePerson(Child.toElement());
|
||||
else if(Child.toElement().tagName().toLower() == "sport")
|
||||
lpSportDummy = ParseSport(Child.toElement(), lpSportDummy);
|
||||
else if(Child.toElement().tagName().toLower() == "name")
|
||||
{
|
||||
if(!m_lpTrainingPlan)
|
||||
m_lpTrainingPlan = new CTrainingPlan(Child.toElement().text());
|
||||
}
|
||||
else if(Child.toElement().tagName().toLower() == "startdate")
|
||||
{
|
||||
if(m_lpTrainingPlan)
|
||||
m_lpTrainingPlan->SetTrainingStart(QDate::fromString(Child.toElement().text(), "yyyyMMdd"));
|
||||
}
|
||||
else if(Child.toElement().tagName().toLower() == "desc")
|
||||
{
|
||||
if(m_lpTrainingPlan)
|
||||
m_lpTrainingPlan->SetDesc(Child.toElement().text());
|
||||
}
|
||||
else if(Child.toElement().tagName().toLower() == "day")
|
||||
lpTrainingDayDummy = ParseDay(Child.toElement(), lpTrainingDayDummy);
|
||||
|
||||
Child = Child.nextSibling();
|
||||
}
|
||||
|
||||
Recalculate();
|
||||
return(true);
|
||||
}
|
||||
|
||||
bool CTraining::Save(const QString& szFileName)
|
||||
{
|
||||
QFile File(szFileName);
|
||||
if(!File.open(QFile::WriteOnly | QFile::Text))
|
||||
return(false);
|
||||
|
||||
QXmlStreamWriter xmlWriter(&File);
|
||||
xmlWriter.setCodec("UTF-8");
|
||||
|
||||
xmlWriter.setAutoFormatting(true);
|
||||
xmlWriter.setAutoFormattingIndent(-1);
|
||||
xmlWriter.writeStartDocument();
|
||||
xmlWriter.writeStartElement("TrainingPlan");
|
||||
|
||||
if(m_lpPerson)
|
||||
{
|
||||
xmlWriter.writeStartElement("Person");
|
||||
if(m_lpPerson->GetFirstName().length())
|
||||
xmlWriter.writeTextElement("FirstName", m_lpPerson->GetFirstName());
|
||||
if(m_lpPerson->GetLastName().length())
|
||||
xmlWriter.writeTextElement("LastName", m_lpPerson->GetLastName());
|
||||
if(m_lpPerson->GetDayOfBirth().year())
|
||||
xmlWriter.writeTextElement("DayOfBirth", m_lpPerson->GetDayOfBirth().toString("yyyyMMdd"));
|
||||
if(m_lpPerson->GetHeight())
|
||||
xmlWriter.writeTextElement("Height", QString("%1").arg(m_lpPerson->GetHeight()));
|
||||
if(m_lpPerson->GetWeight())
|
||||
xmlWriter.writeTextElement("Weight", QString("%1").arg(m_lpPerson->GetWeight()));
|
||||
xmlWriter.writeEndElement();
|
||||
}
|
||||
|
||||
CSport* lpSport = m_lpSport;
|
||||
while(lpSport)
|
||||
{
|
||||
xmlWriter.writeStartElement("Sport");
|
||||
xmlWriter.writeAttribute("name", lpSport->GetName());
|
||||
xmlWriter.writeTextElement("Pace", lpSport->GetPace() ? "true" : "false");
|
||||
if(lpSport->GetMaxHR())
|
||||
xmlWriter.writeTextElement("MaxHR", QString("%1").arg(lpSport->GetMaxHR()));
|
||||
|
||||
CHR* lpHR = lpSport->GetHR();
|
||||
while(lpHR)
|
||||
{
|
||||
xmlWriter.writeStartElement("HR");
|
||||
xmlWriter.writeAttribute("name", lpHR->GetName());
|
||||
if(lpHR->GetDesc().length())
|
||||
xmlWriter.writeTextElement("Desc", lpHR->GetDesc());
|
||||
xmlWriter.writeTextElement("Min", QString("%1").arg(lpHR->GetMin()));
|
||||
xmlWriter.writeTextElement("Max", QString("%1").arg(lpHR->GetMax()));
|
||||
xmlWriter.writeEndElement();
|
||||
lpHR = lpHR->GetChild();
|
||||
}
|
||||
xmlWriter.writeEndElement();
|
||||
lpSport = lpSport->GetChild();
|
||||
}
|
||||
|
||||
if(m_lpTrainingPlan)
|
||||
{
|
||||
xmlWriter.writeTextElement("Name", m_lpTrainingPlan->GetName());
|
||||
if(m_lpTrainingPlan->HasDesc())
|
||||
xmlWriter.writeTextElement("Desc", m_lpTrainingPlan->GetDesc());
|
||||
if(m_lpTrainingPlan->GetTrainingStart().year())
|
||||
xmlWriter.writeTextElement("StartDate", m_lpTrainingPlan->GetTrainingStart().toString("yyyyMMdd"));
|
||||
CTrainingDay* lpDay = m_lpTrainingPlan->GetTrainingDay();
|
||||
while(lpDay)
|
||||
{
|
||||
xmlWriter.writeStartElement("Day");
|
||||
xmlWriter.writeAttribute("num", QString("%1").arg(lpDay->GetNum()));
|
||||
if(lpDay->HasDesc())
|
||||
xmlWriter.writeTextElement("Desc", lpDay->GetDesc());
|
||||
CTrainingSession* lpSession = lpDay->GetTrainingSession();
|
||||
while(lpSession)
|
||||
{
|
||||
xmlWriter.writeStartElement("Session");
|
||||
xmlWriter.writeAttribute("num", QString("%1").arg(lpSession->GetNum()));
|
||||
if(lpSession->HasSport())
|
||||
xmlWriter.writeTextElement("Sport", lpSession->GetSport());
|
||||
if(lpSession->HasDesc())
|
||||
xmlWriter.writeTextElement("Desc", lpSession->GetDesc());
|
||||
CTrainingTask* lpTask = lpSession->GetTrainingTask();
|
||||
while(lpTask)
|
||||
{
|
||||
xmlWriter.writeStartElement("Task");
|
||||
xmlWriter.writeAttribute("num", QString("%1").arg(lpTask->GetNum()));
|
||||
if(lpTask->HasDesc())
|
||||
xmlWriter.writeTextElement("Desc", lpTask->GetDesc());
|
||||
xmlWriter.writeTextElement("Count", QString("%1").arg(lpTask->GetCount()));
|
||||
if(lpTask->GetDist())
|
||||
xmlWriter.writeTextElement("Dist", QString("%1").arg(lpTask->GetDist()));
|
||||
if(lpTask->HasHR())
|
||||
xmlWriter.writeTextElement("HR", lpTask->GetHR());
|
||||
if(lpTask->GetPace())
|
||||
xmlWriter.writeTextElement("Pace", QString("%1").arg(lpTask->GetPace()));
|
||||
if(lpTask->GetTime())
|
||||
xmlWriter.writeTextElement("Time", QString("%1").arg(lpTask->GetTime()));
|
||||
if(lpTask->GetCount() > 1)
|
||||
{
|
||||
if(lpTask->GetPauseDist())
|
||||
xmlWriter.writeTextElement("PauseDist", QString("%1").arg(lpTask->GetPauseDist()));
|
||||
if(lpTask->HasPauseHR())
|
||||
xmlWriter.writeTextElement("PauseHR", lpTask->GetPauseHR());
|
||||
if(lpTask->GetPausePace())
|
||||
xmlWriter.writeTextElement("PausePace", QString("%1").arg(lpTask->GetPausePace()));
|
||||
if(lpTask->GetPauseTime())
|
||||
xmlWriter.writeTextElement("PauseTime", QString("%1").arg(lpTask->GetPauseTime()));
|
||||
}
|
||||
xmlWriter.writeEndElement();
|
||||
lpTask = lpTask->GetChild();
|
||||
}
|
||||
xmlWriter.writeEndElement();
|
||||
lpSession = lpSession->GetChild();
|
||||
}
|
||||
xmlWriter.writeEndElement();
|
||||
lpDay = lpDay->GetChild();
|
||||
}
|
||||
}
|
||||
|
||||
xmlWriter.writeEndDocument();
|
||||
File.close();
|
||||
if(File.error())
|
||||
return(false);
|
||||
return(true);
|
||||
}
|
||||
|
||||
void CTraining::Recalculate()
|
||||
{
|
||||
CTrainingDay* lpTrainingDayDummy;
|
||||
CTrainingSession* lpTrainingSessionDummy;
|
||||
CTrainingTask* lpTrainingTaskDummy;
|
||||
|
||||
|
||||
if(m_lpTrainingPlan)
|
||||
{
|
||||
lpTrainingDayDummy = m_lpTrainingPlan->GetTrainingDay();
|
||||
while(lpTrainingDayDummy)
|
||||
{
|
||||
lpTrainingSessionDummy = lpTrainingDayDummy->GetTrainingSession();
|
||||
while(lpTrainingSessionDummy)
|
||||
{
|
||||
lpTrainingTaskDummy = lpTrainingSessionDummy->GetTrainingTask();
|
||||
while(lpTrainingTaskDummy)
|
||||
{
|
||||
if(!lpTrainingTaskDummy->GetCount())
|
||||
lpTrainingTaskDummy->SetCount(1);
|
||||
|
||||
if(lpTrainingTaskDummy->GetTime() && lpTrainingTaskDummy->GetDist())
|
||||
lpTrainingTaskDummy->CalcPace();
|
||||
else if(lpTrainingTaskDummy->GetDist() && lpTrainingTaskDummy->GetPace())
|
||||
lpTrainingTaskDummy->CalcTime();
|
||||
else if(lpTrainingTaskDummy->GetTime() && lpTrainingTaskDummy->GetPace())
|
||||
lpTrainingTaskDummy->CalcDist();
|
||||
|
||||
if(lpTrainingTaskDummy->GetCount() > 1)
|
||||
{
|
||||
if(lpTrainingTaskDummy->GetPauseTime() && lpTrainingTaskDummy->GetPauseDist())
|
||||
lpTrainingTaskDummy->CalcPausePace();
|
||||
else if(lpTrainingTaskDummy->GetPauseDist() && lpTrainingTaskDummy->GetPausePace())
|
||||
lpTrainingTaskDummy->CalcPauseTime();
|
||||
else if(lpTrainingTaskDummy->GetPauseTime() && lpTrainingTaskDummy->GetPausePace())
|
||||
lpTrainingTaskDummy->CalcPauseDist();
|
||||
}
|
||||
else
|
||||
{
|
||||
lpTrainingTaskDummy->SetPauseTime(0);
|
||||
lpTrainingTaskDummy->SetPauseDist(0);
|
||||
lpTrainingTaskDummy->SetPausePace(0);
|
||||
}
|
||||
|
||||
lpTrainingTaskDummy = lpTrainingTaskDummy->GetChild();
|
||||
}
|
||||
lpTrainingSessionDummy = lpTrainingSessionDummy->GetChild();
|
||||
}
|
||||
lpTrainingDayDummy = lpTrainingDayDummy->GetChild();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool CTraining::GetPerson(QString& szFirstName, QString& szLastName, QDate& DayOfBirth, uint32_t& dwHeight, uint32_t& dwWeight)
|
||||
{
|
||||
if(!m_lpPerson)
|
||||
return(false);
|
||||
|
||||
szFirstName = m_lpPerson->GetFirstName();
|
||||
szLastName = m_lpPerson->GetLastName();
|
||||
DayOfBirth = m_lpPerson->GetDayOfBirth();
|
||||
dwHeight = m_lpPerson->GetHeight();
|
||||
dwWeight = m_lpPerson->GetWeight();
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
bool CTraining::GetFirstSport(QString& szName, uint32_t& dwMaxHR, bool& bPace)
|
||||
{
|
||||
m_lpCurHR = 0;
|
||||
m_lpCurSport = m_lpSport;
|
||||
if(!m_lpCurSport)
|
||||
return(false);
|
||||
|
||||
szName = m_lpCurSport->GetName();
|
||||
dwMaxHR = m_lpCurSport->GetMaxHR();
|
||||
bPace = m_lpCurSport->GetPace();
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
bool CTraining::GetNextSport(QString& szName, uint32_t& dwMaxHR, bool& bPace)
|
||||
{
|
||||
m_lpCurHR = 0;
|
||||
if(!m_lpCurSport)
|
||||
return(false);
|
||||
m_lpCurSport = m_lpCurSport->GetChild();
|
||||
if(!m_lpCurSport)
|
||||
return(false);
|
||||
|
||||
szName = m_lpCurSport->GetName();
|
||||
dwMaxHR = m_lpCurSport->GetMaxHR();
|
||||
bPace = m_lpCurSport->GetPace();
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
bool CTraining::GetFirstHR(QString& szName, QString& szDesc, uint32_t& dwMin, uint32_t& dwMax)
|
||||
{
|
||||
if(!m_lpCurSport)
|
||||
return(false);
|
||||
m_lpCurHR = m_lpCurSport->GetHR();
|
||||
if(!m_lpCurHR)
|
||||
return(false);
|
||||
|
||||
szName = m_lpCurHR->GetName();
|
||||
szDesc = m_lpCurHR->GetDesc();
|
||||
dwMin = m_lpCurHR->GetMin();
|
||||
dwMax = m_lpCurHR->GetMax();
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
bool CTraining::GetNextHR(QString& szName, QString& szDesc, uint32_t& dwMin, uint32_t& dwMax)
|
||||
{
|
||||
if(!m_lpCurHR)
|
||||
return(false);
|
||||
m_lpCurHR = m_lpCurHR->GetChild();
|
||||
if(!m_lpCurHR)
|
||||
return(false);
|
||||
|
||||
szName = m_lpCurHR->GetName();
|
||||
szDesc = m_lpCurHR->GetDesc();
|
||||
dwMin = m_lpCurHR->GetMin();
|
||||
dwMax = m_lpCurHR->GetMax();
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
bool CTraining::GetFirstTraining(QString& szName, QString& szDesc, QDate& TrainingStart)
|
||||
{
|
||||
m_lpCurTrainingDay = 0;
|
||||
m_lpCurTrainingSession = 0;
|
||||
m_lpCurTrainingTask = 0;
|
||||
m_lpCurTrainingPlan = m_lpTrainingPlan;
|
||||
if(!m_lpCurTrainingPlan)
|
||||
return(false);
|
||||
|
||||
szName = m_lpCurTrainingPlan->GetName();
|
||||
szDesc = m_lpCurTrainingPlan->GetDesc();
|
||||
TrainingStart = m_lpCurTrainingPlan->GetTrainingStart();
|
||||
return(true);
|
||||
}
|
||||
|
||||
bool CTraining::GetNextTraining(QString& szName, QString& szDesc, QDate& TrainingStart)
|
||||
{
|
||||
m_lpCurTrainingDay = 0;
|
||||
m_lpCurTrainingSession = 0;
|
||||
m_lpCurTrainingTask = 0;
|
||||
szName = szName;
|
||||
szDesc = szDesc;
|
||||
TrainingStart = TrainingStart;
|
||||
return(false);
|
||||
}
|
||||
|
||||
bool CTraining::GetFirstDay(int& iNum, QString& szDesc)
|
||||
{
|
||||
m_lpCurTrainingSession = 0;
|
||||
m_lpCurTrainingTask = 0;
|
||||
if(!m_lpCurTrainingPlan)
|
||||
return(false);
|
||||
m_lpCurTrainingDay = m_lpCurTrainingPlan->GetTrainingDay();
|
||||
if(!m_lpCurTrainingDay)
|
||||
return(false);
|
||||
|
||||
iNum = m_lpCurTrainingDay->GetNum();
|
||||
szDesc = m_lpCurTrainingDay->GetDesc();
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
bool CTraining::GetNextDay(int& iNum, QString& szDesc)
|
||||
{
|
||||
m_lpCurTrainingSession = 0;
|
||||
m_lpCurTrainingTask = 0;
|
||||
if(!m_lpCurTrainingDay)
|
||||
return(false);
|
||||
m_lpCurTrainingDay = m_lpCurTrainingDay->GetChild();
|
||||
if(!m_lpCurTrainingDay)
|
||||
return(false);
|
||||
|
||||
iNum = m_lpCurTrainingDay->GetNum();
|
||||
szDesc = m_lpCurTrainingDay->GetDesc();
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
bool CTraining::GetFirstSession(int& iNum, QString& szDesc, QString& szSport)
|
||||
{
|
||||
m_lpCurTrainingTask = 0;
|
||||
if(!m_lpCurTrainingDay)
|
||||
return(false);
|
||||
m_lpCurTrainingSession = m_lpCurTrainingDay->GetTrainingSession();
|
||||
if(!m_lpCurTrainingSession)
|
||||
return(false);
|
||||
|
||||
iNum = m_lpCurTrainingSession->GetNum();
|
||||
szDesc = m_lpCurTrainingSession->GetDesc();
|
||||
szSport = m_lpCurTrainingSession->GetSport();
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
bool CTraining::GetNextSession(int& iNum, QString& szDesc, QString& szSport)
|
||||
{
|
||||
m_lpCurTrainingTask = 0;
|
||||
if(!m_lpCurTrainingSession)
|
||||
return(false);
|
||||
m_lpCurTrainingSession = m_lpCurTrainingSession->GetChild();
|
||||
if(!m_lpCurTrainingSession)
|
||||
return(false);
|
||||
|
||||
iNum = m_lpCurTrainingSession->GetNum();
|
||||
szDesc = m_lpCurTrainingSession->GetDesc();
|
||||
szSport = m_lpCurTrainingSession->GetSport();
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
bool CTraining::GetFirstTask(int& iNum, QString& szDesc, uint32_t& dwCount, uint32_t& dwTime, uint32_t& dwDist, QString& szHR, uint32_t& dwPace, uint32_t& dwPauseTime, uint32_t& dwPauseDist, QString& szPauseHR, uint32_t& dwPausePace)
|
||||
{
|
||||
if(!m_lpCurTrainingSession)
|
||||
return(false);
|
||||
m_lpCurTrainingTask = m_lpCurTrainingSession->GetTrainingTask();
|
||||
if(!m_lpCurTrainingTask)
|
||||
return(false);
|
||||
|
||||
iNum = m_lpCurTrainingTask->GetNum();
|
||||
szDesc = m_lpCurTrainingTask->GetDesc();
|
||||
dwCount = m_lpCurTrainingTask->GetCount();
|
||||
dwTime = m_lpCurTrainingTask->GetTime();
|
||||
dwDist = m_lpCurTrainingTask->GetDist();
|
||||
szHR = m_lpCurTrainingTask->GetHR();
|
||||
dwPace = m_lpCurTrainingTask->GetPace();
|
||||
dwPauseTime = m_lpCurTrainingTask->GetPauseTime();
|
||||
dwPauseDist = m_lpCurTrainingTask->GetPauseDist();
|
||||
szPauseHR = m_lpCurTrainingTask->GetPauseHR();
|
||||
dwPausePace = m_lpCurTrainingTask->GetPausePace();
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
bool CTraining::GetNextTask(int& iNum, QString& szDesc, uint32_t& dwCount, uint32_t& dwTime, uint32_t& dwDist, QString& szHR, uint32_t& dwPace, uint32_t& dwPauseTime, uint32_t& dwPauseDist, QString& szPauseHR, uint32_t& dwPausePace)
|
||||
{
|
||||
if(!m_lpCurTrainingTask)
|
||||
return(false);
|
||||
m_lpCurTrainingTask = m_lpCurTrainingTask->GetChild();
|
||||
if(!m_lpCurTrainingTask)
|
||||
return(false);
|
||||
|
||||
iNum = m_lpCurTrainingTask->GetNum();
|
||||
szDesc = m_lpCurTrainingTask->GetDesc();
|
||||
dwCount = m_lpCurTrainingTask->GetCount();
|
||||
dwTime = m_lpCurTrainingTask->GetTime();
|
||||
dwDist = m_lpCurTrainingTask->GetDist();
|
||||
szHR = m_lpCurTrainingTask->GetHR();
|
||||
dwPace = m_lpCurTrainingTask->GetPace();
|
||||
dwPauseTime = m_lpCurTrainingTask->GetPauseTime();
|
||||
dwPauseDist = m_lpCurTrainingTask->GetPauseDist();
|
||||
szPauseHR = m_lpCurTrainingTask->GetPauseHR();
|
||||
dwPausePace = m_lpCurTrainingTask->GetPausePace();
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
void CTraining::SetTraining(QString szTraining, QDate TrainingStart)
|
||||
{
|
||||
if(!m_lpTrainingPlan)
|
||||
m_lpTrainingPlan = new CTrainingPlan(szTraining);
|
||||
else
|
||||
m_lpTrainingPlan->SetName(szTraining);
|
||||
m_lpTrainingPlan->SetTrainingStart(TrainingStart);
|
||||
}
|
||||
|
||||
void CTraining::SetPerson(QString szFirstName, QString szLastName, QDate DayOfBirth, uint32_t dwHeight, uint32_t dwWeight)
|
||||
{
|
||||
DELETE(m_lpPerson);
|
||||
m_lpPerson = new CPerson(szFirstName, szLastName, DayOfBirth, dwHeight, dwWeight);
|
||||
}
|
||||
|
||||
void CTraining::SetDay(int iDay, int iNewDay, QString szNewDesc)
|
||||
{
|
||||
CTrainingDay* lpOldDay;
|
||||
CTrainingDay* lpNewDay;
|
||||
|
||||
if(!m_lpTrainingPlan)
|
||||
return;
|
||||
|
||||
lpOldDay = m_lpTrainingPlan->GetTrainingDay()->Find(iDay);
|
||||
lpNewDay = m_lpTrainingPlan->GetTrainingDay()->Find(iNewDay);
|
||||
|
||||
if(!lpNewDay)
|
||||
{
|
||||
lpOldDay->SetNum(iNewDay);
|
||||
lpOldDay->SetDesc(szNewDesc);
|
||||
}
|
||||
else
|
||||
{
|
||||
lpNewDay->AddTrainingSession(lpOldDay->GetTrainingSession());
|
||||
lpOldDay->SetTrainingSession(0);
|
||||
m_lpTrainingPlan->DeleteTrainingDay(iDay);
|
||||
}
|
||||
}
|
||||
|
||||
void CTraining::SetSession(int iDay, int iNewDay, int iSession, QString szDesc, QString szSport)
|
||||
{
|
||||
if(!m_lpTrainingPlan)
|
||||
return;
|
||||
|
||||
CTrainingDay* lpOldDay;
|
||||
CTrainingDay* lpNewDay;
|
||||
CTrainingSession* lpSession;
|
||||
|
||||
lpOldDay = m_lpTrainingPlan->GetTrainingDay()->Find(iDay);
|
||||
if(!lpOldDay)
|
||||
return;
|
||||
|
||||
lpSession = lpOldDay->GetTrainingSession()->Find(iSession);
|
||||
if(!lpSession)
|
||||
return;
|
||||
|
||||
lpSession->SetDesc(szDesc);
|
||||
lpSession->SetSport(szSport);
|
||||
|
||||
if(iDay == iNewDay)
|
||||
return;
|
||||
|
||||
lpNewDay = m_lpTrainingPlan->GetTrainingDay()->Find(iNewDay);
|
||||
if(!lpNewDay)
|
||||
return;
|
||||
|
||||
lpNewDay->AddTrainingSession(lpSession);
|
||||
lpOldDay->DeleteTrainingSession(lpSession);
|
||||
}
|
||||
|
||||
void CTraining::AddSport(QString szName, uint32_t dwMaxHR, bool bPace)
|
||||
{
|
||||
if(!m_lpSport)
|
||||
m_lpSport = new CSport(szName, dwMaxHR, 0, bPace);
|
||||
else
|
||||
m_lpSport->Add(szName, dwMaxHR, 0, bPace);
|
||||
}
|
||||
|
||||
void CTraining::AddHR(QString szSport, QString szName, QString szDesc, uint32_t dwMin, uint32_t dwMax)
|
||||
{
|
||||
if(!m_lpSport)
|
||||
return;
|
||||
CSport* lpSport = m_lpSport->Find(szSport);
|
||||
if(!lpSport)
|
||||
return;
|
||||
lpSport->AddHR(szName, szDesc, dwMin, dwMax);
|
||||
}
|
||||
|
||||
void CTraining::AddDay(int iDay, QString szDesc)
|
||||
{
|
||||
QString szDescTemp = szDesc;
|
||||
|
||||
if(szDescTemp.indexOf(")"))
|
||||
szDescTemp = szDescTemp.mid(szDescTemp.indexOf(")")+2);
|
||||
m_lpTrainingPlan->AddDay(iDay, szDescTemp);
|
||||
}
|
||||
|
||||
void CTraining::AddSession(int iDay, int iSession, QString szDesc, QString szSport)
|
||||
{
|
||||
CTrainingDay* lpDay = m_lpTrainingPlan->GetTrainingDay()->Find(iDay);
|
||||
if(!lpDay)
|
||||
return;
|
||||
lpDay->AddTrainingSession(iSession, szDesc, szSport);
|
||||
}
|
||||
|
||||
void CTraining::AddTask(int iDay, int iSession, int iTask, QString szDesc, uint32_t dwCount, uint32_t dwTime, uint32_t dwDist, QString szHR, uint32_t dwPace, uint32_t dwPauseTime, uint32_t dwPauseDist, QString szPauseHR, uint32_t dwPausePace)
|
||||
{
|
||||
CTrainingDay* lpDay = m_lpTrainingPlan->GetTrainingDay()->Find(iDay);
|
||||
if(!lpDay)
|
||||
return;
|
||||
CTrainingSession* lpSession = lpDay->GetTrainingSession()->Find(iSession);
|
||||
if(!lpSession)
|
||||
return;
|
||||
|
||||
lpSession->AddTask(iTask, szDesc, dwCount, dwTime, dwDist, szHR, dwPace, dwPauseTime, dwPauseDist, szPauseHR, dwPausePace);
|
||||
}
|
||||
+611
@@ -0,0 +1,611 @@
|
||||
#ifndef CTRAINING_H
|
||||
#define CTRAINING_H
|
||||
|
||||
#include <QDate>
|
||||
#include <QFile>
|
||||
#include <QDomDocument>
|
||||
#include <QXmlStreamWriter>
|
||||
#include "common.h"
|
||||
|
||||
|
||||
class CPerson
|
||||
{
|
||||
public:
|
||||
CPerson()
|
||||
{
|
||||
m_szFirstName = "";
|
||||
m_szLastName = "";
|
||||
m_dwWeight = 0;
|
||||
m_dwWeight = 0;
|
||||
};
|
||||
CPerson(const QString& szFirstName, const QString& szLastName, const QDate& DayOfBirth, uint32_t dwHeight, uint32_t dwWeight)
|
||||
{
|
||||
m_szFirstName = "";
|
||||
m_szLastName = "";
|
||||
Set(szFirstName, szLastName, DayOfBirth, dwHeight, dwWeight);
|
||||
};
|
||||
~CPerson()
|
||||
{
|
||||
};
|
||||
void SetFirstName(const QString& szFirstName) { m_szFirstName = szFirstName; }
|
||||
void SetLastName(const QString& szLastName) { m_szLastName = szLastName; }
|
||||
void SetDayOfBirth(const QDate& DayOfBirth) { m_DayOfBirth = DayOfBirth; }
|
||||
void SetHeight(uint32_t dwHeight) { m_dwHeight = dwHeight; }
|
||||
void SetWeight(uint32_t dwWeight) { m_dwWeight = dwWeight; }
|
||||
void Set(const QString& szFirstName, const QString& szLastName, const QDate& DayOfBirth, uint32_t dwHeight, uint32_t dwWeight)
|
||||
{
|
||||
SetFirstName(szFirstName);
|
||||
SetLastName(szLastName);
|
||||
SetDayOfBirth(DayOfBirth);
|
||||
SetHeight(dwHeight);
|
||||
SetWeight(dwWeight);
|
||||
};
|
||||
QString GetFirstName() { return(m_szFirstName); };
|
||||
QString GetLastName() { return(m_szLastName); };
|
||||
QDate GetDayOfBirth() { return(m_DayOfBirth); };
|
||||
uint32_t GetHeight() { return(m_dwHeight); };
|
||||
uint32_t GetWeight() { return(m_dwWeight); };
|
||||
protected:
|
||||
QString m_szFirstName;
|
||||
QString m_szLastName;
|
||||
QDate m_DayOfBirth;
|
||||
uint32_t m_dwHeight;
|
||||
uint32_t m_dwWeight;
|
||||
};
|
||||
|
||||
class CHR
|
||||
{
|
||||
public:
|
||||
CHR(const QString& szName, const QString& szDesc = "", uint32_t dwMin = 0, uint32_t dwMax = 0, CHR* lpChild = 0)
|
||||
{
|
||||
m_szName = "";
|
||||
m_szDesc = "";
|
||||
m_lpChild = 0;
|
||||
Set(szName, szDesc, dwMin, dwMax, lpChild);
|
||||
};
|
||||
~CHR()
|
||||
{
|
||||
DELETE(m_lpChild);
|
||||
}
|
||||
CHR* Add(const QString& szName, const QString& szDesc = "", uint32_t dwMin = 0, uint32_t dwMax = 0, CHR* lpChild = 0)
|
||||
{
|
||||
if(!m_lpChild)
|
||||
m_lpChild = new CHR(szName, szDesc, dwMin, dwMax, lpChild);
|
||||
else
|
||||
m_lpChild->Set(szName, szDesc, dwMin, dwMax, lpChild);
|
||||
return(m_lpChild);
|
||||
};
|
||||
void SetName(const QString& szName) { m_szName = szName; };
|
||||
void SetDesc(const QString& szDesc) { m_szDesc = szDesc; };
|
||||
void SetMin(uint32_t dwMin) { m_dwMin = dwMin; };
|
||||
void SetMax(uint32_t dwMax) { m_dwMax = dwMax; };
|
||||
void SetChild(CHR* lpChild) { m_lpChild = lpChild; };
|
||||
void Set(const QString& szName, const QString& szDesc = "", uint32_t dwMin = 0, uint32_t dwMax = 0, CHR* lpChild = 0)
|
||||
{
|
||||
SetName(szName);
|
||||
SetDesc(szDesc);
|
||||
SetMin(dwMin);
|
||||
SetMax(dwMax);
|
||||
SetChild(lpChild);
|
||||
};
|
||||
QString GetName() { return(m_szName); };
|
||||
QString GetDesc() { return(m_szDesc); };
|
||||
uint32_t GetMin() { return(m_dwMin); };
|
||||
uint32_t GetMax() { return(m_dwMax); };
|
||||
CHR* GetChild() { return(m_lpChild); };
|
||||
CHR* Find(const QString& szName)
|
||||
{
|
||||
if(m_szName == szName)
|
||||
return(this);
|
||||
if(m_lpChild)
|
||||
return(m_lpChild->Find(szName));
|
||||
return(0);
|
||||
};
|
||||
bool HasName() { if(m_szName.length()) return(true); return(false); };
|
||||
bool HasDesc() { if(m_szDesc.length()) return(true); return(false); };
|
||||
protected:
|
||||
QString m_szName;
|
||||
QString m_szDesc;
|
||||
uint32_t m_dwMin;
|
||||
uint32_t m_dwMax;
|
||||
CHR* m_lpChild;
|
||||
};
|
||||
|
||||
class CSport
|
||||
{
|
||||
public:
|
||||
CSport(const QString& szName, uint32_t dwMaxHR = 0, CHR* lpHR = 0, bool bPace = true, CSport* lpChild = 0)
|
||||
{
|
||||
m_szName = "";
|
||||
m_lpHR = 0;
|
||||
m_lpChild = 0;
|
||||
Set(szName, dwMaxHR, lpHR, bPace, lpChild);
|
||||
};
|
||||
~CSport()
|
||||
{
|
||||
DELETE(m_lpHR);
|
||||
DELETE(m_lpChild);
|
||||
};
|
||||
CSport* Add(const QString& szName, uint32_t dwMaxHR = 0, CHR* lpHR = 0, bool bPace = true, CSport* lpChild = 0)
|
||||
{
|
||||
if(!m_lpChild)
|
||||
m_lpChild = new CSport(szName, dwMaxHR, lpHR, bPace, lpChild);
|
||||
else
|
||||
m_lpChild->Set(szName, dwMaxHR, lpHR, bPace, lpChild);
|
||||
return(m_lpChild);
|
||||
};
|
||||
CHR* AddHR(const QString& szName, const QString& szDesc = "", uint32_t dwMin = 0, uint32_t dwMax = 0, CHR* lpChild = 0)
|
||||
{
|
||||
CHR* lpHRDummy = m_lpHR;
|
||||
if(!lpHRDummy)
|
||||
lpHRDummy = m_lpHR = new CHR(szName, szDesc, dwMin, dwMax, lpChild);
|
||||
else
|
||||
{
|
||||
while(lpHRDummy->GetChild())
|
||||
lpHRDummy = lpHRDummy->GetChild();
|
||||
lpHRDummy = lpHRDummy->Add(szName, szDesc, dwMin, dwMax, lpChild);
|
||||
}
|
||||
return(lpHRDummy);
|
||||
};
|
||||
void SetName(const QString& szName) { m_szName = szName; };
|
||||
void SetMaxHR(uint32_t dwMaxHR) { m_dwMaxHR = dwMaxHR; };
|
||||
void SetHR(CHR* lpHR) { m_lpHR = lpHR; };
|
||||
void SetPace(bool bPace) { m_bPace = bPace; };
|
||||
void SetChild(CSport* lpChild) { m_lpChild = lpChild; };
|
||||
void Set(const QString& szName, uint32_t dwMaxHR = 0, CHR* lpHR = 0, bool bPace = true, CSport* lpChild = 0)
|
||||
{
|
||||
SetName(szName);
|
||||
SetMaxHR(dwMaxHR);
|
||||
SetHR(lpHR);
|
||||
SetPace(bPace);
|
||||
SetChild(lpChild);
|
||||
};
|
||||
QString GetName() { return(m_szName); };
|
||||
uint32_t GetMaxHR() { return(m_dwMaxHR); };
|
||||
CHR* GetHR() { return(m_lpHR); };
|
||||
bool GetPace() { return(m_bPace); };
|
||||
CSport* GetChild() { return(m_lpChild); };
|
||||
CSport* Find(const QString& szName)
|
||||
{
|
||||
if(m_szName == szName)
|
||||
return(this);
|
||||
if(m_lpChild)
|
||||
return(m_lpChild->Find(szName));
|
||||
return(0);
|
||||
};
|
||||
bool HasName() { if(m_szName.length()) return(true); return(false); };
|
||||
protected:
|
||||
QString m_szName;
|
||||
uint32_t m_dwMaxHR;
|
||||
CHR* m_lpHR;
|
||||
bool m_bPace;
|
||||
CSport* m_lpChild;
|
||||
};
|
||||
|
||||
class CTrainingTask
|
||||
{
|
||||
public:
|
||||
CTrainingTask(int iNum, const QString& szDesc = "", uint32_t dwCount = 0, uint32_t dwTime = 0, uint32_t dwDist = 0, const QString& szHR = "", uint32_t dwPace = 0, uint32_t dwPauseTime = 0, uint32_t dwPauseDist = 0, const QString& szPauseHR = "", uint32_t dwPausePace = 0, CTrainingTask* lpChild = 0)
|
||||
{
|
||||
m_szDesc = "";
|
||||
m_szHR = "";
|
||||
m_szPauseHR = "";
|
||||
m_lpChild = 0;
|
||||
Set(iNum, szDesc, dwCount, dwTime, dwDist, szHR, dwPace, dwPauseTime, dwPauseDist, szPauseHR, dwPausePace, lpChild);
|
||||
};
|
||||
~CTrainingTask()
|
||||
{
|
||||
DELETE(m_lpChild);
|
||||
};
|
||||
CTrainingTask* Add(int iNum, const QString& szDesc = "", uint32_t dwCount = 0, uint32_t dwTime = 0, uint32_t dwDist = 0, const QString& szHR = "", uint32_t dwPace = 0, uint32_t dwPauseTime = 0, uint32_t dwPauseDist = 0, const QString& szPauseHR = "", uint32_t dwPausePace = 0, CTrainingTask* lpChild = 0)
|
||||
{
|
||||
if(!m_lpChild)
|
||||
m_lpChild = new CTrainingTask(iNum, szDesc, dwCount, dwTime, dwDist, szHR, dwPace, dwPauseTime, dwPauseDist, szPauseHR, dwPausePace, lpChild);
|
||||
else
|
||||
m_lpChild->Set(iNum, szDesc, dwCount, dwTime, dwDist, szHR, dwPace, dwPauseTime, dwPauseDist, szPauseHR, dwPausePace, lpChild);
|
||||
return(m_lpChild);
|
||||
};
|
||||
void SetNum(int iNum) { m_iNum = iNum; };
|
||||
void SetDesc(const QString& szDesc) { m_szDesc = szDesc; };
|
||||
void SetCount(uint32_t dwCount) { m_dwCount = dwCount; };
|
||||
void SetTime(uint32_t dwTime) { m_Time = CTime(HOURS(dwTime), MINUTES(dwTime), SECONDS(dwTime)); };
|
||||
void SetDist(uint32_t dwDist) { m_dwDist = dwDist; };
|
||||
void SetHR(const QString& szHR) { m_szHR = szHR; };
|
||||
void SetPace(uint32_t dwPace) { m_dwPace = dwPace; };
|
||||
void SetPauseTime(uint32_t dwPauseTime) { m_PauseTime = CTime(HOURS(dwPauseTime), MINUTES(dwPauseTime), SECONDS(dwPauseTime)); };
|
||||
void SetPauseDist(uint32_t dwPauseDist) { m_dwPauseDist = dwPauseDist; };
|
||||
void SetPauseHR(const QString& szPauseHR) { m_szPauseHR = szPauseHR; };
|
||||
void SetPausePace(uint32_t dwPausePace) { m_dwPausePace = dwPausePace; };
|
||||
void SetChild(CTrainingTask* lpChild) { m_lpChild = lpChild; };
|
||||
void Set(int iNum, const QString& szDesc = "", uint32_t dwCount = 0, uint32_t dwTime = 0, uint32_t dwDist = 0, const QString& szHR = "", uint32_t dwPace = 0, uint32_t dwPauseTime = 0, uint32_t dwPauseDist = 0, const QString& szPauseHR = "", uint32_t dwPausePace = 0, CTrainingTask* lpChild = 0)
|
||||
{
|
||||
SetNum(iNum);
|
||||
SetDesc(szDesc);
|
||||
SetCount(dwCount);
|
||||
SetTime(dwTime);
|
||||
SetDist(dwDist);
|
||||
SetHR(szHR);
|
||||
SetPace(dwPace);
|
||||
SetPauseTime(dwPauseTime);
|
||||
SetPauseDist(dwPauseDist);
|
||||
SetPauseHR(szPauseHR);
|
||||
SetPausePace(dwPausePace);
|
||||
SetChild(lpChild);
|
||||
};
|
||||
int GetNum() { return(m_iNum); };
|
||||
QString GetDesc() { return(m_szDesc); };
|
||||
uint32_t GetCount() { return(m_dwCount); };
|
||||
uint32_t GetTime() { return(m_Time.toDWORD()); };
|
||||
uint32_t GetDist() { return(m_dwDist); };
|
||||
QString GetHR() { return(m_szHR); };
|
||||
uint32_t GetPace() { return(m_dwPace); };
|
||||
uint32_t GetPauseTime() { return(m_PauseTime.toDWORD()); };
|
||||
uint32_t GetPauseDist() { return(m_dwPauseDist); };
|
||||
QString GetPauseHR() { return(m_szPauseHR); };
|
||||
uint32_t GetPausePace() { return(m_dwPausePace); };
|
||||
CTrainingTask* GetChild() { return(m_lpChild); };
|
||||
void CalcPace() { m_dwPace = m_Time.toDWORD()*1000/m_dwDist; };
|
||||
void CalcTime() { uint32_t dwTime = m_dwPace*m_dwDist/1000; m_Time = CTime(HOURS(dwTime), MINUTES(dwTime), SECONDS(dwTime)); };
|
||||
void CalcDist() { m_dwDist = m_Time.toDWORD()*1000/m_dwPace; };
|
||||
void CalcPausePace() { m_dwPausePace = m_PauseTime.toDWORD()*1000/m_dwPauseDist; };
|
||||
void CalcPauseTime() { uint32_t dwTime = m_dwPausePace*m_dwPauseDist/1000; m_PauseTime = CTime(HOURS(dwTime), MINUTES(dwTime), SECONDS(dwTime)); };
|
||||
void CalcPauseDist() { m_dwPauseDist = m_PauseTime.toDWORD()*1000/m_dwPausePace; };
|
||||
bool HasHR() { if(m_szHR.length()) return(true); return(false); };
|
||||
bool HasPauseHR() { if(m_szPauseHR.length()) return(true); return(false); };
|
||||
bool HasDesc() { if(m_szDesc.length()) return(true); return(false); };
|
||||
protected:
|
||||
int m_iNum;
|
||||
QString m_szDesc;
|
||||
uint32_t m_dwCount;
|
||||
CTime m_Time;
|
||||
uint32_t m_dwDist;
|
||||
QString m_szHR;
|
||||
uint32_t m_dwPace;
|
||||
CTime m_PauseTime;
|
||||
uint32_t m_dwPauseDist;
|
||||
QString m_szPauseHR;
|
||||
uint32_t m_dwPausePace;
|
||||
CTrainingTask* m_lpChild;
|
||||
};
|
||||
|
||||
class CTrainingSession
|
||||
{
|
||||
public:
|
||||
CTrainingSession(int iNum, const QString& szDesc = "", const QString& szSport = "", CTrainingTask* lpTrainingTask = 0, CTrainingSession* lpChild = 0)
|
||||
{
|
||||
m_szDesc = "";
|
||||
m_szSport = "";
|
||||
m_lpTrainingTask = 0;
|
||||
m_lpChild = 0;
|
||||
Set(iNum, szDesc, szSport, lpTrainingTask, lpChild);
|
||||
};
|
||||
~CTrainingSession()
|
||||
{
|
||||
DELETE(m_lpTrainingTask);
|
||||
DELETE(m_lpChild);
|
||||
};
|
||||
CTrainingSession* Add(int iNum, const QString& szDesc = "", const QString& szSport = "", CTrainingTask* lpTrainingTask = 0, CTrainingSession* lpChild = 0)
|
||||
{
|
||||
if(!m_lpChild)
|
||||
m_lpChild = new CTrainingSession(iNum, szDesc, szSport, lpTrainingTask, lpChild);
|
||||
else
|
||||
m_lpChild->Set(iNum, szDesc, szSport, lpTrainingTask, lpChild);
|
||||
return(m_lpChild);
|
||||
};
|
||||
CTrainingTask* AddTask(int iNum, const QString& szDesc = "", uint32_t dwCount = 0, uint32_t dwTime = 0, uint32_t dwDist = 0, const QString& szHR = "", uint32_t dwPace = 0, uint32_t dwPauseTime = 0, uint32_t dwPauseDist = 0, const QString& szPauseHR = "", uint32_t dwPausePace = 0, CTrainingTask* lpChild = 0)
|
||||
{
|
||||
CTrainingTask* lpTrainingTaskDummy = m_lpTrainingTask;
|
||||
if(!m_lpTrainingTask)
|
||||
m_lpTrainingTask = lpTrainingTaskDummy = new CTrainingTask(iNum, szDesc, dwCount, dwTime, dwDist, szHR, dwPace, dwPauseTime, dwPauseDist, szPauseHR, dwPausePace, lpChild);
|
||||
else
|
||||
{
|
||||
while(lpTrainingTaskDummy->GetChild())
|
||||
lpTrainingTaskDummy = lpTrainingTaskDummy->GetChild();
|
||||
lpTrainingTaskDummy = lpTrainingTaskDummy->Add(iNum, szDesc, dwCount, dwTime, dwDist, szHR, dwPace, dwPauseTime, dwPauseDist, szPauseHR, dwPausePace, lpChild);
|
||||
}
|
||||
return(lpTrainingTaskDummy);
|
||||
};
|
||||
void SetNum(int iNum) { m_iNum = iNum; };
|
||||
void SetDesc(const QString& szDesc) { m_szDesc = szDesc; };
|
||||
void SetSport(const QString& szSport) { m_szSport = szSport; };
|
||||
void SetTrainingTask(CTrainingTask* lpTrainingTask) { m_lpTrainingTask = lpTrainingTask; };
|
||||
void SetChild(CTrainingSession* lpChild) { m_lpChild = lpChild; };
|
||||
void Set(int iNum, const QString& szDesc, const QString& szSport, CTrainingTask* lpTrainingTask = 0, CTrainingSession* lpChild = 0)
|
||||
{
|
||||
SetNum(iNum);
|
||||
SetDesc(szDesc);
|
||||
SetSport(szSport);
|
||||
SetTrainingTask(lpTrainingTask);
|
||||
SetChild(lpChild);
|
||||
};
|
||||
int GetNum() { return(m_iNum); };
|
||||
QString GetDesc() { return(m_szDesc); };
|
||||
QString GetSport() { return(m_szSport); };
|
||||
CTrainingTask* GetTrainingTask() { return(m_lpTrainingTask); };
|
||||
CTrainingSession* GetChild() { return(m_lpChild); };
|
||||
bool HasSport() { if(m_szSport.length()) return(true); return(false); };
|
||||
bool HasDesc() { if(m_szDesc.length()) return(true); return(false); };
|
||||
CTrainingSession* Find(int iSession)
|
||||
{
|
||||
if(m_iNum == iSession)
|
||||
return(this);
|
||||
if(m_lpChild)
|
||||
return(m_lpChild->Find(iSession));
|
||||
return(0);
|
||||
};
|
||||
protected:
|
||||
int m_iNum;
|
||||
QString m_szDesc;
|
||||
QString m_szSport;
|
||||
CTrainingTask* m_lpTrainingTask;
|
||||
CTrainingSession* m_lpChild;
|
||||
};
|
||||
|
||||
class CTrainingDay
|
||||
{
|
||||
public:
|
||||
CTrainingDay(int iNum, const QString& szDesc, CTrainingSession* lpTrainingSession = 0, CTrainingDay* lpChild = 0)
|
||||
{
|
||||
m_szDesc = "";
|
||||
m_lpTrainingSession = 0;
|
||||
m_lpChild = 0;
|
||||
Set(iNum, szDesc, lpTrainingSession, lpChild);
|
||||
};
|
||||
~CTrainingDay()
|
||||
{
|
||||
DELETE(m_lpTrainingSession);
|
||||
DELETE(m_lpChild);
|
||||
};
|
||||
CTrainingDay* Add(int iNum, const QString& szDesc = "", CTrainingSession* lpTrainingSession = 0, CTrainingDay* lpChild = 0)
|
||||
{
|
||||
if(!m_lpChild)
|
||||
m_lpChild = new CTrainingDay(iNum, szDesc, lpTrainingSession, lpChild);
|
||||
else
|
||||
m_lpChild->Set(iNum, szDesc, lpTrainingSession, lpChild);
|
||||
return(m_lpChild);
|
||||
};
|
||||
CTrainingSession* AddTrainingSession(int iNum, const QString& szDesc = "", const QString& szSport = "", CTrainingTask* lpTrainingTask = 0, CTrainingSession* lpChild = 0)
|
||||
{
|
||||
CTrainingSession* lpTrainingSessionDummy = m_lpTrainingSession;
|
||||
if(!m_lpTrainingSession)
|
||||
m_lpTrainingSession = lpTrainingSessionDummy = new CTrainingSession(iNum, szDesc, szSport, lpTrainingTask, lpChild);
|
||||
else
|
||||
{
|
||||
while(lpTrainingSessionDummy->GetChild())
|
||||
lpTrainingSessionDummy = lpTrainingSessionDummy->GetChild();
|
||||
lpTrainingSessionDummy = lpTrainingSessionDummy->Add(iNum, szDesc, szSport, lpTrainingTask, lpChild);
|
||||
}
|
||||
return(lpTrainingSessionDummy);
|
||||
};
|
||||
CTrainingSession* AddTrainingSession(CTrainingSession* lpTrainingSession)
|
||||
{
|
||||
CTrainingSession* lpTrainingSessionDummy = m_lpTrainingSession;
|
||||
if(!m_lpTrainingSession)
|
||||
m_lpTrainingSession = lpTrainingSessionDummy = lpTrainingSession;
|
||||
else
|
||||
{
|
||||
int iNum = 0;
|
||||
while(lpTrainingSessionDummy->GetChild())
|
||||
{
|
||||
iNum++;
|
||||
lpTrainingSessionDummy->SetNum(iNum);
|
||||
lpTrainingSessionDummy = lpTrainingSessionDummy->GetChild();
|
||||
}
|
||||
lpTrainingSessionDummy->SetChild(lpTrainingSession);
|
||||
if(!iNum)
|
||||
iNum = 1;
|
||||
while(lpTrainingSessionDummy->GetChild())
|
||||
{
|
||||
iNum++;
|
||||
lpTrainingSessionDummy->SetNum(iNum);
|
||||
lpTrainingSessionDummy = lpTrainingSessionDummy->GetChild();
|
||||
}
|
||||
}
|
||||
return(lpTrainingSession);
|
||||
};
|
||||
void DeleteTrainingSession(CTrainingSession* lpTrainingSession)
|
||||
{
|
||||
CTrainingSession* lpTemp;
|
||||
CTrainingSession* lpNext = lpTrainingSession->GetChild();
|
||||
if(m_lpTrainingSession == lpTrainingSession)
|
||||
{
|
||||
m_lpTrainingSession = lpNext;
|
||||
}
|
||||
else
|
||||
{
|
||||
lpTemp = m_lpTrainingSession;
|
||||
while(lpTemp->GetChild())
|
||||
{
|
||||
if(lpTemp->GetChild() == lpTrainingSession)
|
||||
{
|
||||
lpTemp->SetChild(lpNext);
|
||||
break;
|
||||
}
|
||||
lpTemp = lpTemp->GetChild();
|
||||
}
|
||||
}
|
||||
};
|
||||
void SetNum(int iNum) { m_iNum = iNum; };
|
||||
void SetDesc(const QString& szDesc) { m_szDesc = szDesc; };
|
||||
void SetTrainingSession(CTrainingSession* lpTrainingSession) { m_lpTrainingSession = lpTrainingSession; };
|
||||
void SetChild(CTrainingDay* lpChild) { m_lpChild = lpChild; };
|
||||
void Set(int iNum, const QString& szDesc, CTrainingSession* lpTrainingSession = 0, CTrainingDay* lpChild = 0)
|
||||
{
|
||||
SetNum(iNum);
|
||||
SetDesc(szDesc);
|
||||
SetTrainingSession(lpTrainingSession);
|
||||
SetChild(lpChild);
|
||||
};
|
||||
int GetNum() { return(m_iNum); };
|
||||
QString GetDesc() { return(m_szDesc); };
|
||||
CTrainingSession* GetTrainingSession() { return(m_lpTrainingSession); };
|
||||
CTrainingDay* GetChild() { return(m_lpChild); };
|
||||
bool HasDesc() { if(m_szDesc.length()) return(true); return(false); };
|
||||
CTrainingDay* Find(int iDay)
|
||||
{
|
||||
if(m_iNum == iDay)
|
||||
return(this);
|
||||
if(m_lpChild)
|
||||
return(m_lpChild->Find(iDay));
|
||||
return(0);
|
||||
};
|
||||
protected:
|
||||
int m_iNum;
|
||||
QString m_szDesc;
|
||||
CTrainingSession* m_lpTrainingSession;
|
||||
CTrainingDay* m_lpChild;
|
||||
};
|
||||
|
||||
class CTrainingPlan
|
||||
{
|
||||
public:
|
||||
CTrainingPlan(const QString& szName, const QString& szDesc = "", CTrainingDay* lpTrainingDay = 0, CTrainingPlan* lpChild = 0)
|
||||
{
|
||||
m_szName = szName;
|
||||
m_szDesc = szDesc;
|
||||
m_lpTrainingDay = lpTrainingDay;
|
||||
m_lpChild = lpChild;
|
||||
|
||||
m_TrainingStart = QDate::currentDate();
|
||||
};
|
||||
~CTrainingPlan()
|
||||
{
|
||||
DELETE(m_lpTrainingDay);
|
||||
DELETE(m_lpChild);
|
||||
};
|
||||
CTrainingDay* AddDay(int iNum, const QString& szDesc = "", CTrainingSession* lpTrainingSession = 0, CTrainingDay* lpChild = 0)
|
||||
{
|
||||
CTrainingDay* lpTrainingDayDummy = m_lpTrainingDay;
|
||||
if(!m_lpTrainingDay)
|
||||
m_lpTrainingDay = lpTrainingDayDummy = new CTrainingDay(iNum, szDesc, lpTrainingSession, lpChild);
|
||||
else
|
||||
{
|
||||
while(lpTrainingDayDummy->GetChild())
|
||||
lpTrainingDayDummy = lpTrainingDayDummy->GetChild();
|
||||
lpTrainingDayDummy = lpTrainingDayDummy->Add(iNum, szDesc, lpTrainingSession, lpChild);
|
||||
}
|
||||
return(lpTrainingDayDummy);
|
||||
};
|
||||
void SetName(const QString& szName) { m_szName = szName; };
|
||||
void SetDesc(const QString& szDesc) { m_szDesc = szDesc; };
|
||||
void SetTrainingDay(CTrainingDay* lpTrainingDay) { m_lpTrainingDay = lpTrainingDay; };
|
||||
void SetChild(CTrainingPlan* lpChild) { m_lpChild = lpChild; };
|
||||
void SetTrainingStart(const QDate& TrainingStart) { m_TrainingStart = TrainingStart; };
|
||||
void Set(const QString& szName, const QString& szDesc = "", CTrainingDay* lpTrainingDay = 0, CTrainingPlan* lpChild = 0)
|
||||
{
|
||||
SetName(szName);
|
||||
SetDesc(szDesc);
|
||||
SetTrainingDay(lpTrainingDay);
|
||||
SetChild(lpChild);
|
||||
};
|
||||
QString GetName() { return(m_szName); };
|
||||
QString GetDesc() { return(m_szDesc); };
|
||||
CTrainingDay* GetTrainingDay() { return(m_lpTrainingDay); };
|
||||
CTrainingPlan* GetChild() { return(m_lpChild); };
|
||||
QDate& GetTrainingStart() { return(m_TrainingStart); };
|
||||
bool HasName() { if(m_szName.length()) return(true); return(false); };
|
||||
bool HasDesc() { if(m_szDesc.length()) return(true); return(false); };
|
||||
void DeleteTrainingDay(int iDay)
|
||||
{
|
||||
CTrainingDay* lpNext;
|
||||
CTrainingDay* lpPrev = m_lpTrainingDay;
|
||||
if(lpPrev->GetNum() == iDay)
|
||||
{
|
||||
lpNext = lpPrev->GetChild();
|
||||
lpPrev->SetChild(0);
|
||||
delete lpPrev;
|
||||
m_lpTrainingDay = lpNext;
|
||||
}
|
||||
else
|
||||
{
|
||||
lpNext = lpPrev->GetChild();
|
||||
while(lpNext)
|
||||
{
|
||||
if(lpNext->GetNum() == iDay)
|
||||
{
|
||||
lpPrev->SetChild(lpNext->GetChild());
|
||||
lpNext->SetChild(0);
|
||||
delete lpNext;
|
||||
break;
|
||||
}
|
||||
lpPrev = lpNext;
|
||||
lpNext = lpNext->GetChild();
|
||||
}
|
||||
}
|
||||
};
|
||||
protected:
|
||||
QString m_szName;
|
||||
QString m_szDesc;
|
||||
CTrainingDay* m_lpTrainingDay;
|
||||
CTrainingPlan* m_lpChild;
|
||||
QDate m_TrainingStart;
|
||||
};
|
||||
|
||||
|
||||
class CTraining
|
||||
{
|
||||
public:
|
||||
CTraining();
|
||||
CTraining(const QString& szFileName);
|
||||
~CTraining();
|
||||
|
||||
bool Load(const QString& szFileName);
|
||||
bool Save(const QString& szFileName);
|
||||
void Recalculate();
|
||||
|
||||
void ParsePerson(const QDomElement& Element);
|
||||
CSport* ParseSport(const QDomElement& Element, CSport* lpSportDummy);
|
||||
CTrainingDay* ParseDay(const QDomElement& Element, CTrainingDay* lpTrainingDayDummy);
|
||||
CTrainingSession* ParseSession(const QDomElement& Element, CTrainingDay* lpTrainingDay, CTrainingSession* lpTrainingSessionDummy);
|
||||
CTrainingTask* ParseTask(const QDomElement& Element, CTrainingSession* lpTrainingSession, CTrainingTask* lpTrainingTaskDummy);
|
||||
|
||||
bool GetPerson(QString& szFirstName, QString& szLastName, QDate& DayOfBirth, uint32_t& dwHeight, uint32_t& dwWeight);
|
||||
|
||||
bool GetFirstSport(QString& szName, uint32_t& dwMaxHR, bool& bPace);
|
||||
bool GetNextSport(QString& szName, uint32_t& dwMaxHR, bool& bPace);
|
||||
|
||||
bool GetFirstHR(QString& szName, QString& szDesc, uint32_t& dwMin, uint32_t& dwMax);
|
||||
bool GetNextHR(QString& szName, QString& szDesc, uint32_t& dwMin, uint32_t& dwMax);
|
||||
|
||||
bool GetFirstTraining(QString& szName, QString& szDesc, QDate& TrainingStart);
|
||||
bool GetNextTraining(QString& szName, QString& szDesc, QDate& TrainingStart);
|
||||
|
||||
bool GetFirstDay(int& iNum, QString& szDesc);
|
||||
bool GetNextDay(int& iNum, QString& szDesc);
|
||||
|
||||
bool GetFirstSession(int& iNum, QString& szDesc, QString& szSport);
|
||||
bool GetNextSession(int& iNum, QString& szDesc, QString& szSport);
|
||||
|
||||
bool GetFirstTask(int& iNum, QString& szDesc, uint32_t& dwCount, uint32_t& dwTime, uint32_t& dwDist, QString& szHR, uint32_t& dwPace, uint32_t& dwPauseTime, uint32_t& dwPauseDist, QString& szPauseHR, uint32_t& dwPausePace);
|
||||
bool GetNextTask(int& iNum, QString& szDesc, uint32_t& dwCount, uint32_t& dwTime, uint32_t& dwDist, QString& szHR, uint32_t& dwPace, uint32_t& dwPauseTime, uint32_t& dwPauseDist, QString& szPauseHR, uint32_t& dwPausePace);
|
||||
|
||||
void SetTraining(QString szTraining, QDate TrainingStart);
|
||||
void SetPerson(QString szFirstName, QString szLastName, QDate DayOfBirth, uint32_t dwHeight, uint32_t dwWeight);
|
||||
void SetDay(int iDay, int iNewDay, QString szNewDesc);
|
||||
void SetSession(int iDay, int iNewDay, int iSession, QString szDesc, QString szSport);
|
||||
|
||||
void AddSport(QString szName, uint32_t dwMaxHR, bool bPace);
|
||||
void AddHR(QString szSport, QString szName, QString szDesc, uint32_t dwMin, uint32_t dwMax);
|
||||
void AddDay(int iDay, QString szDesc);
|
||||
void AddSession(int iDay, int iSession, QString szDesc, QString szSport);
|
||||
void AddTask(int iDay, int iSession, int iTask, QString szDesc, uint32_t dwCount, uint32_t dwTime, uint32_t dwDist, QString szHR, uint32_t dwPace, uint32_t dwPauseTime, uint32_t dwPauseDist, QString szPauseHR, uint32_t dwPausePace);
|
||||
protected:
|
||||
QString m_szFileName;
|
||||
CPerson* m_lpPerson;
|
||||
CSport* m_lpSport;
|
||||
CSport* m_lpCurSport;
|
||||
CHR* m_lpCurHR;
|
||||
CTrainingPlan* m_lpTrainingPlan;
|
||||
CTrainingPlan* m_lpCurTrainingPlan;
|
||||
CTrainingDay* m_lpCurTrainingDay;
|
||||
CTrainingSession* m_lpCurTrainingSession;
|
||||
CTrainingTask* m_lpCurTrainingTask;
|
||||
|
||||
void Clean();
|
||||
void CleanPerson();
|
||||
void CleanSport();
|
||||
void CleanTrainingPlan();
|
||||
private:
|
||||
};
|
||||
|
||||
#endif // CTRAINING_H
|
||||
@@ -0,0 +1,20 @@
|
||||
#include <QApplication>
|
||||
#include <QTranslator>
|
||||
#include "mainwindow.h"
|
||||
#include "common.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
|
||||
QString locale = QLocale::system().name();
|
||||
|
||||
QTranslator translator;
|
||||
translator.load(QString("qtTrainingPlan_") + locale);
|
||||
//translator.load(QString("qtTrainingPlan_de"));
|
||||
a.installTranslator(&translator);
|
||||
|
||||
MainWindow w;
|
||||
w.show();
|
||||
return a.exec();
|
||||
}
|
||||
+2059
File diff suppressed because it is too large
Load Diff
+150
@@ -0,0 +1,150 @@
|
||||
#ifndef MAINWINDOW_H
|
||||
#define MAINWINDOW_H
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QDate>
|
||||
#include <QWebView>
|
||||
#include <QTreeWidget>
|
||||
#include <QFileDialog>
|
||||
#include <QDir>
|
||||
#include <QCloseEvent>
|
||||
#include <QPrinter>
|
||||
#include <stdint.h>
|
||||
#include "cclientdata.h"
|
||||
#include "ctraining.h"
|
||||
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class MainWindow;
|
||||
}
|
||||
|
||||
class MainWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
protected:
|
||||
bool m_bDateChanging;
|
||||
|
||||
QTreeWidgetItem* m_lpPlanRoot;
|
||||
QString m_szFileName;
|
||||
bool m_bHasChanged;
|
||||
|
||||
QStatusBar* m_lpStatusBar;
|
||||
|
||||
bool GetTaskData(QTreeWidgetItem* lpItem, QString& szDesc, uint32_t& dwTaskCount, uint32_t& dwTaskTime, uint32_t& dwTaskDist, QString& szTaskHR, uint32_t& dwTaskPace, uint32_t& dwTaskPauseTime, uint32_t& dwTaskPauseDist, QString& szTaskPauseHR, uint32_t& dwTaskPausePace);
|
||||
void SetTaskData(QTreeWidgetItem* lpItem, const QString& szDesc, uint32_t dwCount, uint32_t dwTime, uint32_t dwDist, const QString& szHR, uint32_t dwPace, uint32_t dwPauseTime, uint32_t dwPauseDist, const QString& szPauseHR, uint32_t dwPausePace, const QString& szSport);
|
||||
|
||||
int GetIndent(QTreeWidgetItem* lpItem);
|
||||
|
||||
void CalculateDay(QTreeWidgetItem* lpDay);
|
||||
void CalculateSession(QTreeWidgetItem* lpSession);
|
||||
|
||||
QTreeWidgetItem* SetChildText(QTreeWidgetItem* lpItem, int iCol, const QString& szText, Qt::AlignmentFlag iAlign);
|
||||
QTreeWidgetItem* AddChild(QTreeWidget* lpRoot, const QString& szText, CClientData* lpClientData, Qt::AlignmentFlag iAlign, const QColor& Color, const QColor& BGColor);
|
||||
QTreeWidgetItem* AddChild(QTreeWidgetItem* lpRoot, const QString& szText, CClientData* lpClientData, Qt::AlignmentFlag iAlign, const QColor& Color, const QColor& BGColor, int iPos = -1);
|
||||
|
||||
QTreeWidgetItem* AddTask(int iTraining, int iDay, int iSession, int iTask, const QString& szDesc, const QString& szSport, uint32_t dwCount, uint32_t dwTime, uint32_t dwDist, const QString& szHR, uint32_t dwPace, uint32_t dwPauseTime, uint32_t dwPauseDist, const QString& szPauseHR, uint32_t dwPausePace);
|
||||
QTreeWidgetItem* AddTask(QTreeWidgetItem* lpRoot, int iTask, const QString& szDesc, const QString& szSport, uint32_t dwCount, uint32_t dwTime, uint32_t dwDist, const QString& szHR, uint32_t dwPace, uint32_t dwPauseTime, uint32_t dwPauseDist, const QString& szPauseHR, uint32_t dwPausePace);
|
||||
|
||||
QTreeWidgetItem* FindSession(int iTraining, int iDay, int iSession);
|
||||
QTreeWidgetItem* FindSession(const QString& szTraining, const QString& szDay, const QString& szSession);
|
||||
QTreeWidgetItem* AddSession(int iTraining, int iDay, int iSession, const QString& szDesc, const QString& szSport);
|
||||
QTreeWidgetItem* AddSession(QTreeWidgetItem* lpRoot, int iSession, const QString& szDesc, const QString& szSport);
|
||||
|
||||
QTreeWidgetItem* FindDay(int iTraining, int iDay);
|
||||
QTreeWidgetItem* FindDay(const QString& szTraining, const QString& szDay);
|
||||
QTreeWidgetItem* AddDay(int iTraining, int iDay, const QString& szDesc);
|
||||
QTreeWidgetItem* AddDay(QTreeWidgetItem* lpRoot, int iDay, const QString& szDesc, int iPos = -1);
|
||||
|
||||
QTreeWidgetItem* FindTraining(int iTraining);
|
||||
QTreeWidgetItem* FindTraining(const QString& szTraining);
|
||||
bool AddTraining(int iTraining, const QString& szName);
|
||||
|
||||
QTreeWidgetItem* AddHR(QTreeWidgetItem* lpRoot, const QString& szName, const QString& szDesc, uint32_t dwMaxHR, uint32_t dwMin, uint32_t dwMax);
|
||||
|
||||
QTreeWidgetItem* AddSport(const QString& szSport, uint32_t dwMaxHR, bool bPace);
|
||||
|
||||
bool LoadPlan(const QString& szFile, bool bPerson = true, bool bSport = true, bool bPlan = true);
|
||||
bool SavePlan(const QString& szFile);
|
||||
bool LoadPerson(CTraining* lpTraining);
|
||||
bool LoadSport(CTraining* lpTraining);
|
||||
bool LoadPlan(CTraining* lpTraining);
|
||||
void Clear();
|
||||
void InitSportView();
|
||||
void InitPlanView();
|
||||
void InitCalendarView();
|
||||
void closeEvent(QCloseEvent *event);
|
||||
bool MayClose();
|
||||
|
||||
CClientData* GetClientData(QTreeWidgetItem* lpItem);
|
||||
|
||||
QTreeWidgetItem* FindSport(const QString& szSport);
|
||||
QTreeWidgetItem* FindHR(const QString& szSport, const QString& szHR);
|
||||
|
||||
QString FormatHR(const QString& szSport, const QString& szHR);
|
||||
QString FormatPace(const QString& szSport, uint32_t dwPace);
|
||||
|
||||
bool EditPlan(QTreeWidgetItem* lpItem, bool bRightClick = false);
|
||||
bool EditSport(QTreeWidgetItem* lpItem, bool bRightClick = false);
|
||||
bool EditHR(QTreeWidgetItem* lpItem, bool bRightClick);
|
||||
|
||||
uint32_t GetMaxDays();
|
||||
|
||||
void Changed(bool bChanged);
|
||||
void HasChanged();
|
||||
void DrawCalendar();
|
||||
|
||||
public:
|
||||
MainWindow(QWidget *parent = 0);
|
||||
~MainWindow();
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
|
||||
private slots:
|
||||
void on_m_lpSportView_customContextMenuRequested(QPoint pos);
|
||||
void on_action_PDF_triggered();
|
||||
void on_action_Print_triggered();
|
||||
void on_m_lpCalendar_linkClicked(QUrl url);
|
||||
void on_m_lpTargetDate_dateChanged(QDate date);
|
||||
void on_m_lpTrainingStart_dateChanged(QDate date);
|
||||
void on_m_lpPlanView_itemDoubleClicked(QTreeWidgetItem* item, int column);
|
||||
void on_m_lpPlanView_customContextMenuRequested(QPoint pos);
|
||||
void on_m_lpWeight_valueChanged(int );
|
||||
void on_m_lpHeight_valueChanged(int );
|
||||
void on_m_lpDayOfBirth_dateChanged(QDate date);
|
||||
void on_m_lpLastName_textChanged(QString );
|
||||
void on_m_lpFirstName_textChanged(QString );
|
||||
void on_actionE_xit_triggered();
|
||||
void on_actionSave_as_triggered();
|
||||
void on_action_Save_triggered();
|
||||
void on_action_Open_triggered();
|
||||
void on_actionNew_from_triggered();
|
||||
void on_action_New_triggered();
|
||||
|
||||
void EditPlan(bool);
|
||||
|
||||
void AddSport(bool);
|
||||
void EditSport(bool);
|
||||
void DeleteSport(bool);
|
||||
|
||||
void AddHR(bool);
|
||||
void EditHR(bool);
|
||||
void DeleteHR(bool);
|
||||
|
||||
void AddTraining(bool);
|
||||
|
||||
void AddDay(bool);
|
||||
void AddSession(bool);
|
||||
void AddTask(bool);
|
||||
|
||||
void DeleteTraining(bool);
|
||||
void DeleteDay(bool);
|
||||
void DeleteSession(bool);
|
||||
void DeleteTask(bool);
|
||||
|
||||
void MoveUp(bool);
|
||||
void MoveDown(bool);
|
||||
};
|
||||
|
||||
#endif // MAINWINDOW_H
|
||||
+493
@@ -0,0 +1,493 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MainWindow</class>
|
||||
<widget class="QMainWindow" name="MainWindow">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>944</width>
|
||||
<height>674</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>qtTrainingPlan</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralWidget">
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>200</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Person</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Firstname:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="m_lpFirstName">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Lastname:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="m_lpLastName">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Day of Birth:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDateEdit" name="m_lpDayOfBirth">
|
||||
<property name="calendarPopup">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Height:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="m_lpHeight">
|
||||
<property name="maximum">
|
||||
<number>250</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Weight:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="m_lpWeight">
|
||||
<property name="maximum">
|
||||
<number>250</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>200</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Sport</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
<widget class="QTreeWidget" name="m_lpSportView">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::CustomContextMenu</enum>
|
||||
</property>
|
||||
<property name="alternatingRowColors">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="columnCount">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string notr="true">1</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string notr="true">2</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string notr="true">3</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string notr="true">4</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string notr="true">5</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QTabWidget" name="m_lpMainTab">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="title">
|
||||
<string>Training Plan</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QTreeWidget" name="m_lpPlanView">
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::CustomContextMenu</enum>
|
||||
</property>
|
||||
<property name="locale">
|
||||
<locale language="English" country="UnitedStates"/>
|
||||
</property>
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked</set>
|
||||
</property>
|
||||
<property name="columnCount">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string notr="true">1</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string notr="true">2</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string notr="true">3</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string notr="true">4</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string notr="true">5</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string notr="true">6</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string notr="true">7</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string notr="true">8</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string notr="true">9</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string notr="true">10</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_2">
|
||||
<attribute name="title">
|
||||
<string>Calendar</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_5">
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Start Date:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDateEdit" name="m_lpTrainingStart">
|
||||
<property name="displayFormat">
|
||||
<string>dd.MM.yyyy</string>
|
||||
</property>
|
||||
<property name="calendarPopup">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>Target Date:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDateEdit" name="m_lpTargetDate">
|
||||
<property name="displayFormat">
|
||||
<string>dd.MM.yyyy</string>
|
||||
</property>
|
||||
<property name="calendarPopup">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QWebView" name="m_lpCalendar">
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::NoContextMenu</enum>
|
||||
</property>
|
||||
<property name="url">
|
||||
<url>
|
||||
<string>about:blank</string>
|
||||
</url>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menuBar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>944</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menu_File">
|
||||
<property name="title">
|
||||
<string>&File</string>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuExport">
|
||||
<property name="title">
|
||||
<string>&Export</string>
|
||||
</property>
|
||||
<addaction name="action_PDF"/>
|
||||
</widget>
|
||||
<addaction name="action_New"/>
|
||||
<addaction name="actionNew_from"/>
|
||||
<addaction name="action_Open"/>
|
||||
<addaction name="action_Save"/>
|
||||
<addaction name="actionSave_as"/>
|
||||
<addaction name="menuExport"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="action_Print"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionE_xit"/>
|
||||
</widget>
|
||||
<addaction name="menu_File"/>
|
||||
</widget>
|
||||
<widget class="QToolBar" name="mainToolBar">
|
||||
<attribute name="toolBarArea">
|
||||
<enum>TopToolBarArea</enum>
|
||||
</attribute>
|
||||
<attribute name="toolBarBreak">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusBar"/>
|
||||
<action name="action_New">
|
||||
<property name="text">
|
||||
<string>&New</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionNew_from">
|
||||
<property name="text">
|
||||
<string>New &from...</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_Open">
|
||||
<property name="text">
|
||||
<string>&Open</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+O</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_Save">
|
||||
<property name="text">
|
||||
<string>&Save</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+S</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSave_as">
|
||||
<property name="text">
|
||||
<string>Save &as...</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+Shift+S</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionE_xit">
|
||||
<property name="text">
|
||||
<string>E&xit</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+X</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_Print">
|
||||
<property name="text">
|
||||
<string>&Print...</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+P</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_PDF">
|
||||
<property name="text">
|
||||
<string>PDF...</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>QWebView</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>QtWebKit/QWebView</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -0,0 +1,49 @@
|
||||
# -------------------------------------------------
|
||||
# Project created by QtCreator 2009-11-19T07:36:49
|
||||
# -------------------------------------------------
|
||||
#QT += webkit \
|
||||
# xml
|
||||
|
||||
QT += core gui xml webkit
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport webkitwidgets
|
||||
|
||||
TARGET = qtTrainingPlan
|
||||
TEMPLATE = app
|
||||
SOURCES += main.cpp \
|
||||
mainwindow.cpp \
|
||||
ctraining.cpp \
|
||||
common.cpp \
|
||||
ctime.cpp \
|
||||
cclientdata.cpp \
|
||||
cedittraining.cpp \
|
||||
ceditday.cpp \
|
||||
ceditsession.cpp \
|
||||
cedittask.cpp \
|
||||
cedittasks.cpp \
|
||||
cexportpdf.cpp \
|
||||
ceditsport.cpp \
|
||||
cedithr.cpp
|
||||
HEADERS += mainwindow.h \
|
||||
ctraining.h \
|
||||
common.h \
|
||||
ctime.h \
|
||||
cclientdata.h \
|
||||
cedittraining.h \
|
||||
ceditday.h \
|
||||
ceditsession.h \
|
||||
cedittask.h \
|
||||
cedittasks.h \
|
||||
cexportpdf.h \
|
||||
ceditsport.h \
|
||||
cedithr.h
|
||||
FORMS += mainwindow.ui \
|
||||
cedittraining.ui \
|
||||
ceditday.ui \
|
||||
ceditsession.ui \
|
||||
cedittask.ui \
|
||||
cedittasks.ui \
|
||||
cexportpdf.ui \
|
||||
ceditsport.ui \
|
||||
cedithr.ui
|
||||
TRANSLATIONS = qtTrainingPlan_de_AT.ts \
|
||||
qtTrainingPlan_de_DE.ts
|
||||
@@ -0,0 +1,7 @@
|
||||
<!DOCTYPE QPH>
|
||||
<QPH sourcelanguage="en" language="de">
|
||||
<phrase>
|
||||
<source>File</source>
|
||||
<target>Datei</target>
|
||||
</phrase>
|
||||
</QPH>
|
||||
Binary file not shown.
@@ -0,0 +1,568 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.0" language="de_AT" sourcelanguage="en">
|
||||
<context>
|
||||
<name></name>
|
||||
<message>
|
||||
<source>qtTrainingPlan</source>
|
||||
<translation>qtTrainingPlan</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>new</source>
|
||||
<translation>neu</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CEditDay</name>
|
||||
<message>
|
||||
<source>Dialog</source>
|
||||
<translation>Dialog</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Day:</source>
|
||||
<translation>Tag:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Description:</source>
|
||||
<translation>Beschreibung:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Description is empty!</source>
|
||||
<translation>Beschreibung ist leer!</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CEditSession</name>
|
||||
<message>
|
||||
<source>Dialog</source>
|
||||
<translation>Dialog</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Description:</source>
|
||||
<translation>Beschreibung:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Day:</source>
|
||||
<translation>Tag:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sport:</source>
|
||||
<translation>Sport:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Description is empty!</source>
|
||||
<translation>Beschreibung ist leer!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No day selected!</source>
|
||||
<translation>Kein Tag ausgewählt!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No sport selected!</source>
|
||||
<translation>Kein Sport ausgewählt!</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CEditTask</name>
|
||||
<message>
|
||||
<source>Dialog</source>
|
||||
<translation>Dialog</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Description:</source>
|
||||
<translation>Beschreibung:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Count:</source>
|
||||
<translation>Anzahl:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Tot. Time:</source>
|
||||
<translation>Gesamtzeit:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>hh:mm:ss</source>
|
||||
<translation>hh:mm:ss</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Tot. Dist.:</source>
|
||||
<translation>Gesamtdist.:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Basic</source>
|
||||
<translation>Basis</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Time:</source>
|
||||
<translation>Zeit:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Distance:</source>
|
||||
<translation>Distanz:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>HR:</source>
|
||||
<translation>HR:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Pace:</source>
|
||||
<translation>Tempo:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>mm:ss</source>
|
||||
<translation>mm:ss</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Pause</source>
|
||||
<translation>Pause</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1</source>
|
||||
<translation>%1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Description is empty!</source>
|
||||
<translation>Beschreibung ist leer!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No heart rate selected!</source>
|
||||
<translation>Keine Herzfrequenz ausgewählt!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No pause heart rate selected!</source>
|
||||
<translation>Keine Herzfrequenz für die Pause ausgewählt!</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CEditTaskS</name>
|
||||
<message>
|
||||
<source>Dialog</source>
|
||||
<translation>Dialog</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Description:</source>
|
||||
<translation>Beschreibung:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Count:</source>
|
||||
<translation>Anzahl:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Tot. Time:</source>
|
||||
<translation>Gesamtzeit:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>hh:mm:ss</source>
|
||||
<translation>hh:mm:ss</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Tot. Dist.:</source>
|
||||
<translation>Gesamtdist.:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Basic</source>
|
||||
<translation>Basis</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Time:</source>
|
||||
<translation>Zeit:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Distance:</source>
|
||||
<translation>Distanz:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>HR:</source>
|
||||
<translation>HR:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Speed:</source>
|
||||
<translation>Geschw.:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Pause</source>
|
||||
<translation>Pause</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1</source>
|
||||
<translation>%1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Description is empty!</source>
|
||||
<translation>Beschreibung ist leer!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No heart rate selected!</source>
|
||||
<translation>Keine Herzfrequenz ausgewählt!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No pause heart rate selected!</source>
|
||||
<translation>Keine Herzfrequenz für die Pause ausgewählt!</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CEditTraining</name>
|
||||
<message>
|
||||
<source>Dialog</source>
|
||||
<translation>Dialog</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Training:</source>
|
||||
<translation>Training:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Name is empty!</source>
|
||||
<translation>Name ist leer!</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<source>MainWindow</source>
|
||||
<translation>Hauptfenster</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Person</source>
|
||||
<translation>Person</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Firstname:</source>
|
||||
<translation>Vorname:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Lastname:</source>
|
||||
<translation>Nachname:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Day of Birth:</source>
|
||||
<translation>Gerbutsdatum:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Height:</source>
|
||||
<translation>Grösse:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Weight:</source>
|
||||
<translation>Gewicht:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sport</source>
|
||||
<translation>Sport</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>1</source>
|
||||
<translation>1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>2</source>
|
||||
<translation>2</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>3</source>
|
||||
<translation>3</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>4</source>
|
||||
<translation>4</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>5</source>
|
||||
<translation>5</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Training Plan</source>
|
||||
<translation>Trainingsplan</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>6</source>
|
||||
<translation>6</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>7</source>
|
||||
<translation>7</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>8</source>
|
||||
<translation>8</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>9</source>
|
||||
<translation>9</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>10</source>
|
||||
<translation>10</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Calendar</source>
|
||||
<translation>Kalender</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Start Date:</source>
|
||||
<translation>Startdatum:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>dd.MM.yyyy</source>
|
||||
<translation>dd.MM.yyyy</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Target Date:</source>
|
||||
<translation>Zieldatum:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>about:blank</source>
|
||||
<translation>about:blank</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&File</source>
|
||||
<translation>&Datei</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&New</source>
|
||||
<translation>&Neu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>New &from...</source>
|
||||
<translation>Neu &von...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Open</source>
|
||||
<translation>Ö&ffnen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Ctrl+O</source>
|
||||
<translation>Ctrl+O</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Save</source>
|
||||
<translation>&Speichern</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Ctrl+S</source>
|
||||
<translation>Ctrl+S</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Save &as...</source>
|
||||
<translation>Speichern &unter...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Ctrl+Shift+S</source>
|
||||
<translation>Ctrl+Shift+S</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>E&xit</source>
|
||||
<translation>&Beenden</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Ctrl+X</source>
|
||||
<translation>Ctrl+X</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Open Training</source>
|
||||
<translation>Training laden</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Training Files (*.qtp);;XML Files (*.xml)</source>
|
||||
<translation>Trainingsdateien (*.qtp);;XML Dateien (*.xml)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Save Training</source>
|
||||
<translation>Training speichern</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Description</source>
|
||||
<translation>Beschreibung</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Count</source>
|
||||
<translation>Anzahl</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Time</source>
|
||||
<translation>Zeit</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Dist</source>
|
||||
<translation>Dist</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>HR</source>
|
||||
<translation>HR</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Pace/Speed</source>
|
||||
<translation>Tempo/Geschw.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>P.Time</source>
|
||||
<translation>P.Zeit</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>P.Dist</source>
|
||||
<translation>P.Dist</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>P.HR</source>
|
||||
<translation>P.HR</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>P.Pace/Speed</source>
|
||||
<translation>P.Tempo/Geschw.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>MaxHR</source>
|
||||
<translation>MaxHR</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Min-Max (%)</source>
|
||||
<translation>Min-Max (%)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Min-Max</source>
|
||||
<translation>Min-Max</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1</source>
|
||||
<translation type="obsolete">%1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1% - %2%</source>
|
||||
<translation type="obsolete">%1% - %2%</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1 - %2</source>
|
||||
<translation type="obsolete">%1 - %2</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>(%1) %2</source>
|
||||
<translation type="obsolete">(%1) %2</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1 (%2)</source>
|
||||
<translation type="obsolete">%1 (%2)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>test</source>
|
||||
<translation>test</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Add training...</source>
|
||||
<translation>Training hinzufügen...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Add day...</source>
|
||||
<translation>Tag hinzufügen...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Edit training...</source>
|
||||
<translation>Training bearbeiten...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Delete training...</source>
|
||||
<translation>Training löschen...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Edit day...</source>
|
||||
<translation>Tag bearbeiten...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Delete day...</source>
|
||||
<translation>Tag löschen...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Add session...</source>
|
||||
<translation>Session hinzufügen...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Edit session...</source>
|
||||
<translation>Session bearbeiten...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Delete session...</source>
|
||||
<translation>Session löschen...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Add task...</source>
|
||||
<translation>Task hinzufügen...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Move up</source>
|
||||
<translation>Auf</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Move down</source>
|
||||
<translation>Ab</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Edit task...</source>
|
||||
<translation>Task bearbeiten...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Delete task...</source>
|
||||
<translation>Task löschen...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Training has been changed. Dou you want to save?</source>
|
||||
<translation>Training wurde geändert. Speichern?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>yyyyMMdd</source>
|
||||
<translation>yyyyMMdd</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>MM:ss</source>
|
||||
<translation>MM:ss</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source> min/km</source>
|
||||
<translation> min/km</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1 km/h</source>
|
||||
<translation>%1 km/h</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Day allready exists!</source>
|
||||
<translation>Tag bereits vorhanden!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No training available!</source>
|
||||
<translation>Kein Training verfügbar!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Are you sure you want to delete this training?</source>
|
||||
<translation>Trining wirklich löschen?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Are you sure you want to delete this day?</source>
|
||||
<translation>Tag wirklich löschen?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Are you sure you want to delete this session?</source>
|
||||
<translation>Session wirklich löschen?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Are you sure you want to delete this task?</source>
|
||||
<translation>Task wirklich löschen?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No training to save!</source>
|
||||
<translation>Kein Training zum speichern!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Could not save training!</source>
|
||||
<translation>Kann Training nicht speichern!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>qtTrainingPlan - </source>
|
||||
<translation>qtTrainingPlan - </translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QMessageBox</name>
|
||||
<message>
|
||||
<source>qtTrainingPlan</source>
|
||||
<translation>qtTrainingPlan</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
Binary file not shown.
@@ -0,0 +1,568 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.0" language="de_AT" sourcelanguage="en">
|
||||
<context>
|
||||
<name></name>
|
||||
<message>
|
||||
<source>qtTrainingPlan</source>
|
||||
<translation>qtTrainingPlan</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>new</source>
|
||||
<translation>neu</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CEditDay</name>
|
||||
<message>
|
||||
<source>Dialog</source>
|
||||
<translation>Dialog</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Day:</source>
|
||||
<translation>Tag:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Description:</source>
|
||||
<translation>Beschreibung:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Description is empty!</source>
|
||||
<translation>Beschreibung ist leer!</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CEditSession</name>
|
||||
<message>
|
||||
<source>Dialog</source>
|
||||
<translation>Dialog</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Description:</source>
|
||||
<translation>Beschreibung:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Day:</source>
|
||||
<translation>Tag:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sport:</source>
|
||||
<translation>Sport:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Description is empty!</source>
|
||||
<translation>Beschreibung ist leer!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No day selected!</source>
|
||||
<translation>Kein Tag ausgewählt!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No sport selected!</source>
|
||||
<translation>Kein Sport ausgewählt!</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CEditTask</name>
|
||||
<message>
|
||||
<source>Dialog</source>
|
||||
<translation>Dialog</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Description:</source>
|
||||
<translation>Beschreibung:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Count:</source>
|
||||
<translation>Anzahl:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Tot. Time:</source>
|
||||
<translation>Gesamtzeit:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>hh:mm:ss</source>
|
||||
<translation>hh:mm:ss</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Tot. Dist.:</source>
|
||||
<translation>Gesamtdist.:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Basic</source>
|
||||
<translation>Basis</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Time:</source>
|
||||
<translation>Zeit:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Distance:</source>
|
||||
<translation>Distanz:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>HR:</source>
|
||||
<translation>HR:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Pace:</source>
|
||||
<translation>Tempo:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>mm:ss</source>
|
||||
<translation>mm:ss</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Pause</source>
|
||||
<translation>Pause</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1</source>
|
||||
<translation>%1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Description is empty!</source>
|
||||
<translation>Beschreibung ist leer!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No heart rate selected!</source>
|
||||
<translation>Keine Herzfrequenz ausgewählt!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No pause heart rate selected!</source>
|
||||
<translation>Keine Herzfrequenz für die Pause ausgewählt!</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CEditTaskS</name>
|
||||
<message>
|
||||
<source>Dialog</source>
|
||||
<translation>Dialog</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Description:</source>
|
||||
<translation>Beschreibung:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Count:</source>
|
||||
<translation>Anzahl:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Tot. Time:</source>
|
||||
<translation>Gesamtzeit:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>hh:mm:ss</source>
|
||||
<translation>hh:mm:ss</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Tot. Dist.:</source>
|
||||
<translation>Gesamtdist.:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Basic</source>
|
||||
<translation>Basis</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Time:</source>
|
||||
<translation>Zeit:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Distance:</source>
|
||||
<translation>Distanz:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>HR:</source>
|
||||
<translation>HR:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Speed:</source>
|
||||
<translation>Geschw.:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Pause</source>
|
||||
<translation>Pause</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1</source>
|
||||
<translation>%1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Description is empty!</source>
|
||||
<translation>Beschreibung ist leer!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No heart rate selected!</source>
|
||||
<translation>Keine Herzfrequenz ausgewählt!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No pause heart rate selected!</source>
|
||||
<translation>Keine Herzfrequenz für die Pause ausgewählt!</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CEditTraining</name>
|
||||
<message>
|
||||
<source>Dialog</source>
|
||||
<translation>Dialog</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Training:</source>
|
||||
<translation>Training:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Name is empty!</source>
|
||||
<translation>Name ist leer!</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<source>MainWindow</source>
|
||||
<translation>Hauptfenster</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Person</source>
|
||||
<translation>Person</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Firstname:</source>
|
||||
<translation>Vorname:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Lastname:</source>
|
||||
<translation>Nachname:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Day of Birth:</source>
|
||||
<translation>Gerbutsdatum:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Height:</source>
|
||||
<translation>Grösse:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Weight:</source>
|
||||
<translation>Gewicht:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sport</source>
|
||||
<translation>Sport</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>1</source>
|
||||
<translation>1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>2</source>
|
||||
<translation>2</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>3</source>
|
||||
<translation>3</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>4</source>
|
||||
<translation>4</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>5</source>
|
||||
<translation>5</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Training Plan</source>
|
||||
<translation>Trainingsplan</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>6</source>
|
||||
<translation>6</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>7</source>
|
||||
<translation>7</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>8</source>
|
||||
<translation>8</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>9</source>
|
||||
<translation>9</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>10</source>
|
||||
<translation>10</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Calendar</source>
|
||||
<translation>Kalender</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Start Date:</source>
|
||||
<translation>Startdatum:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>dd.MM.yyyy</source>
|
||||
<translation>dd.MM.yyyy</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Target Date:</source>
|
||||
<translation>Zieldatum:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>about:blank</source>
|
||||
<translation>about:blank</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&File</source>
|
||||
<translation>&Datei</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&New</source>
|
||||
<translation>&Neu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>New &from...</source>
|
||||
<translation>Neu &von...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Open</source>
|
||||
<translation>Ö&ffnen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Ctrl+O</source>
|
||||
<translation>Ctrl+O</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Save</source>
|
||||
<translation>&Speichern</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Ctrl+S</source>
|
||||
<translation>Ctrl+S</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Save &as...</source>
|
||||
<translation>Speichern &unter...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Ctrl+Shift+S</source>
|
||||
<translation>Ctrl+Shift+S</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>E&xit</source>
|
||||
<translation>&Beenden</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Ctrl+X</source>
|
||||
<translation>Ctrl+X</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Open Training</source>
|
||||
<translation>Training laden</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Training Files (*.qtp);;XML Files (*.xml)</source>
|
||||
<translation>Trainingsdateien (*.qtp);;XML Dateien (*.xml)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Save Training</source>
|
||||
<translation>Training speichern</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Description</source>
|
||||
<translation>Beschreibung</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Count</source>
|
||||
<translation>Anzahl</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Time</source>
|
||||
<translation>Zeit</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Dist</source>
|
||||
<translation>Dist</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>HR</source>
|
||||
<translation>HR</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Pace/Speed</source>
|
||||
<translation>Tempo/Geschw.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>P.Time</source>
|
||||
<translation>P.Zeit</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>P.Dist</source>
|
||||
<translation>P.Dist</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>P.HR</source>
|
||||
<translation>P.HR</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>P.Pace/Speed</source>
|
||||
<translation>P.Tempo/Geschw.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>MaxHR</source>
|
||||
<translation>MaxHR</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Min-Max (%)</source>
|
||||
<translation>Min-Max (%)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Min-Max</source>
|
||||
<translation>Min-Max</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1</source>
|
||||
<translation type="obsolete">%1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1% - %2%</source>
|
||||
<translation type="obsolete">%1% - %2%</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1 - %2</source>
|
||||
<translation type="obsolete">%1 - %2</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>(%1) %2</source>
|
||||
<translation type="obsolete">(%1) %2</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1 (%2)</source>
|
||||
<translation type="obsolete">%1 (%2)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>test</source>
|
||||
<translation>test</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Add training...</source>
|
||||
<translation>Training hinzufügen...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Add day...</source>
|
||||
<translation>Tag hinzufügen...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Edit training...</source>
|
||||
<translation>Training bearbeiten...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Delete training...</source>
|
||||
<translation>Training löschen...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Edit day...</source>
|
||||
<translation>Tag bearbeiten...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Delete day...</source>
|
||||
<translation>Tag löschen...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Add session...</source>
|
||||
<translation>Session hinzufügen...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Edit session...</source>
|
||||
<translation>Session bearbeiten...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Delete session...</source>
|
||||
<translation>Session löschen...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Add task...</source>
|
||||
<translation>Task hinzufügen...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Move up</source>
|
||||
<translation>Auf</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Move down</source>
|
||||
<translation>Ab</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Edit task...</source>
|
||||
<translation>Task bearbeiten...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Delete task...</source>
|
||||
<translation>Task löschen...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Training has been changed. Dou you want to save?</source>
|
||||
<translation>Training wurde geändert. Speichern?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>yyyyMMdd</source>
|
||||
<translation>yyyyMMdd</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>MM:ss</source>
|
||||
<translation>MM:ss</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source> min/km</source>
|
||||
<translation> min/km</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1 km/h</source>
|
||||
<translation>%1 km/h</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Day allready exists!</source>
|
||||
<translation>Tag bereits vorhanden!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No training available!</source>
|
||||
<translation>Kein Training verfügbar!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Are you sure you want to delete this training?</source>
|
||||
<translation>Trining wirklich löschen?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Are you sure you want to delete this day?</source>
|
||||
<translation>Tag wirklich löschen?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Are you sure you want to delete this session?</source>
|
||||
<translation>Session wirklich löschen?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Are you sure you want to delete this task?</source>
|
||||
<translation>Task wirklich löschen?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No training to save!</source>
|
||||
<translation>Kein Training zum speichern!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Could not save training!</source>
|
||||
<translation>Kann Training nicht speichern!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>qtTrainingPlan - </source>
|
||||
<translation>qtTrainingPlan - </translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QMessageBox</name>
|
||||
<message>
|
||||
<source>qtTrainingPlan</source>
|
||||
<translation>qtTrainingPlan</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
Reference in New Issue
Block a user