1 /**************************************************************************
4 Copyright (C) 2010 Heli Hyvättinen
6 This file is part of KitchenAlert.
8 Kitchen Alert is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>.
21 **************************************************************************/
27 #include "createtimersequencedialog.h"
28 #include "ui_createtimersequencedialog.h"
30 CreateTimerSequenceDialog::CreateTimerSequenceDialog(QWidget *parent) :
32 ui(new Ui::CreateTimerSequenceDialog)
35 ui->timer1AlertText->setMaxLength(40);
38 CreateTimerSequenceDialog::~CreateTimerSequenceDialog()
43 void CreateTimerSequenceDialog::changeEvent(QEvent *e)
45 QDialog::changeEvent(e);
47 case QEvent::LanguageChange:
48 ui->retranslateUi(this);
56 QList<Timer*> CreateTimerSequenceDialog::getTimers()
58 QList<Timer *> timers;
59 Timer* ptimer =new Timer();
60 int timeInSeconds = (ui->Timer1HoursSpinBox->value() * 60 * 60) + (ui->timer1minutesSpinBox->value() * 60) + ui->timer1SecondsSpinBox->value();
61 ptimer->setOriginalTimeInSeconds(timeInSeconds);
62 ptimer->setAlertText(ui->timer1AlertText->text());
63 timers.append(ptimer);