summaryrefslogtreecommitdiffabout
path: root/korganizer/koincidenceeditor.cpp
Unidiff
Diffstat (limited to 'korganizer/koincidenceeditor.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koincidenceeditor.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/korganizer/koincidenceeditor.cpp b/korganizer/koincidenceeditor.cpp
index 236f6f9..2060ea1 100644
--- a/korganizer/koincidenceeditor.cpp
+++ b/korganizer/koincidenceeditor.cpp
@@ -1,54 +1,56 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2001 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#include <qtooltip.h> 24#include <qtooltip.h>
25#include <qframe.h> 25#include <q3frame.h>
26#include <qpixmap.h> 26#include <qpixmap.h>
27#include <qlayout.h> 27#include <qlayout.h>
28#include <qwidgetstack.h> 28#include <q3widgetstack.h>
29#include <qdatetime.h> 29#include <qdatetime.h>
30#include <qdir.h> 30#include <qdir.h>
31//Added by qt3to4:
32#include <Q3VBoxLayout>
31 33
32#include <kdebug.h> 34#include <kdebug.h>
33#include <klocale.h> 35#include <klocale.h>
34#include <kstandarddirs.h> 36#include <kstandarddirs.h>
35#include <kmessagebox.h> 37#include <kmessagebox.h>
36#include <kfiledialog.h> 38#include <kfiledialog.h>
37 39
38#include <libkdepim/categoryselectdialog.h> 40#include <libkdepim/categoryselectdialog.h>
39#include <libkdepim/kinputdialog.h> 41#include <libkdepim/kinputdialog.h>
40 42
41#include <libkcal/calendarlocal.h> 43#include <libkcal/calendarlocal.h>
42#include <libkcal/icalformat.h> 44#include <libkcal/icalformat.h>
43 45
44#include "koprefs.h" 46#include "koprefs.h"
45 47
46#include "koincidenceeditor.h" 48#include "koincidenceeditor.h"
47 49
48KOIncidenceEditor::KOIncidenceEditor( const QString &caption, 50KOIncidenceEditor::KOIncidenceEditor( const QString &caption,
49 Calendar *calendar, QWidget *parent ) : 51 Calendar *calendar, QWidget *parent ) :
50 KDialogBase( Tabbed, caption, Ok | Apply | Cancel |/* Default | */User1, Ok, 52 KDialogBase( Tabbed, caption, Ok | Apply | Cancel |/* Default | */User1, Ok,
51 parent, caption, true, false ), 53 parent, caption, true, false ),
52 mSaveTemplateDialog( 0 ) 54 mSaveTemplateDialog( 0 )
53{ 55{
54 mCalendar = calendar; 56 mCalendar = calendar;
@@ -61,51 +63,51 @@ KOIncidenceEditor::KOIncidenceEditor( const QString &caption,
61// showButton( Apply, false ); 63// showButton( Apply, false );
62// } else { 64// } else {
63 showButton( Apply, false ); 65 showButton( Apply, false );
64 saveTemplateText = i18n("Ok+Agenda"); 66 saveTemplateText = i18n("Ok+Agenda");
65 // } 67 // }
66 setButtonText( User1, saveTemplateText ); 68 setButtonText( User1, saveTemplateText );
67 69
68 //mCategoryDialog = new KPIM::CategorySelectDialog( KOPrefs::instance(), this ); 70 //mCategoryDialog = new KPIM::CategorySelectDialog( KOPrefs::instance(), this );
69 // KOGlobals::fitDialogToScreen( mCategoryDialog ); 71 // KOGlobals::fitDialogToScreen( mCategoryDialog );
70 72
71 //connect(mCategoryDialog,SIGNAL(editCategories()),SIGNAL(editCategories())); 73 //connect(mCategoryDialog,SIGNAL(editCategories()),SIGNAL(editCategories()));
72 74
73 //connect( this, SIGNAL( defaultClicked() ), SLOT( slotLoadTemplate() ) ); 75 //connect( this, SIGNAL( defaultClicked() ), SLOT( slotLoadTemplate() ) );
74 // connect( this, SIGNAL( user1Clicked() ), SLOT( slotSaveTemplate() ) ); 76 // connect( this, SIGNAL( user1Clicked() ), SLOT( slotSaveTemplate() ) );
75 connect( this, SIGNAL( user1Clicked() ), SLOT( slotShowIncidence() ) ); 77 connect( this, SIGNAL( user1Clicked() ), SLOT( slotShowIncidence() ) );
76} 78}
77 79
78KOIncidenceEditor::~KOIncidenceEditor() 80KOIncidenceEditor::~KOIncidenceEditor()
79{ 81{
80 //delete mCategoryDialog; 82 //delete mCategoryDialog;
81} 83}
82 84
83void KOIncidenceEditor::setupAttendeesTab() 85void KOIncidenceEditor::setupAttendeesTab()
84{ 86{
85 QFrame *topFrame = addPage(i18n("Attendees")); 87 Q3Frame *topFrame = addPage(i18n("Attendees"));
86 88
87 QBoxLayout *topLayout = new QVBoxLayout(topFrame); 89 Q3BoxLayout *topLayout = new Q3VBoxLayout(topFrame);
88 90
89 mDetails = new KOEditorDetails(spacingHint()-2,topFrame); 91 mDetails = new KOEditorDetails(spacingHint()-2,topFrame);
90 topLayout->addWidget(mDetails); 92 topLayout->addWidget(mDetails);
91} 93}
92 94
93void KOIncidenceEditor::alarmWarning() 95void KOIncidenceEditor::alarmWarning()
94{ 96{
95 KMessageBox::information( 0, i18n("The alarm for this calendar\nis currently disabled!\nEnable it in resource settings."), i18n("Alarm disabled warning")); 97 KMessageBox::information( 0, i18n("The alarm for this calendar\nis currently disabled!\nEnable it in resource settings."), i18n("Alarm disabled warning"));
96 98
97} 99}
98 100
99void KOIncidenceEditor::slotApply() 101void KOIncidenceEditor::slotApply()
100{ 102{
101 processInput( false ); 103 processInput( false );
102} 104}
103void KOIncidenceEditor::accept() 105void KOIncidenceEditor::accept()
104{ 106{
105 slotOk(); 107 slotOk();
106} 108}
107void KOIncidenceEditor::slotOk() 109void KOIncidenceEditor::slotOk()
108{ 110{
109 if ( processInput( false ) ) QDialog::accept(); 111 if ( processInput( false ) ) QDialog::accept();
110} 112}
111 113