summaryrefslogtreecommitdiffabout
path: root/korganizer/kotodoeditor.cpp
Unidiff
Diffstat (limited to 'korganizer/kotodoeditor.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/kotodoeditor.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/korganizer/kotodoeditor.cpp b/korganizer/kotodoeditor.cpp
index 5513e8b..9073bca 100644
--- a/korganizer/kotodoeditor.cpp
+++ b/korganizer/kotodoeditor.cpp
@@ -14,96 +14,98 @@
14 GNU General Public License for more details. 14 GNU General Public License for more details.
15 15
16 You should have received a copy of the GNU General Public License 16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software 17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 19
20 As a special exception, permission is given to link this program 20 As a special exception, permission is given to link this program
21 with any edition of Qt, and distribute the resulting executable, 21 with any edition of Qt, and distribute the resulting executable,
22 without including the source code for Qt in the source distribution. 22 without including the source code for Qt in the source distribution.
23*/ 23*/
24 24
25#include <qtooltip.h> 25#include <qtooltip.h>
26#include <qframe.h> 26#include <qframe.h>
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 if ( QApplication::desktop()->height() <= 240 )
63 hideButtons();
62} 64}
63 65
64KOTodoEditor::~KOTodoEditor() 66KOTodoEditor::~KOTodoEditor()
65{ 67{
66 emit dialogClose( mTodo ); 68 emit dialogClose( mTodo );
67} 69}
68 70
69void KOTodoEditor::init() 71void KOTodoEditor::init()
70{ 72{
71 setupGeneral(); 73 setupGeneral();
72 setupAttendeesTab(); 74 setupAttendeesTab();
73 setupRecurrence(); 75 setupRecurrence();
74 connect(mGeneral,SIGNAL(datesChecked()),this ,SLOT(checkRecurrence())); 76 connect(mGeneral,SIGNAL(datesChecked()),this ,SLOT(checkRecurrence()));
75 mRecurrence->setDateTimeStr( i18n("<i>The recurrence is computed from the start datetime!</i>") ); 77 mRecurrence->setDateTimeStr( i18n("<i>The recurrence is computed from the start datetime!</i>") );
76} 78}
77void KOTodoEditor::setupRecurrence() 79void KOTodoEditor::setupRecurrence()
78{ 80{
79 QFrame *topFrame = addPage( i18n("Recurrence") ); 81 QFrame *topFrame = addPage( i18n("Recurrence") );
80 QBoxLayout *topLayout = new QVBoxLayout( topFrame ); 82 QBoxLayout *topLayout = new QVBoxLayout( topFrame );
81 83
82 mRecurrence = new KOEditorRecurrence( topFrame ); 84 mRecurrence = new KOEditorRecurrence( topFrame );
83 topLayout->addWidget( mRecurrence ); 85 topLayout->addWidget( mRecurrence );
84} 86}
85 87
86void KOTodoEditor::setCategories( QString s ) 88void KOTodoEditor::setCategories( QString s )
87{ 89{
88 mGeneral->setCategories(s); 90 mGeneral->setCategories(s);
89} 91}
90void KOTodoEditor::setSecrecy( int sec ) 92void KOTodoEditor::setSecrecy( int sec )
91{ 93{
92 mGeneral->setSecrecy( sec ); 94 mGeneral->setSecrecy( sec );
93} 95}
94void KOTodoEditor::reload() 96void KOTodoEditor::reload()
95{ 97{
96 if ( mTodo ) readTodo( mTodo ); 98 if ( mTodo ) readTodo( mTodo );
97} 99}
98 100
99void KOTodoEditor::setupGeneral() 101void KOTodoEditor::setupGeneral()
100{ 102{
101 mGeneral = new KOEditorGeneralTodo(this); 103 mGeneral = new KOEditorGeneralTodo(this);
102 connect ( mGeneral, SIGNAL ( allAccepted() ), this, SLOT ( slotOk () ) ); 104 connect ( mGeneral, SIGNAL ( allAccepted() ), this, SLOT ( slotOk () ) );
103 105
104 // connect(mGeneral,SIGNAL(openCategoryDialog()),mCategoryDialog,SLOT(show())); 106 // connect(mGeneral,SIGNAL(openCategoryDialog()),mCategoryDialog,SLOT(show()));
105 //connect(mCategoryDialog, SIGNAL(categoriesSelected(const QString &)), 107 //connect(mCategoryDialog, SIGNAL(categoriesSelected(const QString &)),
106 // mGeneral,SLOT(setCategories(const QString &))); 108 // mGeneral,SLOT(setCategories(const QString &)));
107 109
108 if (KOPrefs::instance()->mCompactDialogs) { 110 if (KOPrefs::instance()->mCompactDialogs) {
109 QFrame *topFrame = addPage(i18n("General")); 111 QFrame *topFrame = addPage(i18n("General"));