author | zautrix <zautrix> | 2005-03-27 13:04:11 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-27 13:04:11 (UTC) |
commit | 9e3e43aaca0986ae224c752d2d3a760661be61b6 (patch) (unidiff) | |
tree | 18295c0cc7177be6022a7abec716131f06b2a756 /kalarmd/alarmdialog.cpp | |
parent | 1800cf5f3af1f666dddcbfffe3171adcd467ae3d (diff) | |
download | kdepimpi-9e3e43aaca0986ae224c752d2d3a760661be61b6.zip kdepimpi-9e3e43aaca0986ae224c752d2d3a760661be61b6.tar.gz kdepimpi-9e3e43aaca0986ae224c752d2d3a760661be61b6.tar.bz2 |
fixes
-rw-r--r-- | kalarmd/alarmdialog.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kalarmd/alarmdialog.cpp b/kalarmd/alarmdialog.cpp index 7ead3b9..7b888ab 100644 --- a/kalarmd/alarmdialog.cpp +++ b/kalarmd/alarmdialog.cpp | |||
@@ -1,85 +1,89 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the KDE alarm daemon. | 2 | This file is part of the KDE alarm daemon. |
3 | Copyright (c) 2000 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2000 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | // $Id$ | 24 | // $Id$ |
25 | 25 | ||
26 | #include <qhbox.h> | 26 | #include <qhbox.h> |
27 | #include <qvbox.h> | 27 | #include <qvbox.h> |
28 | #include <qapp.h> | 28 | #include <qapp.h> |
29 | #include <qlabel.h> | 29 | #include <qlabel.h> |
30 | #include <qlayout.h> | 30 | #include <qlayout.h> |
31 | #include <qfile.h> | 31 | #include <qfile.h> |
32 | #include <qtimer.h> | 32 | #include <qtimer.h> |
33 | #include <qsound.h> | 33 | #include <qsound.h> |
34 | #include <qpushbutton.h> | 34 | #include <qpushbutton.h> |
35 | #ifndef DESKTOP_VERSION | ||
35 | #define protected public | 36 | #define protected public |
36 | #include <qspinbox.h> | 37 | #include <qspinbox.h> |
37 | #undef protected | 38 | #undef protected |
39 | #else | ||
40 | #include <qspinbox.h> | ||
41 | #endif | ||
38 | #include <stdlib.h> | 42 | #include <stdlib.h> |
39 | #ifndef _WIN32_ | 43 | #ifndef _WIN32_ |
40 | #include <unistd.h> | 44 | #include <unistd.h> |
41 | #include <sys/ioctl.h> | 45 | #include <sys/ioctl.h> |
42 | #endif | 46 | #endif |
43 | #include <stdio.h> | 47 | #include <stdio.h> |
44 | #include <fcntl.h> | 48 | #include <fcntl.h> |
45 | 49 | ||
46 | #ifndef DESKTOP_VERSION | 50 | #ifndef DESKTOP_VERSION |
47 | #include <qtopia/alarmserver.h> | 51 | #include <qtopia/alarmserver.h> |
48 | #include <qpe/resource.h> | 52 | #include <qpe/resource.h> |
49 | #include <qtopia/sound.h> | 53 | #include <qtopia/sound.h> |
50 | 54 | ||
51 | #endif | 55 | #endif |
52 | 56 | ||
53 | #include "alarmdialog.h" | 57 | #include "alarmdialog.h" |
54 | 58 | ||
55 | 59 | ||
56 | AlarmDialog::AlarmDialog(QWidget *parent,const char *name) | 60 | AlarmDialog::AlarmDialog(QWidget *parent,const char *name) |
57 | : QDialog (parent, name, true, Qt::WStyle_StaysOnTop ) | 61 | : QDialog (parent, name, true, Qt::WStyle_StaysOnTop ) |
58 | { | 62 | { |
59 | setCaption( "KO/Pi Alarm!" ); | 63 | setCaption( "KO/Pi Alarm!" ); |
60 | QVBoxLayout* layout = new QVBoxLayout( this); | 64 | QVBoxLayout* layout = new QVBoxLayout( this); |
61 | QLabel* l = new QLabel("The following event triggered alarm:",this); | 65 | QLabel* l = new QLabel("The following event triggered alarm:",this); |
62 | layout->addWidget ( l ); | 66 | layout->addWidget ( l ); |
63 | l->setAlignment( AlignCenter); | 67 | l->setAlignment( AlignCenter); |
64 | mMessage = new QLabel ( " ", this ); | 68 | mMessage = new QLabel ( " ", this ); |
65 | int fs = 18; | 69 | int fs = 18; |
66 | int fs2 = 12; | 70 | int fs2 = 12; |
67 | if ( QApplication::desktop()->width() < 480 ) { | 71 | if ( QApplication::desktop()->width() < 480 ) { |
68 | setMaximumSize(220, 260); | 72 | setMaximumSize(220, 260); |
69 | fs2 = 10; | 73 | fs2 = 10; |
70 | } | 74 | } |
71 | else { | 75 | else { |
72 | setMaximumSize(440, 440); | 76 | setMaximumSize(440, 440); |
73 | } | 77 | } |
74 | layout->setSpacing( 3 ); | 78 | layout->setSpacing( 3 ); |
75 | layout->setMargin( 3 ); | 79 | layout->setMargin( 3 ); |
76 | QFont fo = QApplication::font(); | 80 | QFont fo = QApplication::font(); |
77 | fo.setBold( true ); | 81 | fo.setBold( true ); |
78 | fo.setPointSize( fs2 ); | 82 | fo.setPointSize( fs2 ); |
79 | l->setFont( fo ); | 83 | l->setFont( fo ); |
80 | fo.setPointSize( fs ); | 84 | fo.setPointSize( fs ); |
81 | mMessage->setFont(fo ); | 85 | mMessage->setFont(fo ); |
82 | mMessage->setAlignment( AlignCenter); | 86 | mMessage->setAlignment( AlignCenter); |
83 | layout->addWidget ( mMessage ); | 87 | layout->addWidget ( mMessage ); |
84 | mMissedAlarms= new QLabel ( "(No missed Alarms)", this ); | 88 | mMissedAlarms= new QLabel ( "(No missed Alarms)", this ); |
85 | mMissedAlarms->setAlignment( AlignCenter); | 89 | mMissedAlarms->setAlignment( AlignCenter); |