summaryrefslogtreecommitdiffabout
path: root/korganizer/kotodoeditor.cpp
Unidiff
Diffstat (limited to 'korganizer/kotodoeditor.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kotodoeditor.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/korganizer/kotodoeditor.cpp b/korganizer/kotodoeditor.cpp
index 51e2524..6a05cc8 100644
--- a/korganizer/kotodoeditor.cpp
+++ b/korganizer/kotodoeditor.cpp
@@ -27,96 +27,97 @@
27#include <qpixmap.h> 27#include <qpixmap.h>
28#include <qlayout.h> 28#include <qlayout.h>
29#include <qhbox.h> 29#include <qhbox.h>
30#include <qdir.h> 30#include <qdir.h>
31#include <qdatetime.h> 31#include <qdatetime.h>
32#include <qapplication.h> 32#include <qapplication.h>
33#include <qtabwidget.h> 33#include <qtabwidget.h>
34 34
35#include <kiconloader.h> 35#include <kiconloader.h>
36#include <klocale.h> 36#include <klocale.h>
37#include <kfiledialog.h> 37#include <kfiledialog.h>
38#include <kstandarddirs.h> 38#include <kstandarddirs.h>
39#include <kmessagebox.h> 39#include <kmessagebox.h>
40 40
41#include <libkdepim/categoryselectdialog.h> 41#include <libkdepim/categoryselectdialog.h>
42#include <libkcal/calendarlocal.h> 42#include <libkcal/calendarlocal.h>
43#include <libkcal/calendarresources.h> 43#include <libkcal/calendarresources.h>
44#include <libkcal/resourcecalendar.h> 44#include <libkcal/resourcecalendar.h>
45#include <libkcal/icalformat.h> 45#include <libkcal/icalformat.h>
46#include <kresources/resourceselectdialog.h> 46#include <kresources/resourceselectdialog.h>
47#include <libkdepim/kdateedit.h> 47#include <libkdepim/kdateedit.h>
48 48
49#include "koprefs.h" 49#include "koprefs.h"
50#include "kolocationbox.h" 50#include "kolocationbox.h"
51 51
52#include "kotodoeditor.h" 52#include "kotodoeditor.h"
53extern int globalFlagBlockAgenda; 53extern int globalFlagBlockAgenda;
54 54
55KOTodoEditor::KOTodoEditor( Calendar *calendar, QWidget *parent ) : 55KOTodoEditor::KOTodoEditor( Calendar *calendar, QWidget *parent ) :
56 KOIncidenceEditor( i18n("Edit To-Do"), calendar, parent ) 56 KOIncidenceEditor( i18n("Edit To-Do"), calendar, parent )
57{ 57{
58 mTodo = 0; 58 mTodo = 0;
59 mRelatedTodo = 0; 59 mRelatedTodo = 0;
60 findButton(User1)->hide(); 60 findButton(User1)->hide();
61 init(); 61 init();
62} 62}
63 63
64KOTodoEditor::~KOTodoEditor() 64KOTodoEditor::~KOTodoEditor()
65{ 65{
66 emit dialogClose( mTodo ); 66 emit dialogClose( mTodo );
67} 67}
68 68
69void KOTodoEditor::init() 69void KOTodoEditor::init()
70{ 70{
71 setupGeneral(); 71 setupGeneral();
72 setupAttendeesTab(); 72 setupAttendeesTab();
73 setupRecurrence(); 73 setupRecurrence();
74 connect(mGeneral,SIGNAL(datesChecked()),this ,SLOT(checkRecurrence())); 74 connect(mGeneral,SIGNAL(datesChecked()),this ,SLOT(checkRecurrence()));
75 mRecurrence->setDateTimeStr( i18n("<i>The recurrence is computed from the start datetime!</i>") );
75} 76}
76void KOTodoEditor::setupRecurrence() 77void KOTodoEditor::setupRecurrence()
77{ 78{
78 QFrame *topFrame = addPage( i18n("Recurrence") ); 79 QFrame *topFrame = addPage( i18n("Recurrence") );
79 QBoxLayout *topLayout = new QVBoxLayout( topFrame ); 80 QBoxLayout *topLayout = new QVBoxLayout( topFrame );
80 81
81 mRecurrence = new KOEditorRecurrence( topFrame ); 82 mRecurrence = new KOEditorRecurrence( topFrame );
82 topLayout->addWidget( mRecurrence ); 83 topLayout->addWidget( mRecurrence );
83} 84}
84 85
85void KOTodoEditor::setCategories( QString s ) 86void KOTodoEditor::setCategories( QString s )
86{ 87{
87 mGeneral->setCategories(s); 88 mGeneral->setCategories(s);
88} 89}
89void KOTodoEditor::setSecrecy( int sec ) 90void KOTodoEditor::setSecrecy( int sec )
90{ 91{
91 mGeneral->setSecrecy( sec ); 92 mGeneral->setSecrecy( sec );
92} 93}
93void KOTodoEditor::reload() 94void KOTodoEditor::reload()
94{ 95{
95 if ( mTodo ) readTodo( mTodo ); 96 if ( mTodo ) readTodo( mTodo );
96} 97}
97 98
98void KOTodoEditor::setupGeneral() 99void KOTodoEditor::setupGeneral()
99{ 100{
100 mGeneral = new KOEditorGeneralTodo(this); 101 mGeneral = new KOEditorGeneralTodo(this);
101 connect ( mGeneral, SIGNAL ( allAccepted() ), this, SLOT ( slotOk () ) ); 102 connect ( mGeneral, SIGNAL ( allAccepted() ), this, SLOT ( slotOk () ) );
102 103
103 // connect(mGeneral,SIGNAL(openCategoryDialog()),mCategoryDialog,SLOT(show())); 104 // connect(mGeneral,SIGNAL(openCategoryDialog()),mCategoryDialog,SLOT(show()));
104 //connect(mCategoryDialog, SIGNAL(categoriesSelected(const QString &)), 105 //connect(mCategoryDialog, SIGNAL(categoriesSelected(const QString &)),
105 // mGeneral,SLOT(setCategories(const QString &))); 106 // mGeneral,SLOT(setCategories(const QString &)));
106 107
107 if (KOPrefs::instance()->mCompactDialogs) { 108 if (KOPrefs::instance()->mCompactDialogs) {
108 QFrame *topFrame = addPage(i18n("General")); 109 QFrame *topFrame = addPage(i18n("General"));
109 110
110 QBoxLayout *topLayout = new QVBoxLayout(topFrame); 111 QBoxLayout *topLayout = new QVBoxLayout(topFrame);
111 if ( QApplication::desktop()->width() < 480 ) { 112 if ( QApplication::desktop()->width() < 480 ) {
112 topLayout->setMargin(1); 113 topLayout->setMargin(1);
113 topLayout->setSpacing(1); 114 topLayout->setSpacing(1);
114 } else { 115 } else {
115 topLayout->setMargin(marginHint()-1); 116 topLayout->setMargin(marginHint()-1);
116 topLayout->setSpacing(spacingHint()-1); 117 topLayout->setSpacing(spacingHint()-1);
117 } 118 }
118 mGeneral->initHeader(topFrame,topLayout); 119 mGeneral->initHeader(topFrame,topLayout);
119 mGeneral->initTime(topFrame,topLayout); 120 mGeneral->initTime(topFrame,topLayout);
120 mGeneral->initAlarm(topFrame,topLayout); 121 mGeneral->initAlarm(topFrame,topLayout);
121 mGeneral->enableAlarm( false ); 122 mGeneral->enableAlarm( false );
122 123