Ready to be packaged
authorHeli Hyvättinen <heli.hyvattinen@kymp.net>
Tue, 20 Jul 2010 03:12:14 +0000 (06:12 +0300)
committerHeli Hyvättinen <heli.hyvattinen@kymp.net>
Tue, 20 Jul 2010 03:12:14 +0000 (06:12 +0300)
21 files changed:
src/KitchenAlert.pro
src/KitchenAlert.pro.user [new file with mode: 0644]
src/KitchenAlert.pro.user.1.3 [new file with mode: 0644]
src/KitchenAlertTestSound1.wav [new file with mode: 0755]
src/Makefile [new file with mode: 0644]
src/Tonitrus.ogg [new file with mode: 0644]
src/Tonitrus.wav [new file with mode: 0644]
src/alertsound.cpp
src/alertsound.h
src/currentalertstablemodel.cpp
src/currentalertstablemodel.h
src/kitchenalert.qrc [new file with mode: 0644]
src/kitchenalertmainwindow.cpp
src/kitchenalertmainwindow.h
src/kitchenalertmainwindow.ui
src/licence template~ [new file with mode: 0644]
src/main.cpp
src/selectsounddialog.cpp [new file with mode: 0644]
src/selectsounddialog.h [new file with mode: 0644]
src/selectsounddialog.ui [new file with mode: 0644]
src/timer.cpp

index 60442ae..8691efe 100644 (file)
@@ -13,22 +13,23 @@ TEMPLATE = app
 
 SOURCES += main.cpp\
         kitchenalertmainwindow.cpp \
-    choosetimersequencedialog.cpp \
     createtimersequencedialog.cpp \
     timer.cpp \
     currentalertstablemodel.cpp \
-    alertsound.cpp
+    alertsound.cpp \
+    selectsounddialog.cpp
 
 HEADERS  += kitchenalertmainwindow.h \
-    choosetimersequencedialog.h \
     createtimersequencedialog.h \
     timer.h \
     currentalertstablemodel.h \
-    alertsound.h
+    alertsound.h \
+    selectsounddialog.h
 
 FORMS    += kitchenalertmainwindow.ui \
-    choosetimersequencedialog.ui \
-    createtimersequencedialog.ui
+    createtimersequencedialog.ui \
+    selectsounddialog.ui \
+    kitchenalertmainwindow.ui
 
 CONFIG += mobility
 MOBILITY =
@@ -42,4 +43,5 @@ symbian {
     TARGET.EPOCHEAPSIZE = 0x020000 0x800000
 }
 
