[Dolphin]
SortOrder=1
Sorting=2
-Timestamp=2010,8,16,21,16,54
+Timestamp=2010,9,20,14,21,59
ViewMode=1
<value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
</valuemap>
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.2" type="QVariantMap">
+ <value key="Packaging Enabled" type="bool">true</value>
<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">/usr/local/bin/KitchenAlert</value>
<valuelist key="Qt4ProjectManager.BuildStep.MaemoPackage.RemoteFiles" type="QVariantList"/>
+ <value key="Version Number" type="QString">0.0.1</value>
</valuemap>
<value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">3</value>
<valuemap key="ProjectExplorer.BuildConfiguration.CleanStep.0" type="QVariantMap">
<value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
</valuemap>
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.2" type="QVariantMap">
+ <value key="Packaging Enabled" type="bool">true</value>
<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">true</value>
<value key="Qt4ProjectManager.BuildStep.MaemoPackage.RemoteExe" type="QString"></value>
<valuelist key="Qt4ProjectManager.BuildStep.MaemoPackage.RemoteFiles" type="QVariantList"/>
+ <value key="Version Number" type="QString">0.0.1</value>
</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">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-09-08T15:52:20</value>
- </valuemap>
+ <valuelist key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployedFiles" type="QVariantList">
+ <value type="QString">/holvi/heli/ohjelmointi/KitchenAlert-build-maemo/kitchenalert_0.0.1_armel.deb</value>
+ <value type="QString">192.168.2.15</value>
+ </valuelist>
+ <valuelist key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployedHosts" type="QVariantList">
+ <value type="QString">192.168.2.15</value>
+ <value type="QString">/holvi/heli/ohjelmointi/KitchenAlert-build-maemo/kitchenalert_0.0.1_armel.deb</value>
+ </valuelist>
+ <valuelist key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployedRemotePaths" type="QVariantList">
+ <value type="QString">/home/developer/kitchenalert_0.0.1_armel.deb</value>
+ <value type="QString">/home/developer/kitchenalert_0.0.1_armel.deb</value>
+ </valuelist>
+ <valuelist key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployedTimes" type="QVariantList">
+ <value type="QDateTime">2010-09-19T21:36:38</value>
+ <value type="QDateTime">2010-09-20T14:15:54</value>
+ </valuelist>
</valuemap>
<value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</value>
</valuemap>
pSound_->stop();
}
+
+
void AlertSound::setSound(QString filename)
{
QSettings settings("KitchenAlert","KitchenAlert");
//preparatory work
foreach (Timer* timer, timers)
{
- connect (timer,SIGNAL(remainingTimeChanged()),this,SLOT(refreshTimeColumn()));
+ connect (timer,SIGNAL(remainingTimeChanged()),this,SLOT(refreshTimeAndStatusColumns()));
// qDebug() << "timer connected";
timer->setParent(this); //The model becomes the timers parent giving the timer access to model
}
}
-void CurrentAlertsTableModel::refreshTimeColumn()
+void CurrentAlertsTableModel::refreshTimeAndStatusColumns()
{
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),2)); //Entire time and status columns refreshed
+
}
if (ptimer != NULL)
{
ptimer->start();
- refreshTimeColumn();
+ refreshTimeAndStatusColumns();
}
}
if (ptimer != NULL)
{
ptimer->stop();
- refreshTimeColumn();
+ refreshTimeAndStatusColumns();
}
}
if (ptimer != NULL)
{
ptimer->snooze();
- refreshTimeColumn();
+ refreshTimeAndStatusColumns();
}
}
{
updateViewOnChanges_ = update;
if (update == true)
- refreshTimeColumn(); //Refresh to catch up with past changes
+ refreshTimeAndStatusColumns(); //Refresh to catch up with past changes
}
bool CurrentAlertsTableModel::isThisTimerAlerting(QModelIndex index)
void addTimers(QList <Timer *> timers, bool startImmediately = true);
/*!
- Tells the view to refresh all information in the time column.
+ Tells the view to refresh all information in the time and status columns.
+ (The time and status change without user inervention unlike the alert text and thus
+ need to be refreshed.)
*/
- void refreshTimeColumn ();
+ void refreshTimeAndStatusColumns ();
/*!
Passes the start command to the timer in the given index.
connect(timer1,SIGNAL(alert(QModelIndex)),this,SLOT(alert(QModelIndex)));
+ //TODO: FIND A WAY TO INFORM THE TIMERS' ALERTSOUND'S OF A CHANGE OF THE SOUND FILE THEY SHOULD USE!!!!
+
+ connect(this,SIGNAL(defaultSoundEnabled()),timer1,SLOT(enableDefaultSound()));
+ connect(this,SIGNAL(soundChanged(QString)),timer1,SLOT(changeAlertSound(QString)));
+
model_.addTimers(alltimers); // give timers to the model, they are started automatically by default
if ( dialog.exec() == QDialog::Accepted) //if user pressed OK
{
if (dialog.isDefaultSoundChecked() == true)
- alertSound_.setDefaultSound();
+ emit defaultSoundEnabled();
else
- alertSound_.setSound(dialog.getSoundFileName());
+ emit soundChanged(dialog.getSoundFileName());
}
}
*/
void stop();
+signals:
+
+ void defaultSoundEnabled();
+
+ void soundChanged(QString filename);
protected:
void changeEvent(QEvent *e);
void Timer::stop()
{
_actualTimer.stop();
- _remainingTime = 0; //Stopped timer shows 00:00:00 (which unfortunately makes it red...)
+ _remainingTime = 0; //Stopped timer shows 00:00:00
alerting_ = false;
alertSound_.stop();
}
+void Timer::enableDefaultSound()
+{
+alertSound_.setDefaultSound();
+}
+
+void Timer::changeAlertSound(QString filename)
+{
+alertSound_.setSound(filename);
+}
+
+
void stop();
void snooze();
+ void enableDefaultSound();
+ void changeAlertSound(QString filename);
+
+
private: