#-------------------------------------------------
QT += core gui
+QT += phonon
TARGET = KitchenAlert
TEMPLATE = app
choosetimersequencedialog.cpp \
createtimersequencedialog.cpp \
timer.cpp \
- currentalertstablemodel.cpp
+ currentalertstablemodel.cpp \
+ alertsound.cpp
HEADERS += kitchenalertmainwindow.h \
choosetimersequencedialog.h \
createtimersequencedialog.h \
timer.h \
- currentalertstablemodel.h
+ currentalertstablemodel.h \
+ alertsound.h
FORMS += kitchenalertmainwindow.ui \
choosetimersequencedialog.ui \
createtimersequencedialog.ui
CONFIG += mobility
-MOBILITY =
+MOBILITY =
+
+
symbian {
TARGET.UID3 = 0xe1020059
TARGET.EPOCSTACKSIZE = 0x14000
TARGET.EPOCHEAPSIZE = 0x020000 0x800000
}
+
+RESOURCES +=
--- /dev/null
+/**************************************************************************
+ 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/>.
+
+**************************************************************************/
+
+
+
+
+
+#include "alertsound.h"
+
+#include <QDebug>
+
+
+
+AlertSound::AlertSound(QObject *parent) :
+ QObject(parent)
+{
+
+
+ pSound_ = Phonon::createPlayer(Phonon::MusicCategory, Phonon::MediaSource("/home/user/MyDocs/KitchenAlertTestSound1.wav"));
+}
+
+void AlertSound::play()
+{
+
+ pSound_->play();
+ qDebug() << "Sound should be played now";
+}
+
+void AlertSound::stop()
+{
+
+ pSound_->stop();
+}
--- /dev/null
+/**************************************************************************
+ 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 ALERTSOUND_H
+#define ALERTSOUND_H
+
+#include <QObject>
+
+
+
+ #include <Phonon>
+
+
+
+/*! Class for playing the alert sound'
+
+ @author Heli Hyvättinen
+ @date 2010-06-26
+ @version 0.09
+
+Class for playing (and stopping) the alert sound.
+
+*/
+
+class AlertSound : public QObject
+{
+ Q_OBJECT
+public:
+ explicit AlertSound(QObject *parent = 0);
+
+signals:
+
+public slots:
+ /*! Plays the sound */
+ void play();
+
+ /*! Stops the sound from playing */
+ void stop();
+
+private:
+
+
+
+ Phonon::MediaObject *pSound_;
+
+
+};
+
+#endif // ALERTSOUND_H
/**************************************************************************
- KitchenAlert v.0.01
+ KitchenAlert
Copyright (C) 2010 Heli Hyvättinen
- This program is free software: you can redistribute it and/or modify
+ 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.
/**************************************************************************
- KitchenAlert v.0.01
+ KitchenAlert
Copyright (C) 2010 Heli Hyvättinen
- This program is free software: you can redistribute it and/or modify
+ 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.
-
#ifndef CHOOSETIMERSEQUENCEDIALOG_H
#define CHOOSETIMERSEQUENCEDIALOG_H
class ChooseTimerSequenceDialog;
}
+/*! Class for the dialog for choosing timers'
+
+ @author Heli Hyvättinen
+ @date 2010-06-26
+ @version 0.09
+
+Does nothing but show the dialog now, useless.
+
+*/
+
+
class ChooseTimerSequenceDialog : public QDialog
{
Q_OBJECT
/**************************************************************************
- KitchenAlert v.0.01
+ KitchenAlert
Copyright (C) 2010 Heli Hyvättinen
- This program is free software: you can redistribute it and/or modify
+ 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.
/**************************************************************************
- KitchenAlert v.0.01
+ KitchenAlert
Copyright (C) 2010 Heli Hyvättinen
- This program is free software: you can redistribute it and/or modify
+ 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.
class CreateTimerSequenceDialog;
}
+
+/*! Class for the dialog for creating timers'
+
+ @author Heli Hyvättinen
+ @date 2010-06-26
+ @version 0.09
+
+Class for the dialog for creating timers
+
+*/
+
+
class CreateTimerSequenceDialog : public QDialog
{
Q_OBJECT
/**************************************************************************
- KitchenAlert v.0.019
+ KitchenAlert
Copyright (C) 2010 Heli Hyvättinen
- This program is free software: you can redistribute it and/or modify
+ 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.
/**************************************************************************
- KitchenAlert v.0.019
+ KitchenAlert
Copyright (C) 2010 Heli Hyvättinen
- This program is free software: you can redistribute it and/or modify
+ 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.
#include <QAbstractTableModel>
#include "timer.h"
+
+/*! Class that contains the model that holds the timers'
+
+ @author Heli Hyvättinen
+ @date 2010-06-26
+ @version 0.09
+
+Class that contains the model that holds the timers
+
+*/
+
+
class CurrentAlertsTableModel : public QAbstractTableModel
{
Q_OBJECT
/**************************************************************************
- KitchenAlert v.0.01
+ KitchenAlert
Copyright (C) 2010 Heli Hyvättinen
- This program is free software: you can redistribute it and/or modify
+ 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.
#include "createtimersequencedialog.h"
+
#include <QDebug>
#include <QMessageBox>
-#include <QMediaPlayer>
+
+
KitchenAlertMainWindow::KitchenAlertMainWindow(QWidget *parent) :
QMainWindow(parent),
//The alert sound is played
- //TODO
+ //TODO
+
+ alertSound_.play();
}
model_.snoozeTimer(selectedRow());
ui->SnoozeButton->setDisabled(true);
+ alertSound_.stop();
}
{
model_.startTimer(selectedRow());
- ui->SnoozeButton->setDisabled(true);
+ ui->SnoozeButton->setDisabled(true);
+ alertSound_.stop();
}
void KitchenAlertMainWindow::stop()
{
model_.stopTimer(selectedRow());
- ui->SnoozeButton->setDisabled(true);
+ ui->SnoozeButton->setDisabled(true);
+ alertSound_.stop();
}
QModelIndex KitchenAlertMainWindow::selectedRow()
/**************************************************************************
- KitchenAlert v.0.01
+ KitchenAlert
Copyright (C) 2010 Heli Hyvättinen
- This program is free software: you can redistribute it and/or modify
+ 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.
#include "timer.h"
#include "currentalertstablemodel.h"
#include <QItemSelection>
+#include "alertsound.h"
namespace Ui {
class KitchenAlertMainWindow;
}
+
+/*! The main window class of KitchenAlert'
+
+ @author Heli Hyvättinen
+ @date 2010-06-26
+ @version 0.09
+
+Operates the UI.
+
+*/
+
class KitchenAlertMainWindow : public QMainWindow
{
Q_OBJECT
CurrentAlertsTableModel model_;
QModelIndex selectedRow();
+
+ AlertSound alertSound_;
};
#endif // KITCHENALERTMAINWINDOW_H
/**************************************************************************
- KitchenAlert v.0.019
+ KitchenAlert
Copyright (C) 2010 Heli Hyvättinen
+
+ This file is part of KitchenAlert.
- This program is free software: you can redistribute it and/or modify
+ 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.
/**************************************************************************
- KitchenAlert v.0.01
+ KitchenAlert
Copyright (C) 2010 Heli Hyvättinen
- This program is free software: you can redistribute it and/or modify
+ 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.
/**************************************************************************
- KitchenAlert v.0.01
+ KitchenAlert
Copyright (C) 2010 Heli Hyvättinen
- This program is free software: you can redistribute it and/or modify
+ 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.
/**************************************************************************
- KitchenAlert v.0.01
+ KitchenAlert
Copyright (C) 2010 Heli Hyvättinen
- This program is free software: you can redistribute it and/or modify
+ 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.
#include <QModelIndex>
+
+
+/*! The timer class of KitchenAlert'
+
+ @author Heli Hyvättinen
+ @date 2010-06-26
+ @version 0.09
+
+The timer class of KitchenAlert.
+
+*/
+
class Timer : public QObject
{
Q_OBJECT
--- /dev/null
+/**************************************************************************
+ KitchenAlert v.0.01
+
+ Copyright (C) 2010 Heli Hyvättinen
+
+ This program 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 "timerschedule.h"
+
+TimerSchedule::TimerSchedule(QObject *parent) :
+ QObject(parent)
+{
+}
--- /dev/null
+/**************************************************************************
+ KitchenAlert v.0.01
+
+ Copyright (C) 2010 Heli Hyvättinen
+
+ This program 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 TIMERSCHEDULE_H
+#define TIMERSCHEDULE_H
+
+#include <QObject>
+
+class TimerSchedule : public QObject
+{
+ Q_OBJECT
+public:
+ explicit TimerSchedule(QObject *parent = 0);
+
+signals:
+
+public slots:
+
+};
+
+#endif // TIMERSCHEDULE_H