-RESOURCES +=
+RESOURCES += \
+    kitchenalert.qrc
diff --git a/src/KitchenAlert.pro.user b/src/KitchenAlert.pro.user
new file mode 100644 (file)
index 0000000..028ee78
--- /dev/null
@@ -0,0 +1,309 @@
+<!DOCTYPE QtCreatorProject>
+<qtcreator>
+ <data>
+  <variable>ProjectExplorer.Project.ActiveTarget</variable>
+  <value type="int">1</value>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.EditorSettings</variable>
+  <valuemap type="QVariantMap">
+   <value key="EditorConfiguration.Codec" type="QByteArray">System</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.Target.0</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Desktop</value>
+   <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Target.DesktopTarget</value>
+   <value key="ProjectExplorer.Target.ActiveBuildConfiguration" type="int">1</value>
+   <value key="ProjectExplorer.Target.ActiveRunConfiguration" type="int">0</value>
+   <valuemap key="ProjectExplorer.Target.BuildConfiguration.0" type="QVariantMap">
+    <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.0" type="QVariantMap">
+     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
+     <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
+    </valuemap>
+    <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.1" type="QVariantMap">
+     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+     <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
+     <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
+     <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+    </valuemap>
+    <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">2</value>
+    <valuemap key="ProjectExplorer.BuildConfiguration.CleanStep.0" type="QVariantMap">
+     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+     <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
+     <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
+      <value type="QString">clean</value>
+     </valuelist>
+     <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+    </valuemap>
+    <value key="ProjectExplorer.BuildConfiguration.CleanStepsCount" type="int">1</value>
+    <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
+    <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+    <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Debug</value>
+    <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">2</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/holvi/heli/ohjelmointi/KitchenAlert-build-desktop</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">4</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">0</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
+   </valuemap>
+   <valuemap key="ProjectExplorer.Target.BuildConfiguration.1" type="QVariantMap">
+    <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.0" type="QVariantMap">
+     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
+     <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
+    </valuemap>
+    <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.1" type="QVariantMap">
+     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+     <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
+     <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
+     <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+    </valuemap>
+    <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">2</value>
+    <valuemap key="ProjectExplorer.BuildConfiguration.CleanStep.0" type="QVariantMap">
+     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+     <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
+     <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
+     <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+    </valuemap>
+    <value key="ProjectExplorer.BuildConfiguration.CleanStepsCount" type="int">1</value>
+    <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
+    <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+    <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Release</value>
+    <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">0</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/holvi/heli/ohjelmointi/KitchenAlert-build-desktop</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">4</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">0</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
+   </valuemap>
+   <value key="ProjectExplorer.Target.BuildConfigurationCount" type="int">2</value>
+   <valuemap key="ProjectExplorer.Target.RunConfiguration.0" type="QVariantMap">
+    <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">KitchenAlert</value>
+    <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4RunConfiguration</value>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.BaseEnvironmentBase" type="int">2</value>
+    <valuelist key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments" type="QVariantList"/>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.ProFile" type="QString">KitchenAlert.pro</value>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix" type="bool">false</value>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal" type="bool">false</value>
+    <valuelist key="Qt4ProjectManager.Qt4RunConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.UserSetName" type="bool">false</value>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.UserSetWorkingDirectory" type="bool">false</value>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory" type="QString"></value>
+   </valuemap>
+   <value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.Target.1</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Maemo</value>
+   <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Target.MaemoDeviceTarget</value>
+   <value key="ProjectExplorer.Target.ActiveBuildConfiguration" type="int">1</value>
+   <value key="ProjectExplorer.Target.ActiveRunConfiguration" type="int">0</value>
+   <valuemap key="ProjectExplorer.Target.BuildConfiguration.0" type="QVariantMap">
+    <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.0" type="QVariantMap">
+     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">qmake</value>
+     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
+     <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
+    </valuemap>
+    <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.1" type="QVariantMap">
+     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
+     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+     <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
+     <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
+     <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+    </valuemap>
+    <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.2" type="QVariantMap">
+     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MaemoPackageCreationStep</value>
+     <valuelist key="Qt4ProjectManager.BuildStep.MaemoPackage.LocalFiles" type="QVariantList"/>
+     <value key="Qt4ProjectManager.BuildStep.MaemoPackage.Modified" type="bool">false</value>
+     <value key="Qt4ProjectManager.BuildStep.MaemoPackage.RemoteExe" type="QString">/home/opt/kitchenalert/kitchenalert</value>
+     <valuelist key="Qt4ProjectManager.BuildStep.MaemoPackage.RemoteFiles" type="QVariantList"/>
+    </valuemap>
+    <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">3</value>
+    <valuemap key="ProjectExplorer.BuildConfiguration.CleanStep.0" type="QVariantMap">
+     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
+     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+     <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
+     <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
+      <value type="QString">clean</value>
+     </valuelist>
+     <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+    </valuemap>
+    <value key="ProjectExplorer.BuildConfiguration.CleanStepsCount" type="int">1</value>
+    <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
+    <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+    <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Debug</value>
+    <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">2</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/holvi/heli/ohjelmointi/KitchenAlert-build-maemo</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">3</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">9</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
+   </valuemap>
+   <valuemap key="ProjectExplorer.Target.BuildConfiguration.1" type="QVariantMap">
+    <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.0" type="QVariantMap">
+     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">qmake</value>
+     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
+     <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
+    </valuemap>
+    <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.1" type="QVariantMap">
+     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
+     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+     <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
+     <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
+     <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+    </valuemap>
+    <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.2" type="QVariantMap">
+     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MaemoPackageCreationStep</value>
+     <valuelist key="Qt4ProjectManager.BuildStep.MaemoPackage.LocalFiles" type="QVariantList"/>
+     <value key="Qt4ProjectManager.BuildStep.MaemoPackage.Modified" type="bool">false</value>
+     <value key="Qt4ProjectManager.BuildStep.MaemoPackage.RemoteExe" type="QString">/home/opt/kitchenalert/kitchenalert</value>
+     <valuelist key="Qt4ProjectManager.BuildStep.MaemoPackage.RemoteFiles" type="QVariantList"/>
+    </valuemap>
+    <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">3</value>
+    <valuemap key="ProjectExplorer.BuildConfiguration.CleanStep.0" type="QVariantMap">
+     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
+     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+     <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
+     <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
+      <value type="QString">clean</value>
+     </valuelist>
+     <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+    </valuemap>
+    <value key="ProjectExplorer.BuildConfiguration.CleanStepsCount" type="int">1</value>
+    <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
+    <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+    <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Release</value>
+    <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">0</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/holvi/heli/ohjelmointi/KitchenAlert-build-maemo</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">3</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">9</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
+   </valuemap>
+   <value key="ProjectExplorer.Target.BuildConfigurationCount" type="int">2</value>
+   <valuemap key="ProjectExplorer.Target.RunConfiguration.0" type="QVariantMap">
+    <value key=".ProFile" type="QString">KitchenAlert.pro</value>
+    <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">New Maemo Run Configuration</value>
+    <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MaemoRunConfiguration</value>
+    <valuelist key="Qt4ProjectManager.MaemoRunConfiguration.Arguments" type="QVariantList"/>
+    <valuemap key="Qt4ProjectManager.MaemoRunConfiguration.DebuggingHelpersLastDeployed" type="QVariantMap"/>
+    <value key="Qt4ProjectManager.MaemoRunConfiguration.DeviceId" type="qulonglong">17</value>
+    <valuemap key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployed" type="QVariantMap">
+     <value key="192.168.2.15" type="QDateTime">2010-07-19T23:08:40</value>
+    </valuemap>
+   </valuemap>
+   <value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.Target.2</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Qt Simulator</value>
+   <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Target.QtSimulatorTarget</value>
+   <value key="ProjectExplorer.Target.ActiveBuildConfiguration" type="int">1</value>
+   <value key="ProjectExplorer.Target.ActiveRunConfiguration" type="int">0</value>
+   <valuemap key="ProjectExplorer.Target.BuildConfiguration.0" type="QVariantMap">
+    <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.0" type="QVariantMap">
+     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">qmake</value>
+     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
+     <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
+    </valuemap>
+    <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.1" type="QVariantMap">
+     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
+     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+     <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
+     <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
+     <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+    </valuemap>
+    <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">2</value>
+    <valuemap key="ProjectExplorer.BuildConfiguration.CleanStep.0" type="QVariantMap">
+     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
+     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+     <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
+     <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
+      <value type="QString">clean</value>
+     </valuelist>
+     <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+    </valuemap>
+    <value key="ProjectExplorer.BuildConfiguration.CleanStepsCount" type="int">1</value>
+    <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
+    <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+    <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Debug</value>
+    <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">2</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/holvi/heli/ohjelmointi/KitchenAlert-build-simulator</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">2</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">0</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
+   </valuemap>
+   <valuemap key="ProjectExplorer.Target.BuildConfiguration.1" type="QVariantMap">
+    <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.0" type="QVariantMap">
+     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">qmake</value>
+     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
+     <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
+    </valuemap>
+    <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.1" type="QVariantMap">
+     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
+     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+     <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
+     <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
+     <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+    </valuemap>
+    <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">2</value>
+    <valuemap key="ProjectExplorer.BuildConfiguration.CleanStep.0" type="QVariantMap">
+     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
+     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+     <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
+     <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
+      <value type="QString">clean</value>
+     </valuelist>
+     <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+    </valuemap>
+    <value key="ProjectExplorer.BuildConfiguration.CleanStepsCount" type="int">1</value>
+    <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
+    <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+    <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Release</value>
+    <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">0</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/holvi/heli/ohjelmointi/KitchenAlert-build-simulator</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">2</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">0</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
+   </valuemap>
+   <value key="ProjectExplorer.Target.BuildConfigurationCount" type="int">2</value>
+   <valuemap key="ProjectExplorer.Target.RunConfiguration.0" type="QVariantMap">
+    <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">KitchenAlert</value>
+    <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4RunConfiguration</value>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.BaseEnvironmentBase" type="int">2</value>
+    <valuelist key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments" type="QVariantList"/>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.ProFile" type="QString">KitchenAlert.pro</value>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix" type="bool">false</value>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal" type="bool">false</value>
+    <valuelist key="Qt4ProjectManager.Qt4RunConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.UserSetName" type="bool">false</value>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.UserSetWorkingDirectory" type="bool">false</value>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory" type="QString"></value>
+   </valuemap>
+   <value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.TargetCount</variable>
+  <value type="int">3</value>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
+  <value type="int">4</value>
+ </data>
+</qtcreator>
diff --git a/src/KitchenAlert.pro.user.1.3 b/src/KitchenAlert.pro.user.1.3
new file mode 100644 (file)
index 0000000..8009944
--- /dev/null
@@ -0,0 +1,160 @@
+<!DOCTYPE QtCreatorProject>
+<qtcreator>
+ <data>
+  <variable>RunConfiguration0-BaseEnvironmentBase</variable>
+  <value type="int">2</value>
+ </data>
+ <data>
+  <variable>RunConfiguration0-CommandLineArguments</variable>
+  <valuelist type="QVariantList"/>
+ </data>
+ <data>
+  <variable>RunConfiguration0-ProFile</variable>
+  <value type="QString">KitchenAlert.pro</value>
+ </data>
+ <data>
+  <variable>RunConfiguration0-RunConfiguration.name</variable>
+  <value type="QString">KitchenAlert</value>
+ </data>
+ <data>
+  <variable>RunConfiguration0-UseDyldImageSuffix</variable>
+  <value type="bool">false</value>
+ </data>
+ <data>
+  <variable>RunConfiguration0-UseTerminal</variable>
+  <value type="bool">false</value>
+ </data>
+ <data>
+  <variable>RunConfiguration0-UserEnvironmentChanges</variable>
+  <valuelist type="QVariantList"/>
+ </data>
+ <data>
+  <variable>RunConfiguration0-UserSetName</variable>
+  <value type="bool">false</value>
+ </data>
+ <data>
+  <variable>RunConfiguration0-UserSetWorkingDirectory</variable>
+  <value type="bool">false</value>
+ </data>
+ <data>
+  <variable>RunConfiguration0-UserWorkingDirectory</variable>
+  <value type="QString"></value>
+ </data>
+ <data>
+  <variable>RunConfiguration0-type</variable>
+  <value type="QString">Qt4ProjectManager.Qt4RunConfiguration</value>
+ </data>
+ <data>
+  <variable>activeRunConfiguration</variable>
+  <value type="int">0</value>
+ </data>
+ <data>
+  <variable>activebuildconfiguration</variable>
+  <value type="QString">Debug</value>
+ </data>
+ <data>
+  <variable>buildConfiguration-Debug</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
+   <value key="QtVersionId" type="int">0</value>
+   <value key="ToolChain" type="int">0</value>
+   <value key="buildConfiguration" type="int">2</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>buildConfiguration-Release</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
+   <value key="QtVersionId" type="int">0</value>
+   <value key="buildConfiguration" type="int">0</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>buildconfiguration-Debug-buildstep0</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>buildconfiguration-Debug-buildstep1</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>buildconfiguration-Debug-cleanstep0</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
+   <value key="cleanConfig" type="bool">true</value>
+   <valuelist key="makeargs" type="QVariantList">
+    <value type="QString">clean</value>
+   </valuelist>
+  </valuemap>
+ </data>
+ <data>
+  <variable>buildconfiguration-Release-buildstep0</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>buildconfiguration-Release-buildstep1</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>buildconfiguration-Release-cleanstep0</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>buildconfigurations</variable>
+  <valuelist type="QVariantList">
+   <value type="QString">Debug</value>
+   <value type="QString">Release</value>
+  </valuelist>
+ </data>
+ <data>
+  <variable>buildstep0</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value>
+   <value key="mkspec" type="QString"></value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>buildstep1</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>buildsteps</variable>
+  <valuelist type="QVariantList">
+   <value type="QString">trolltech.qt4projectmanager.qmake</value>
+   <value type="QString">trolltech.qt4projectmanager.make</value>
+  </valuelist>
+ </data>
+ <data>
+  <variable>cleanstep0</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value>
+   <value key="clean" type="bool">true</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>cleansteps</variable>
+  <valuelist type="QVariantList">
+   <value type="QString">trolltech.qt4projectmanager.make</value>
+  </valuelist>
+ </data>
+ <data>
+  <variable>defaultFileEncoding</variable>
+  <value type="QByteArray">System</value>
+ </data>
+ <data>
+  <variable>project</variable>
+  <valuemap type="QVariantMap"/>
+ </data>
+</qtcreator>
diff --git a/src/KitchenAlertTestSound1.wav b/src/KitchenAlertTestSound1.wav
new file mode 100755 (executable)
index 0000000..2cbcc4b
Binary files /dev/null and b/src/KitchenAlertTestSound1.wav differ
diff --git a/src/Makefile b/src/Makefile
new file mode 100644 (file)
index 0000000..4273046
--- /dev/null
@@ -0,0 +1,307 @@
+#############################################################################
+# Makefile for building: KitchenAlert
+# Generated by qmake (2.01a) (Qt 4.6.2) on: su kesä 27 19:46:29 2010
+# Project:  KitchenAlert.pro
+# Template: app
+# Command: /usr/bin/qmake-qt4 -spec /usr/share/qt4/mkspecs/linux-g++ -unix CONFIG+=debug -o Makefile KitchenAlert.pro
+#############################################################################
+
+####### Compiler, tools and options
+
+CC            = gcc
+CXX           = g++
+DEFINES       = -DQT_PHONON_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/phonon -I/usr/include/qt4 -I/usr/include/qt4/phonon_compat -I. -I.
+LINK          = g++
+LFLAGS        = 
+LIBS          = $(SUBLIBS)  -L/usr/lib -lphonon -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 \
+               kitchenalertmainwindow.cpp \
+               choosetimersequencedialog.cpp \
+               createtimersequencedialog.cpp \
+               timer.cpp \
+               currentalertstablemodel.cpp \
+               alertsound.cpp moc_kitchenalertmainwindow.cpp \
+               moc_choosetimersequencedialog.cpp \
+               moc_createtimersequencedialog.cpp \
+               moc_timer.cpp \
+               moc_currentalertstablemodel.cpp \
+               moc_alertsound.cpp
+OBJECTS       = main.o \
+               kitchenalertmainwindow.o \
+               choosetimersequencedialog.o \
+               createtimersequencedialog.o \
+               timer.o \
+               currentalertstablemodel.o \
+               alertsound.o \
+               moc_kitchenalertmainwindow.o \
+               moc_choosetimersequencedialog.o \
+               moc_createtimersequencedialog.o \
+               moc_timer.o \
+               moc_currentalertstablemodel.o \
+               moc_alertsound.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 \
+               KitchenAlert.pro
+QMAKE_TARGET  = KitchenAlert
+DESTDIR       = 
+TARGET        = KitchenAlert
+
+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_kitchenalertmainwindow.h ui_choosetimersequencedialog.h ui_createtimersequencedialog.h $(OBJECTS)  
+       $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
+
+Makefile: KitchenAlert.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/libQtGui.prl \
+               /usr/lib/libQtCore.prl
+       $(QMAKE) -spec /usr/share/qt4/mkspecs/linux-g++ -unix CONFIG+=debug -o Makefile KitchenAlert.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/libQtGui.prl:
+/usr/lib/libQtCore.prl:
+qmake:  FORCE
+       @$(QMAKE) -spec /usr/share/qt4/mkspecs/linux-g++ -unix CONFIG+=debug -o Makefile KitchenAlert.pro
+
+dist: 
+       @$(CHK_DIR_EXISTS) .tmp/KitchenAlert1.0.0 || $(MKDIR) .tmp/KitchenAlert1.0.0 
+       $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/KitchenAlert1.0.0/ && $(COPY_FILE) --parents kitchenalertmainwindow.h choosetimersequencedialog.h createtimersequencedialog.h timer.h currentalertstablemodel.h alertsound.h .tmp/KitchenAlert1.0.0/ && $(COPY_FILE) --parents main.cpp kitchenalertmainwindow.cpp choosetimersequencedialog.cpp createtimersequencedialog.cpp timer.cpp currentalertstablemodel.cpp alertsound.cpp .tmp/KitchenAlert1.0.0/ && $(COPY_FILE) --parents kitchenalertmainwindow.ui choosetimersequencedialog.ui createtimersequencedialog.ui .tmp/KitchenAlert1.0.0/ && (cd `dirname .tmp/KitchenAlert1.0.0` && $(TAR) KitchenAlert1.0.0.tar KitchenAlert1.0.0 && $(COMPRESS) KitchenAlert1.0.0.tar) && $(MOVE) `dirname .tmp/KitchenAlert1.0.0`/KitchenAlert1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/KitchenAlert1.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_kitchenalertmainwindow.cpp moc_choosetimersequencedialog.cpp moc_createtimersequencedialog.cpp moc_timer.cpp moc_currentalertstablemodel.cpp moc_alertsound.cpp
+compiler_moc_header_clean:
+       -$(DEL_FILE) moc_kitchenalertmainwindow.cpp moc_choosetimersequencedialog.cpp moc_createtimersequencedialog.cpp moc_timer.cpp moc_currentalertstablemodel.cpp moc_alertsound.cpp
+moc_kitchenalertmainwindow.cpp: timer.h \
+               currentalertstablemodel.h \
+               alertsound.h \
+               kitchenalertmainwindow.h
+       /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) kitchenalertmainwindow.h -o moc_kitchenalertmainwindow.cpp
+
+moc_choosetimersequencedialog.cpp: timerschedule.h \
+               choosetimersequencedialog.h
+       /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) choosetimersequencedialog.h -o moc_choosetimersequencedialog.cpp
+
+moc_createtimersequencedialog.cpp: timer.h \
+               createtimersequencedialog.h
+       /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) createtimersequencedialog.h -o moc_createtimersequencedialog.cpp
+
+moc_timer.cpp: timer.h
+       /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) timer.h -o moc_timer.cpp
+
+moc_currentalertstablemodel.cpp: timer.h \
+               currentalertstablemodel.h
+       /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) currentalertstablemodel.h -o moc_currentalertstablemodel.cpp
+
+moc_alertsound.cpp: alertsound.h
+       /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) alertsound.h -o moc_alertsound.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_kitchenalertmainwindow.h ui_choosetimersequencedialog.h ui_createtimersequencedialog.h
+compiler_uic_clean:
+       -$(DEL_FILE) ui_kitchenalertmainwindow.h ui_choosetimersequencedialog.h ui_createtimersequencedialog.h
+ui_kitchenalertmainwindow.h: kitchenalertmainwindow.ui
+       /usr/bin/uic-qt4 kitchenalertmainwindow.ui -o ui_kitchenalertmainwindow.h
+
+ui_choosetimersequencedialog.h: choosetimersequencedialog.ui
+       /usr/bin/uic-qt4 choosetimersequencedialog.ui -o ui_choosetimersequencedialog.h
+
+ui_createtimersequencedialog.h: createtimersequencedialog.ui
+       /usr/bin/uic-qt4 createtimersequencedialog.ui -o ui_createtimersequencedialog.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 kitchenalertmainwindow.h \
+               timer.h \
+               currentalertstablemodel.h \
+               alertsound.h
+       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp
+
+kitchenalertmainwindow.o: kitchenalertmainwindow.cpp kitchenalertmainwindow.h \
+               timer.h \
+               currentalertstablemodel.h \
+               alertsound.h \
+               ui_kitchenalertmainwindow.h \
+               choosetimersequencedialog.h \
+               timerschedule.h \
+               createtimersequencedialog.h
+       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o kitchenalertmainwindow.o kitchenalertmainwindow.cpp
+
+choosetimersequencedialog.o: choosetimersequencedialog.cpp choosetimersequencedialog.h \
+               timerschedule.h \
+               ui_choosetimersequencedialog.h
+       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o choosetimersequencedialog.o choosetimersequencedialog.cpp
+
+createtimersequencedialog.o: createtimersequencedialog.cpp createtimersequencedialog.h \
+               timer.h \
+               ui_createtimersequencedialog.h
+       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o createtimersequencedialog.o createtimersequencedialog.cpp
+
+timer.o: timer.cpp timer.h \
+               currentalertstablemodel.h
+       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o timer.o timer.cpp
+
+currentalertstablemodel.o: currentalertstablemodel.cpp currentalertstablemodel.h \
+               timer.h
+       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o currentalertstablemodel.o currentalertstablemodel.cpp
+
+alertsound.o: alertsound.cpp alertsound.h
+       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o alertsound.o alertsound.cpp
+
+moc_kitchenalertmainwindow.o: moc_kitchenalertmainwindow.cpp 
+       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_kitchenalertmainwindow.o moc_kitchenalertmainwindow.cpp
+
+moc_choosetimersequencedialog.o: moc_choosetimersequencedialog.cpp 
+       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_choosetimersequencedialog.o moc_choosetimersequencedialog.cpp
+
+moc_createtimersequencedialog.o: moc_createtimersequencedialog.cpp 
+       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_createtimersequencedialog.o moc_createtimersequencedialog.cpp
+
+moc_timer.o: moc_timer.cpp 
+       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_timer.o moc_timer.cpp
+
+moc_currentalertstablemodel.o: moc_currentalertstablemodel.cpp 
+       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_currentalertstablemodel.o moc_currentalertstablemodel.cpp
+
+moc_alertsound.o: moc_alertsound.cpp 
+       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_alertsound.o moc_alertsound.cpp
+
+####### Install
+
+install:   FORCE
+
+uninstall:   FORCE
+
+FORCE:
+
diff --git a/src/Tonitrus.ogg b/src/Tonitrus.ogg
new file mode 100644 (file)
index 0000000..be3da62
Binary files /dev/null and b/src/Tonitrus.ogg differ
diff --git a/src/Tonitrus.wav b/src/Tonitrus.wav
new file mode 100644 (file)
index 0000000..322fd0e
Binary files /dev/null and b/src/Tonitrus.wav differ
index fc8e6d3..fcaefa4 100644 (file)
@@ -25,6 +25,7 @@
 #include "alertsound.h"
 
 #include <QDebug>
+#include <QSettings>
 
 
 
@@ -32,8 +33,24 @@ AlertSound::AlertSound(QObject *parent) :
     QObject(parent)
 {
 
+    defaultsound_ = ":/defaultsound";
+    QString filename;
 
-    pSound_ = Phonon::createPlayer(Phonon::MusicCategory, Phonon::MediaSource("/home/user/MyDocs/KitchenAlertTestSound1.wav"));
+    QSettings settings("KitchenAlert","KitchenAlert");
+
+    settings.clear(); //REMOVE THIS AFTER TESTING!!!!!!
+
+    bool useDefaultSound = settings.value("UseDefaultSound",true).toBool();
+    qDebug() << "In AlertSound constructor UseDefaultSound is " << useDefaultSound;
+    if (useDefaultSound == true)
+    {
+        filename = defaultsound_;
+    }
+    else
+    {
+        filename = settings.value("soundfile",defaultsound_).toString();
+    }
+    pSound_ = Phonon::createPlayer(Phonon::MusicCategory, Phonon::MediaSource(filename));
 }
 
 void AlertSound::play()
@@ -48,3 +65,18 @@ void AlertSound::stop()
 
     pSound_->stop();
 }
+
+void AlertSound::setSound(QString filename)
+{
+   QSettings settings("KitchenAlert","KitchenAlert");
+   settings.setValue("UseDefaultSound",false);
+   settings.setValue("soundfile",filename);
+   pSound_->setCurrentSource(filename);
+}
+
+void AlertSound::setDefaultSound()
+{
+    QSettings settings ("KitchenAlert","KitchenAlert");
+    settings.setValue("UseDefaultSound",true);
+    pSound_->setCurrentSource(defaultsound_);
+}
index d754087..b36cc38 100644 (file)
@@ -31,8 +31,7 @@
 
 
 
