sAlarm 0.5
salarm/timeoutdialog.h
00001 /*
00002  * sAlarm - Scheduler
00003  * http://salarm.seberm.com
00004  *
00005  * Copyright (C) 2009-2010 Otto Sabart <seberm[at]gmail[dot]com>
00006  * 
00007  * This program is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU General Public License
00009  * version 3 as published by the Free Software Foundation.
00010  * 
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  * 
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00019  */
00020 
00021 
00022 #ifndef TIMEOUTDIALOG_H
00023 #define TIMEOUTDIALOG_H
00024 
00025 
00026 #include <QDialog>
00027 #include <QDateTime>
00028 #include <QCloseEvent>
00029 
00030 
00031 namespace Ui {
00032         
00033     class TimeoutDialog;
00034 }
00035 
00036 namespace Phonon {
00037         
00038         class MediaObject;
00039 }
00040 
00041 using namespace Phonon;
00042 
00043 
00045 
00048 class TimeoutDialog : public QDialog {
00049     
00050         Q_OBJECT
00051 
00052 public:
00054     explicit TimeoutDialog(int scheduleID, QWidget *parent = 0);
00055         
00057     ~TimeoutDialog();
00058         
00059         
00060 protected:
00062         void closeEvent(QCloseEvent* e);        
00063 
00064         
00065 private:
00067         void makeConnections();
00068         
00070         void inform();
00071         
00072     Ui::TimeoutDialog *ui;
00073         
00075         int m_scheduleID;
00076         
00078         QString m_text;
00079         
00081         QString m_title;
00082         
00084         QDateTime m_expiration;
00085         
00087 
00090         MediaObject *m_player;
00091 
00092         
00093 signals:
00094         
00096         void postponed(int);
00097         
00099         void confirmed(int);
00100         
00101         
00102 private slots:
00103         
00105 
00108         void confirm();
00109         
00111 
00114         void postpone();
00115         
00116 };
00117 
00118 #endif // TIMEOUTDIALOG_H
 All Classes Functions Enumerations