summaryrefslogtreecommitdiffabout
path: root/korganizer/koeventviewerdialog.cpp
authorzautrix <zautrix>2005-07-03 15:58:48 (UTC)
committer zautrix <zautrix>2005-07-03 15:58:48 (UTC)
commit9be5bd1c7e9ee829dd73f5b4a36a2f4331edf68e (patch) (unidiff)
tree4e5e6a4e6eac36df79891d61ed1d1cd76ed6105d /korganizer/koeventviewerdialog.cpp
parent0c632bafd2d058504118dc8957fc4808a784f548 (diff)
downloadkdepimpi-9be5bd1c7e9ee829dd73f5b4a36a2f4331edf68e.zip
kdepimpi-9be5bd1c7e9ee829dd73f5b4a36a2f4331edf68e.tar.gz
kdepimpi-9be5bd1c7e9ee829dd73f5b4a36a2f4331edf68e.tar.bz2
fixes
Diffstat (limited to 'korganizer/koeventviewerdialog.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koeventviewerdialog.cpp1
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"
33extern int globalFlagBlockAgenda; 33extern int globalFlagBlockAgenda;
34 34
35KOEventViewerDialog::KOEventViewerDialog(QWidget *parent,const char *name) 35KOEventViewerDialog::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
70KOEventViewerDialog::~KOEventViewerDialog() 71KOEventViewerDialog::~KOEventViewerDialog()
71{ 72{
72 //qDebug("-------~KOEventViewerDialog() "); 73 //qDebug("-------~KOEventViewerDialog() ");
73} 74}
74void KOEventViewerDialog::showMe() 75void 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}
92void KOEventViewerDialog::setMyFocus() 93void KOEventViewerDialog::setMyFocus()
93{ 94{
94 95
95 setActiveWindow(); 96 setActiveWindow();
96 mEventViewer->setFocus(); 97 mEventViewer->setFocus();
97 98
98} 99}
99void KOEventViewerDialog::print() 100void KOEventViewerDialog::print()
100{ 101{
101 mEventViewer->printMe(); 102 mEventViewer->printMe();