- #include <Phonon>
-
+#include <Phonon>
 
 
 /*! Class for playing the alert sound'
@@ -60,11 +59,17 @@ public slots:
     /*! Stops the sound from playing */
     void stop();
 
+    /*! Changes the sound file (both current and saved in settings) */
+    void setSound(QString filename);
+
+    void setDefaultSound();
+
 private:
 
 
 
     Phonon::MediaObject *pSound_;
+    QString defaultsound_;
 
 
 };
index b856739..c4dadcc 100644 (file)
@@ -35,6 +35,8 @@
 CurrentAlertsTableModel::CurrentAlertsTableModel(QObject *parent) :
     QAbstractTableModel(parent)
 {
+
+    updateViewOnChanges_ = true;
 }
 
 
@@ -143,7 +145,10 @@ QVariant CurrentAlertsTableModel::data(const QModelIndex &index, int role) const
 
                 case statusColumnNumber_:
 
-                    return QVariant();  //TO BE REPLACED WITH SENDING STATUS !
+                    if (currentTimers_.at(index.row())->isAlerting() == true)
+                        return QString("ALERT!");
+
+                    else return QString();
 
 
             }
@@ -154,7 +159,7 @@ QVariant CurrentAlertsTableModel::data(const QModelIndex &index, int role) const
 
             //No need to care for the column number, all have the same color
 
