Diffstat (limited to 'korganizer/koeventviewerdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/koeventviewerdialog.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp index 02f13c7..0763825 100644 --- a/korganizer/koeventviewerdialog.cpp +++ b/korganizer/koeventviewerdialog.cpp | |||
@@ -6,96 +6,97 @@ | |||
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 | 19 | ||
20 | #include <klocale.h> | 20 | #include <klocale.h> |
21 | 21 | ||
22 | #include <libkcal/event.h> | 22 | #include <libkcal/event.h> |
23 | #include <qtimer.h> | 23 | #include <qtimer.h> |
24 | #include <qpushbutton.h> | 24 | #include <qpushbutton.h> |
25 | 25 | ||
26 | #include "koeventviewer.h" | 26 | #include "koeventviewer.h" |
27 | #include <kmessagebox.h> | 27 | #include <kmessagebox.h> |
28 | #include "koprefs.h" | 28 | #include "koprefs.h" |
29 | #include <libkcal/todo.h> | 29 | #include <libkcal/todo.h> |
30 | #include "qapp.h" | 30 | #include "qapp.h" |
31 | 31 | ||
32 | #include "koeventviewerdialog.h" | 32 | #include "koeventviewerdialog.h" |
33 | extern int globalFlagBlockAgenda; | 33 | extern int globalFlagBlockAgenda; |
34 | 34 | ||
35 | KOEventViewerDialog::KOEventViewerDialog(QWidget *parent,const char *name) | 35 | KOEventViewerDialog::KOEventViewerDialog(QWidget *parent,const char *name) |
36 | : KDialogBase(parent,name, | 36 | : KDialogBase(parent,name, |
37 | #ifndef DESKTOP_VERSION | 37 | #ifndef DESKTOP_VERSION |
38 | true , | 38 | true , |
39 | #else | 39 | #else |
40 | false, | 40 | false, |
41 | #endif | 41 | #endif |
42 | i18n("Event Viewer"),Ok|User1|Close,Close, false, i18n("Agenda")) | 42 | i18n("Event Viewer"),Ok|User1|Close,Close, false, i18n("Agenda")) |
43 | { | 43 | { |
44 | sendSignalViewerClosed = true; | 44 | sendSignalViewerClosed = true; |
45 | mEventViewer = new KOEventViewer(this); | 45 | mEventViewer = new KOEventViewer(this); |
46 | mEventViewer->setFont( KOPrefs::instance()->mEventViewFont ); | 46 | mEventViewer->setFont( KOPrefs::instance()->mEventViewFont ); |
47 | setMainWidget(mEventViewer); | 47 | setMainWidget(mEventViewer); |
48 | setButtonText(Ok, i18n("Edit") ); | 48 | setButtonText(Ok, i18n("Edit") ); |
49 | 49 | ||
50 | QObject::connect(findButton( Ok ),SIGNAL(clicked()), | 50 | QObject::connect(findButton( Ok ),SIGNAL(clicked()), |
51 | SLOT(editIncidence())); | 51 | SLOT(editIncidence())); |
52 | QObject::connect(this,SIGNAL(user1Clicked()), | 52 | QObject::connect(this,SIGNAL(user1Clicked()), |
53 | SLOT(showIncidence())); | 53 | SLOT(showIncidence())); |
54 | connect( mEventViewer, SIGNAL( showIncidence( QString ) ),SIGNAL( showIncidence( QString ) )); | ||
54 | mIncidence = 0; | 55 | mIncidence = 0; |
55 | // TODO: Set a sensible size (based on the content?). | 56 | // TODO: Set a sensible size (based on the content?). |
56 | //showMaximized(); | 57 | //showMaximized(); |
57 | //qDebug("++++++++++++KOEventViewerDialog() "); | 58 | //qDebug("++++++++++++KOEventViewerDialog() "); |
58 | // if ( KOPrefs::instance()->mCompactDialogs ) { | 59 | // if ( KOPrefs::instance()->mCompactDialogs ) { |
59 | // setFixedSize( 240,284 ); | 60 | // setFixedSize( 240,284 ); |
60 | // move( 0, 15 ); | 61 | // move( 0, 15 ); |
61 | // } else { | 62 | // } else { |
62 | // setMinimumSize(300,200); | 63 | // setMinimumSize(300,200); |
63 | // resize(320,300); | 64 | // resize(320,300); |
64 | // } | 65 | // } |
65 | mSyncMode = false; | 66 | mSyncMode = false; |
66 | mSyncResult = 0; | 67 | mSyncResult = 0; |
67 | 68 | ||
68 | } | 69 | } |
69 | 70 | ||
70 | KOEventViewerDialog::~KOEventViewerDialog() | 71 | KOEventViewerDialog::~KOEventViewerDialog() |
71 | { | 72 | { |
72 | //qDebug("-------~KOEventViewerDialog() "); | 73 | //qDebug("-------~KOEventViewerDialog() "); |
73 | } | 74 | } |
74 | void KOEventViewerDialog::showMe() | 75 | void KOEventViewerDialog::showMe() |
75 | { | 76 | { |
76 | 77 | ||
77 | #ifdef DESKTOP_VERSION | 78 | #ifdef DESKTOP_VERSION |
78 | int x,y,w,h; | 79 | int x,y,w,h; |
79 | x = geometry().x(); | 80 | x = geometry().x(); |
80 | y = geometry().y(); | 81 | y = geometry().y(); |
81 | w = width(); | 82 | w = width(); |
82 | h = height(); | 83 | h = height(); |
83 | show(); | 84 | show(); |
84 | setGeometry(x,y,w,h); | 85 | setGeometry(x,y,w,h); |
85 | raise(); | 86 | raise(); |
86 | #else | 87 | #else |
87 | showMaximized(); | 88 | showMaximized(); |
88 | #endif | 89 | #endif |
89 | QTimer::singleShot( 1, this, SLOT ( setMyFocus() ) ); | 90 | QTimer::singleShot( 1, this, SLOT ( setMyFocus() ) ); |
90 | 91 | ||
91 | } | 92 | } |
92 | void KOEventViewerDialog::setMyFocus() | 93 | void KOEventViewerDialog::setMyFocus() |
93 | { | 94 | { |
94 | 95 | ||
95 | setActiveWindow(); | 96 | setActiveWindow(); |
96 | mEventViewer->setFocus(); | 97 | mEventViewer->setFocus(); |
97 | 98 | ||
98 | } | 99 | } |
99 | void KOEventViewerDialog::print() | 100 | void KOEventViewerDialog::print() |
100 | { | 101 | { |
101 | mEventViewer->printMe(); | 102 | mEventViewer->printMe(); |