-            if (currentTimers_.at(index.row())->getRemainingTimeInSeconds() > 0)
+            if (currentTimers_.at(index.row())->isAlerting() == false)
                 return QBrush (QColor(Qt::white));
             else return QBrush (QColor(Qt::red)); //change this to black if backgroundrole starts to work!
 
@@ -168,7 +173,7 @@ QVariant CurrentAlertsTableModel::data(const QModelIndex &index, int role) const
 
             qDebug() << "BackgroundRole asked";
 
-            if (currentTimers_.at(index.row())->getRemainingTimeInSeconds() > 0)
+            if (currentTimers_.at(index.row())->isAlerting())
             {
                 qDebug() << "black background";
                 return QBrush (QColor(Qt::black));
@@ -206,41 +211,83 @@ void CurrentAlertsTableModel::addTimers(QList <Timer *> timers)
 
 void CurrentAlertsTableModel::refreshTimeColumn()
 {
-    qDebug() << "Refresh time column";
-
+    if (updateViewOnChanges_ == true) //Only update GUI if active to save battery
+    {
+        emit dataChanged(createIndex(0,1),createIndex(rowCount(QModelIndex())-1,1));  //Entire time column refreshed
+        qDebug() << "Refresh time column";
 
+    }
 
-    emit dataChanged(createIndex(0,1),createIndex(rowCount(QModelIndex())-1,1));  //Entire time column refreshed
 
 }
 
 
 void CurrentAlertsTableModel::startTimer(QModelIndex index)
 {
-    currentTimers_.at(index.row())->start();
-    refreshTimeColumn();
+    Timer * ptimer = currentTimers_.value(index.row());
+    if (ptimer != NULL)
+    {
+        ptimer->start();
+        refreshTimeColumn();
+    }
 }
 
 void CurrentAlertsTableModel::stopTimer(QModelIndex index)
 {
-  currentTimers_.at(index.row())->stop();
-   refreshTimeColumn();
+    Timer * ptimer = currentTimers_.value(index.row());
+    if (ptimer != NULL)
+    {
+        ptimer->stop();
+        refreshTimeColumn();
+    }
 }
 
 void CurrentAlertsTableModel::snoozeTimer(QModelIndex index)
 {
-
-    currentTimers_.at(index.row())->snooze();
-    refreshTimeColumn();
+    Timer * ptimer = currentTimers_.value(index.row());
+    if (ptimer != NULL)
+    {
+        ptimer->snooze();
+        refreshTimeColumn();
+    }
 }
 
 QModelIndex CurrentAlertsTableModel::giveIndexForTimer(Timer * ptimer)
 {
     int row = currentTimers_.indexOf(ptimer);
-    if (row < -1) // if not found
+    if (row <= -1) // if not found
         return QModelIndex(); //return invalid index
 
 
     return createIndex(row,0); //return index to the timer row's first column
 
 }
+
+
+QVariant CurrentAlertsTableModel::headerData(int section, Qt::Orientation orientation, int role) const
+{
+    //Reimplemented from QAbsractTableModel
+    //No headers wanted so we just return an empty QVariant
+    return QVariant();
+}
+
+
+void CurrentAlertsTableModel::setUpdateViewOnChanges(bool update)
+{
+    updateViewOnChanges_ = update;
+    if (update == true)
+        reset(); //Refresh view to catch up with past changes
+}
+
+bool CurrentAlertsTableModel::isThisTimerAlerting(QModelIndex index)
+{
+    if (index.isValid())
+    {
+        if (currentTimers_.at(index.row())->isAlerting())
+        {
+            return true;
+        }
+
+    }
+    return false;
+}
index 32cadc3..9751671 100644 (file)
@@ -28,6 +28,7 @@
 #define CURRENTALERTSTABLEMODEL_H
 
 #include <QAbstractTableModel>
+#include <QMainWindow>
 #include "timer.h"
 
 
@@ -54,8 +55,12 @@ public:
 
     QVariant data(const QModelIndex &index, int role) const;
 
+    QVariant headerData(int section, Qt::Orientation orientation, int role) const;
+
     QModelIndex giveIndexForTimer(Timer * ptimer);
 
+    bool isThisTimerAlerting(QModelIndex index);
+
 signals:
 
 public slots:
@@ -68,6 +73,9 @@ public slots:
     void snoozeTimer(QModelIndex index);
     void stopTimer(QModelIndex index);
 
+
+    void setUpdateViewOnChanges(bool update);
+
 private:
     QList <Timer * > currentTimers_;
 
@@ -76,6 +84,10 @@ private:
     static const int timeRemainingColumnNumber_ = 1;
     static const int statusColumnNumber_ = 2;
 
+
+
+    bool updateViewOnChanges_;
+
 };
 
 #endif // CURRENTALERTSTABLEMODEL_H
diff --git a/src/kitchenalert.qrc b/src/kitchenalert.qrc
new file mode 100644 (file)
index 0000000..b98d582
--- /dev/null
@@ -0,0 +1,5 @@
+<RCC>
+    <qresource prefix="/">
+        <file alias="defaultsound">Tonitrus.wav</file>
+    </qresource>
+</RCC>
index 36b1142..2579155 100644 (file)
 #include <QString>
 #include <QList>
 
-#include "choosetimersequencedialog.h"
+
 #include "createtimersequencedialog.h"
+#include "selectsounddialog.h"
 
 
 
 #include <QDebug>
+
+#include <QAction>
+#include <QMenuBar>
 #include <QMessageBox>
 
 
@@ -47,19 +51,25 @@ KitchenAlertMainWindow::KitchenAlertMainWindow(QWidget *parent) :
     {
     ui->setupUi(this);
 
-  connect(ui->LoadTimerScheduleButton, SIGNAL (pressed()), this, SLOT (openTimerSequence()));
+
+
+
   connect(ui->CreateNewScheduleButton, SIGNAL (pressed()), this, SLOT (newTimerSequence()));
 
+
+  //alerts' tableview setup
+
+
   ui->ComingAlertsTableView->setModel(&model_);
   ui->ComingAlertsTableView->setSelectionMode(QAbstractItemView::SingleSelection);
   ui->ComingAlertsTableView->setSelectionBehavior(QAbstractItemView::SelectRows);
+  ui->ComingAlertsTableView->horizontalHeader()->setResizeMode(QHeaderView::ResizeToContents);
+  ui->ComingAlertsTableView->horizontalHeader()->hide();
 
 
   //Buttons used to reacting an alarm are hidden by default
 
-  ui->DoneButton->setDisabled(true);
-  ui->SnoozeButton->setDisabled(true);
-  ui->RestartButton->setDisabled(true);
+  disableSelectionDependentButtons();
 
 
   connect(ui->ComingAlertsTableView->selectionModel(),SIGNAL(selectionChanged(QItemSelection,QItemSelection)),this,SLOT(timerSelected(QItemSelection,QItemSelection)));
@@ -68,7 +78,15 @@ KitchenAlertMainWindow::KitchenAlertMainWindow(QWidget *parent) :
   connect(ui->RestartButton,SIGNAL(clicked()),this,SLOT(restart()));
   connect(ui->SnoozeButton,SIGNAL(clicked()),this, SLOT(snooze()));
 
+  // menu setup
+
+  QAction * p_SelectSoundAction = new QAction(tr("Select alert sound"),this);
+  connect(p_SelectSoundAction, SIGNAL(triggered()), this, SLOT(openSelectSoundDialog()));
+  menuBar()->addAction(p_SelectSoundAction);
 
+  QAction * p_AboutAction = new QAction(tr("About"),this);
+  connect(p_AboutAction,SIGNAL(triggered()),this,SLOT(openAbout()));
+  menuBar()->addAction(p_AboutAction);
     }
 
 KitchenAlertMainWindow::~KitchenAlertMainWindow()
@@ -90,14 +108,6 @@ void KitchenAlertMainWindow::changeEvent(QEvent *e)
 
 }
 
-void KitchenAlertMainWindow::openTimerSequence()
-{
-    ChooseTimerSequenceDialog opendialog;
-    opendialog.exec();
-
-
-
-}
 
 void KitchenAlertMainWindow::newTimerSequence()
 {
@@ -113,18 +123,19 @@ void KitchenAlertMainWindow::newTimerSequence()
        Timer* timer1 = alltimers.at(0); // take first timer (currently the only one!)
 
 
+       timer1->start();
+       connect(timer1,SIGNAL(alert(QModelIndex)),this,SLOT(alert(QModelIndex)));
 
 
-//       ui->nextAlertText->setText( timer1->getAlertText());
 
+        model_.addTimers(alltimers); // give timers to the model
 
-       timer1->start();
-       connect(timer1,SIGNAL(alert(QModelIndex)),this,SLOT(alert(QModelIndex)));
+ //       ui->ComingAlertsTableView->resizeColumnsToContents();
 
 
+        //Disable buttons, as selection is cleared when view is refreshed to show the new timer
 
-        model_.addTimers(alltimers); // give timers to the model
-//        ui->ComingAlertsTableView->update();
+        disableSelectionDependentButtons();
 
 
 
@@ -136,21 +147,11 @@ void KitchenAlertMainWindow::newTimerSequence()
 }
 
 
-void KitchenAlertMainWindow::updateTime(int seconds)
-{
-
-
-//    ui->hoursLcdNumber->display(seconds/360);
-//    ui->minutesLcdNumber->display((seconds%360)/60);
-//    ui->secondsLcdNumber->display((seconds%60));
 
 
 
-}
-
 void KitchenAlertMainWindow::alert(QModelIndex indexOfAlerter)
 {
- //   QMessageBox::information ( NULL, "KitchenAlert","Alert!!!");
 
     // The program is brought to front and activated when alerted
 
@@ -162,7 +163,6 @@ void KitchenAlertMainWindow::alert(QModelIndex indexOfAlerter)
     qDebug() << "Should be selected now";
 
 
-
     //Snooze button is enabled
 
 
@@ -170,27 +170,40 @@ void KitchenAlertMainWindow::alert(QModelIndex indexOfAlerter)
 
     //The alert sound is played
 
-
-
-
-        //TODO
-
     alertSound_.play();
 
 }
 
 
-void KitchenAlertMainWindow::timerSelected(QItemSelection,QItemSelection)
+void KitchenAlertMainWindow::timerSelected(QItemSelection selected,QItemSelection deselected)
 {
     ui->DoneButton->setEnabled(true);
     ui->RestartButton->setEnabled(true);
 
+
+    //enabled only when alerting
+    QModelIndexList indexes = selected.indexes();
+
+    //the selection model only allows selecting one row at the time & we only need to know the row, so we can just take the first one
+    QModelIndex index = indexes.value(0);
+    if (index.isValid())
+    {
+        if (model_.isThisTimerAlerting(index) == true)
+        {
+             ui->SnoozeButton->setEnabled(true);
+        }
+        else ui->SnoozeButton->setDisabled(true);
+    }
+
 }
 
 void KitchenAlertMainWindow::snooze()
 {
-
-    model_.snoozeTimer(selectedRow());
+    QModelIndex row = selectedRow();
+    if (row.isValid()) //If there was no row selected invalid row was returned
+    {
+        model_.snoozeTimer(row);
+    }
     ui->SnoozeButton->setDisabled(true);
     alertSound_.stop();
 
@@ -198,8 +211,12 @@ void KitchenAlertMainWindow::snooze()
 
 void KitchenAlertMainWindow::restart()
 {
+    QModelIndex row = selectedRow(); //If there was no row selected invalid row was returned
+    if (row.isValid())
+    {
 
-    model_.startTimer(selectedRow());
+        model_.startTimer(row);
+    }
     ui->SnoozeButton->setDisabled(true);
     alertSound_.stop();
 
@@ -207,7 +224,11 @@ void KitchenAlertMainWindow::restart()
 
 void KitchenAlertMainWindow::stop()
 {
-    model_.stopTimer(selectedRow());
+    QModelIndex row = selectedRow();
+    if (row.isValid()) //If there was no row selected invalid row was returned
+    {
+        model_.stopTimer(row);
+    }
     ui->SnoozeButton->setDisabled(true);
     alertSound_.stop();
 }
@@ -217,7 +238,58 @@ QModelIndex KitchenAlertMainWindow::selectedRow()
     QModelIndexList chosenRows = ui->ComingAlertsTableView->selectionModel()->selectedRows();
 
     //The selection mode used allows only one row to be selected at time, so we just take the first
-    //There are indexes for all coloumns in the row in the list, but as we only use the row, it does not matter which one we take
+    //There are indexes for all columns in the row in the list, but as we only use the row, it does not matter which one we take
+
+    return chosenRows.value(0); //gives an invalid QModelIndex if the list is empty
+}
+
+void KitchenAlertMainWindow::openSelectSoundDialog()
+{
+    SelectSoundDialog dialog;
+   if ( dialog.exec() == QDialog::Accepted) //if user pressed OK
+    {
+       if (dialog.isDefaultSoundChecked() == true)
+           alertSound_.setDefaultSound();
+       else
+        alertSound_.setSound(dialog.getSoundFileName());
+
+   //opening a dialog clears the selection so the selection dependen buttons must be disabled
+    }
+    disableSelectionDependentButtons();
+}
+
+void KitchenAlertMainWindow::openAbout()
+{
+    QMessageBox::about(this,tr("About KitchenAlert"),tr("<p>Version 0.09"
+                                                        "<p>Copyright &copy; Heli Hyv&auml;ttinen 2010"
+                                                         "<p>License: General Public License v3"
+                                                         "<p>Bugtracker: https://garage.maemo.org/projects/kitchenalert/"));
+}
+
+bool KitchenAlertMainWindow::event(QEvent *event)
+{
+    QMainWindow::event(event);
+
+    switch (event->type())
+    {
+        case QEvent::WindowActivate:
+
+            model_.setUpdateViewOnChanges(true);
+              break;
+
+       case QEvent::WindowDeactivate:
+            model_.setUpdateViewOnChanges(false);
+            break;
+
+       default:
+            break;
+    }
+}
+
+void KitchenAlertMainWindow::disableSelectionDependentButtons()
+{
+    ui->DoneButton->setDisabled(true);
+    ui->SnoozeButton->setDisabled(true);
+    ui->RestartButton->setDisabled(true);
 
-    return chosenRows.takeFirst();
 }
index 393875b..4b0e5be 100644 (file)
@@ -60,20 +60,26 @@ public:
 
 
 public slots:
-    void openTimerSequence();
     void newTimerSequence();
+    void openSelectSoundDialog();
+    void openAbout();
+
 
-    void updateTime(int seconds);
     void alert(QModelIndex indexOfAlerted);
-    void timerSelected(QItemSelection,QItemSelection);
+    void timerSelected(QItemSelection selected,QItemSelection deselected);
     void snooze();
     void restart();
     void stop();
 
+
 protected:
     void changeEvent(QEvent *e);
+    bool event(QEvent *event);
+
+    void disableSelectionDependentButtons();
 
 private:
+
     Ui::KitchenAlertMainWindow *ui;
 
     QList <Timer *> currentTimers_;
@@ -83,6 +89,8 @@ private:
     QModelIndex selectedRow();
 
     AlertSound alertSound_;
+
+
 };
 
 #endif // KITCHENALERTMAINWINDOW_H
index fdbebe7..a8d78e9 100644 (file)
        <item>
         <layout class="QHBoxLayout" name="horizontalLayout">
          <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>
           <widget class="QPushButton" name="CreateNewScheduleButton">
            <property name="text">
             <string>New timer schedule</string>
           </widget>
          </item>
          <item>
-          <widget class="QPushButton" name="LoadTimerScheduleButton">
-           <property name="text">
-            <string>Load timer schedule</string>
+          <spacer name="horizontalSpacer_2">
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
            </property>
-          </widget>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>40</width>
+             <height>20</height>
+            </size>
+           </property>
+          </spacer>
          </item>
         </layout>
        </item>
diff --git a/src/licence template~ b/src/licence template~
new file mode 100644 (file)
index 0000000..43ab975
--- /dev/null
@@ -0,0 +1,23 @@
+/**************************************************************************
+        This file is part of KitchenAlert v.0.09
+
+        Copyright (C) 2010  Heli Hyvättinen
+
+        Kitchen Alert is free software: you can redistribute it and/or modify
+        it under the terms of the GNU General Public License as published by
+        the Free Software Foundation, either version 3 of the License, or
+        (at your option) any later version.
+
+        This program is distributed in the hope that it will be useful,
+        but WITHOUT ANY WARRANTY; without even the implied warranty of
+        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+        GNU General Public License for more details.
+
+        You should have received a copy of the GNU General Public License
+        along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+**************************************************************************/
+
+
+
+
index 5e157c4..349ea26 100644 (file)
@@ -28,6 +28,7 @@
 int main(int argc, char *argv[])
 {
     QApplication a(argc, argv);
+    a.setApplicationName("KitchenAlert"); //a name required by phonon
     KitchenAlertMainWindow w;
 #if defined(Q_WS_S60)
     w.showMaximized();
diff --git a/src/selectsounddialog.cpp b/src/selectsounddialog.cpp
new file mode 100644 (file)
index 0000000..539796e
--- /dev/null
@@ -0,0 +1,79 @@
+/**************************************************************************
+        KitchenAlert
+
+        Copyright (C) 2010  Heli Hyvättinen
+        
+        This file is part of KitchenAlert.
+
+        Kitchen Alert is free software: you can redistribute it and/or modify
+        it under the terms of the GNU General Public License as published by
+        the Free Software Foundation, either version 3 of the License, or
+        (at your option) any later version.
+
+        This program is distributed in the hope that it will be useful,
+        but WITHOUT ANY WARRANTY; without even the implied warranty of
+        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+        GNU General Public License for more details.
+
+        You should have received a copy of the GNU General Public License
+        along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+**************************************************************************/
+
+
+
+
+
+#include "selectsounddialog.h"
+#include "ui_selectsounddialog.h"
+#include <QFileDialog>
+#include <QSettings>
+#include <QDebug>
+
+SelectSoundDialog::SelectSoundDialog(QWidget *parent) :
+    QDialog(parent),
+    ui(new Ui::SelectSoundDialog)
+{
+    ui->setupUi(this);
+    connect(ui->browseButton,SIGNAL(clicked()),this,SLOT(browse()));
+
+    QSettings settings("KitchenAlert","KitchenAlert");
+    QString filename = settings.value("soundfile").toString();
+    ui->lineEdit->setText(filename);
+
+    bool useDefaultSoundFile = settings.value("UseDefaultSound",true).toBool();
+    if (useDefaultSoundFile == true)
+    {
+        ui->DefaultSoundRadioButton->setChecked(true);
+        ui->browseButton->setDisabled(true);
+        ui->lineEdit->setDisabled(true);
+    }
+    else ui->CustomSoundRadioButton->setChecked(true);
+    qDebug() << "UseDefaultSoundfile is " << useDefaultSoundFile;
+}
+
+SelectSoundDialog::~SelectSoundDialog()
+{
+    delete ui;
+}
+
+void SelectSoundDialog::browse()
+{
+    QString filename = QFileDialog::getOpenFileName(this, tr("Choose a sound file"),"/home/user/"); //Filters: to use or not...? //MAEMO specific dir here...
+    if (!filename.isEmpty()) //Empty string returned by the dialog if user pressed cancel...
+    {
+        ui->lineEdit->setText(filename);
+    }
+}
+
+QString SelectSoundDialog::getSoundFileName()
+{
+    if (ui->CustomSoundRadioButton->isChecked() == true)
+        return ui->lineEdit->displayText();
+    else return QString();
+}
+
+bool SelectSoundDialog::isDefaultSoundChecked()
+{
+    return ui->DefaultSoundRadioButton->isChecked();
+}
diff --git a/src/selectsounddialog.h b/src/selectsounddialog.h
new file mode 100644 (file)
index 0000000..6e7c77f
--- /dev/null
@@ -0,0 +1,53 @@
+/**************************************************************************
+        KitchenAlert
+
+        Copyright (C) 2010  Heli Hyvättinen
+        
+        This file is part of KitchenAlert.
+
+        Kitchen Alert is free software: you can redistribute it and/or modify
+        it under the terms of the GNU General Public License as published by
+        the Free Software Foundation, either version 3 of the License, or
+        (at your option) any later version.
+
+        This program is distributed in the hope that it will be useful,
+        but WITHOUT ANY WARRANTY; without even the implied warranty of
+        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+        GNU General Public License for more details.
+
+        You should have received a copy of the GNU General Public License
+        along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+**************************************************************************/
+
+
+
+
+
+#ifndef SELECTSOUNDDIALOG_H
+#define SELECTSOUNDDIALOG_H
+
+#include <QDialog>
+
+namespace Ui {
+    class SelectSoundDialog;
+}
+
+class SelectSoundDialog : public QDialog
+{
+    Q_OBJECT
+
+public:
+    explicit SelectSoundDialog(QWidget *parent = 0);
+    ~SelectSoundDialog();
+    QString getSoundFileName();
+    bool isDefaultSoundChecked();
+
+public slots:
+    void browse();
+
+private:
+    Ui::SelectSoundDialog *ui;
+};
+
+#endif // SELECTSOUNDDIALOG_H
diff --git a/src/selectsounddialog.ui b/src/selectsounddialog.ui
new file mode 100644 (file)
index 0000000..4ecdba3
--- /dev/null
@@ -0,0 +1,182 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>SelectSoundDialog</class>
+ <widget class="QDialog" name="SelectSoundDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>770</width>
+    <height>336</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Select the alarm sound for KitchenAlert</string>
+  </property>
+  <widget class="QWidget" name="verticalLayoutWidget">
+   <property name="geometry">
+    <rect>
+     <x>10</x>
+     <y>14</y>
+     <width>751</width>
+     <height>311</height>
+    </rect>
+   </property>
+   <layout class="QVBoxLayout" name="verticalLayout">
+    <item>
+     <layout class="QHBoxLayout" name="horizontalLayout_2">
+      <item>
+       <widget class="QRadioButton" name="DefaultSoundRadioButton">
+        <property name="text">
+         <string>Use the default sound</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QRadioButton" name="CustomSoundRadioButton">
+        <property name="text">
+         <string>Use a custom sound</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </item>
+    <item>
+     <widget class="QTextBrowser" name="textBrowser">
+      <property name="minimumSize">
+       <size>
+        <width>401</width>
+        <height>0</height>
+       </size>
+      </property>
+      <property name="font">
+       <font>
+        <pointsize>16</pointsize>
+       </font>
+      </property>
+      <property name="html">
+       <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:16pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:9pt; font-weight:600;&quot;&gt;Warning:&lt;/span&gt;&lt;span style=&quot; font-size:9pt;&quot;&gt; choosing a sound file inside the &amp;quot;N900&amp;quot; folder will prevent mounting it outside the device when KitchenAlert is running and the sound from playing if the folder has been mounted out before starting KitchenAlert.&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:9pt;&quot;&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+      </property>
+     </widget>
+    </item>
+    <item>
+     <layout class="QHBoxLayout" name="horizontalLayout">
+      <item>
+       <widget class="QLabel" name="label">
+        <property name="text">
+         <string>Select a sound file:</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QLineEdit" name="lineEdit"/>
+      </item>
+      <item>
+       <widget class="QPushButton" name="browseButton">
+        <property name="text">
+         <string>Browse</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </item>
+    <item>
+     <layout class="QHBoxLayout" name="horizontalLayout_4">
+      <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>
+       <widget class="QPushButton" name="OKButton">
+        <property name="text">
+         <string>Done</string>
+        </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>
+     <layout class="QHBoxLayout" name="horizontalLayout_3"/>
+    </item>
+   </layout>
+  </widget>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>CustomSoundRadioButton</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>browseButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>649</x>
+     <y>50</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>737</x>
+     <y>225</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>CustomSoundRadioButton</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>lineEdit</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>441</x>
+     <y>53</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>196</x>
+     <y>229</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>OKButton</sender>
+   <signal>clicked()</signal>
+   <receiver>SelectSoundDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>382</x>
+     <y>251</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>495</x>
+     <y>250</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
index 9c5e75d..3593008 100644 (file)
@@ -68,7 +68,7 @@ void Timer::setAlertText(QString text)
 void Timer::secondPassed()
 {
     _remainingTime--;
-    emit remainingTimeChanged();
+
 
     if (_remainingTime == 0)
     {
@@ -77,6 +77,7 @@ void Timer::secondPassed()
         qDebug() << "alerting";
     }
 
+    emit remainingTimeChanged(); //after alerting in case of alert so that status gets updated immediately
 }
 
 void Timer::start()
@@ -84,6 +85,8 @@ void Timer::start()
     _remainingTime = _originalTime;
     _actualTimer.start();
 
+    alerting_ = false;
+
 }
 
 
@@ -92,13 +95,14 @@ void Timer::stop()
     _actualTimer.stop();
     _remainingTime = 0; //Stopped timer shows 00:00:00 (which unfortunately makes it red...)
 
-
+    alerting_ = false;
 }
 
 void Timer::snooze()
 {
     _remainingTime = 120;
 
+    alerting_ = false;
 }