summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-02-19 20:47:24 (UTC)
committer zautrix <zautrix>2005-02-19 20:47:24 (UTC)
commitfc2d01e5acc939719f01b9dbe5696d47162514b1 (patch) (unidiff)
tree9a04926c8cb54e54e4c0bf5f47a4f47110f24bfd
parent6f4d42c16c87668279db1e0a0d3e4f4aad5b84f6 (diff)
downloadkdepimpi-fc2d01e5acc939719f01b9dbe5696d47162514b1.zip
kdepimpi-fc2d01e5acc939719f01b9dbe5696d47162514b1.tar.gz
kdepimpi-fc2d01e5acc939719f01b9dbe5696d47162514b1.tar.bz2
fix focus
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koeditordetails.cpp7
-rw-r--r--korganizer/kotodoeditor.cpp16
2 files changed, 12 insertions, 11 deletions
diff --git a/korganizer/koeditordetails.cpp b/korganizer/koeditordetails.cpp
index ef8025b..2fd13bd 100644
--- a/korganizer/koeditordetails.cpp
+++ b/korganizer/koeditordetails.cpp
@@ -37,172 +37,173 @@
37#include <kstandarddirs.h> 37#include <kstandarddirs.h>
38#include <kmessagebox.h> 38#include <kmessagebox.h>
39#ifndef KORG_NOKABC 39#ifndef KORG_NOKABC
40 40
41#ifdef DESKTOP_VERSION 41#ifdef DESKTOP_VERSION
42#include <kabc/addresseedialog.h> 42#include <kabc/addresseedialog.h>
43#else //DESKTOP_VERSION 43#else //DESKTOP_VERSION
44#include <externalapphandler.h> 44#include <externalapphandler.h>
45#endif //DESKTOP_VERSION 45#endif //DESKTOP_VERSION
46 46
47#endif 47#endif
48 48
49#include <libkcal/incidence.h> 49#include <libkcal/incidence.h>
50 50
51#include "koprefs.h" 51#include "koprefs.h"
52 52
53#include "koeditordetails.h" 53#include "koeditordetails.h"
54 54
55template <> 55template <>
56CustomListViewItem<class Attendee *>::~CustomListViewItem() 56CustomListViewItem<class Attendee *>::~CustomListViewItem()
57{ 57{
58 delete mData; 58 delete mData;
59} 59}
60 60
61template <> 61template <>
62void CustomListViewItem<class Attendee *>::updateItem() 62void CustomListViewItem<class Attendee *>::updateItem()
63{ 63{
64 setText(0,mData->name()); 64 setText(0,mData->name());
65 setText(1,mData->email()); 65 setText(1,mData->email());
66 setText(2,mData->roleStr()); 66 setText(2,mData->roleStr());
67 setText(3,mData->statusStr()); 67 setText(3,mData->statusStr());
68 if (mData->RSVP() && !mData->email().isEmpty()) 68 if (mData->RSVP() && !mData->email().isEmpty())
69 setPixmap(4,SmallIcon("mailappt")); 69 setPixmap(4,SmallIcon("mailappt"));
70 else 70 else
71 setPixmap(4,SmallIcon("nomailappt")); 71 setPixmap(4,SmallIcon("nomailappt"));
72} 72}
73 73
74 74
75KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name) 75KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name)
76 : QWidget( parent, name), mDisableItemUpdate( false ) 76 : QWidget( parent, name), mDisableItemUpdate( false )
77{ 77{
78 QGridLayout *topLayout = new QGridLayout(this); 78 QGridLayout *topLayout = new QGridLayout(this);
79 topLayout->setSpacing(spacing); 79 topLayout->setSpacing(spacing);
80 80
81 QString organizer = KOPrefs::instance()->email(); 81 QString organizer = KOPrefs::instance()->email();
82 mOrganizerLabel = new QLabel(i18n("Organizer: %1").arg(organizer),this); 82 mOrganizerLabel = new QLabel(i18n("Organizer: %1").arg(organizer),this);
83 83
84 mListView = new KListView(this,"mListView"); 84 mListView = new KListView(this,"mListView");
85 mListView->addColumn(i18n("Name"),180); 85 mListView->addColumn(i18n("Name"),180);
86 mListView->addColumn(i18n("Email"),180); 86 mListView->addColumn(i18n("Email"),180);
87 mListView->addColumn(i18n("Role"),60); 87 mListView->addColumn(i18n("Role"),60);
88 mListView->addColumn(i18n("Status"),100); 88 mListView->addColumn(i18n("Status"),100);
89 mListView->addColumn(i18n("RSVP"),35); 89 mListView->addColumn(i18n("RSVP"),35);
90 if ( KOPrefs::instance()->mCompactDialogs ) { 90 if ( KOPrefs::instance()->mCompactDialogs ) {
91 //mListView->setFixedHeight(78); 91 //mListView->setFixedHeight(78);
92 } 92 }
93 mListView->setAllColumnsShowFocus (true ); 93 mListView->setAllColumnsShowFocus (true );
94 //mListView->setSingleClick( true ); 94 //mListView->setSingleClick( true );
95 connect(mListView,SIGNAL(selectionChanged(QListViewItem *)), 95 connect(mListView,SIGNAL(selectionChanged(QListViewItem *)),
96 SLOT(updateAttendeeInput())); 96 SLOT(updateAttendeeInput()));
97 97
98 connect(mListView,SIGNAL(executed(QListViewItem * ,const QPoint&, int )), 98 connect(mListView,SIGNAL(executed(QListViewItem * ,const QPoint&, int )),
99 SLOT(itemClicked(QListViewItem * ,const QPoint& , int ))); 99 SLOT(itemClicked(QListViewItem * ,const QPoint& , int )));
100 100
101 mRsvpButton = new QCheckBox(this);
102 mRsvpButton->setText(i18n("Request response"));
103 mAddressBookButton = new QPushButton(i18n("Address &Book..."),this);
101 QLabel *attendeeLabel = new QLabel(this); 104 QLabel *attendeeLabel = new QLabel(this);
102 attendeeLabel->setText(i18n("Name:")); 105 attendeeLabel->setText(i18n("Name:"));
103 attendeeLabel->setFixedSize( attendeeLabel->sizeHint() ); 106 attendeeLabel->setFixedSize( attendeeLabel->sizeHint() );
104 mNameEdit = new QLineEdit(this); 107 mNameEdit = new QLineEdit(this);
105 connect(mNameEdit,SIGNAL(textChanged(const QString &)), 108 connect(mNameEdit,SIGNAL(textChanged(const QString &)),
106 SLOT(updateAttendeeItem())); 109 SLOT(updateAttendeeItem()));
107 110
108 mUidEdit = new QLineEdit(0); 111 mUidEdit = new QLineEdit(0);
109 mUidEdit->setText(""); 112 mUidEdit->setText("");
110 113
111 QLabel *emailLabel = new QLabel(this); 114 QLabel *emailLabel = new QLabel(this);
112 emailLabel->setText(i18n("Email:")); 115 emailLabel->setText(i18n("Email:"));
113 mEmailEdit = new QLineEdit(this); 116 mEmailEdit = new QLineEdit(this);
114 connect(mEmailEdit,SIGNAL(textChanged(const QString &)), 117 connect(mEmailEdit,SIGNAL(textChanged(const QString &)),
115 SLOT(updateAttendeeItem())); 118 SLOT(updateAttendeeItem()));
116 119
117 QLabel *attendeeRoleLabel = new QLabel(this); 120 QLabel *attendeeRoleLabel = new QLabel(this);
118 attendeeRoleLabel->setText(i18n("Role:")); 121 attendeeRoleLabel->setText(i18n("Role:"));
119 mRoleCombo = new QComboBox(false,this); 122 mRoleCombo = new QComboBox(false,this);
120 mRoleCombo->insertStringList(Attendee::roleList()); 123 mRoleCombo->insertStringList(Attendee::roleList());
121 connect(mRoleCombo,SIGNAL(activated(int)),SLOT(updateAttendeeItem())); 124 connect(mRoleCombo,SIGNAL(activated(int)),SLOT(updateAttendeeItem()));
122 125
123 QLabel *statusLabel = new QLabel(this); 126 QLabel *statusLabel = new QLabel(this);
124 statusLabel->setText( i18n("Status:") ); 127 statusLabel->setText( i18n("Status:") );
125 128
126 mStatusCombo = new QComboBox(false,this); 129 mStatusCombo = new QComboBox(false,this);
127 mStatusCombo->insertStringList(Attendee::statusList()); 130 mStatusCombo->insertStringList(Attendee::statusList());
128 connect(mStatusCombo,SIGNAL(activated(int)),SLOT(updateAttendeeItem())); 131 connect(mStatusCombo,SIGNAL(activated(int)),SLOT(updateAttendeeItem()));
129 132
130 mRsvpButton = new QCheckBox(this); 133
131 mRsvpButton->setText(i18n("Request response"));
132 connect(mRsvpButton,SIGNAL(clicked()),SLOT(updateAttendeeItem())); 134 connect(mRsvpButton,SIGNAL(clicked()),SLOT(updateAttendeeItem()));
133 QWidget *buttonBox = new QWidget(this); 135 QWidget *buttonBox = new QWidget(this);
134 QVBoxLayout *buttonLayout = new QVBoxLayout(buttonBox); 136 QVBoxLayout *buttonLayout = new QVBoxLayout(buttonBox);
135 137
136 QPushButton *newButton = new QPushButton(i18n("&New"),buttonBox); 138 QPushButton *newButton = new QPushButton(i18n("&New"),buttonBox);
137 buttonLayout->addWidget(newButton); 139 buttonLayout->addWidget(newButton);
138 connect(newButton,SIGNAL(clicked()),SLOT(addNewAttendee())); 140 connect(newButton,SIGNAL(clicked()),SLOT(addNewAttendee()));
139 141
140 mRemoveButton = new QPushButton(i18n("&Remove"),buttonBox); 142 mRemoveButton = new QPushButton(i18n("&Remove"),buttonBox);
141 buttonLayout->addWidget(mRemoveButton); 143 buttonLayout->addWidget(mRemoveButton);
142 connect(mRemoveButton, SIGNAL(clicked()),SLOT(removeAttendee())); 144 connect(mRemoveButton, SIGNAL(clicked()),SLOT(removeAttendee()));
143 145
144 mAddressBookButton = new QPushButton(i18n("Address &Book..."),this);
145 // buttonLayout->addWidget(mAddressBookButton); 146 // buttonLayout->addWidget(mAddressBookButton);
146 connect(mAddressBookButton,SIGNAL(clicked()),SLOT(openAddressBook())); 147 connect(mAddressBookButton,SIGNAL(clicked()),SLOT(openAddressBook()));
147 //mRoleCombo->setFixedSize( mRoleCombo->sizeHint () ); 148 //mRoleCombo->setFixedSize( mRoleCombo->sizeHint () );
148 149
149 if (qApp->desktop()->width() < 640 ) { 150 if (qApp->desktop()->width() < 640 ) {
150 if ( qApp->desktop()->width() < 300 ) 151 if ( qApp->desktop()->width() < 300 )
151 topLayout->setSpacing(1); 152 topLayout->setSpacing(1);
152 ;//mListView->setFixedHeight(80); 153 ;//mListView->setFixedHeight(80);
153 topLayout->addMultiCellWidget(mOrganizerLabel,0,0,0,3); 154 topLayout->addMultiCellWidget(mOrganizerLabel,0,0,0,3);
154 topLayout->addMultiCellWidget(mListView,1,1,0,3); 155 topLayout->addMultiCellWidget(mListView,1,1,0,3);
155 topLayout->addWidget(attendeeLabel,3,0); 156 topLayout->addWidget(attendeeLabel,3,0);
156 topLayout->addMultiCellWidget(mNameEdit,3,3,1,2); 157 topLayout->addMultiCellWidget(mNameEdit,3,3,1,2);
157 topLayout->addWidget(emailLabel,4,0); 158 topLayout->addWidget(emailLabel,4,0);
158 topLayout->addMultiCellWidget(mEmailEdit,4,4,1,2); 159 topLayout->addMultiCellWidget(mEmailEdit,4,4,1,2);
159 topLayout->addWidget(attendeeRoleLabel,5,0); 160 topLayout->addWidget(attendeeRoleLabel,5,0);
160 topLayout->addMultiCellWidget(mRoleCombo,5,5,1,3); 161 topLayout->addMultiCellWidget(mRoleCombo,5,5,1,3);
161 topLayout->addWidget(statusLabel,6,0); 162 topLayout->addWidget(statusLabel,6,0);
162 topLayout->addMultiCellWidget(mStatusCombo,6,6,1,3); 163 topLayout->addMultiCellWidget(mStatusCombo,6,6,1,3);
163 topLayout->addMultiCellWidget(mAddressBookButton,2,2,2,3); 164 topLayout->addMultiCellWidget(mAddressBookButton,2,2,2,3);
164 topLayout->addMultiCellWidget(mRsvpButton,2,2,0,1); 165 topLayout->addMultiCellWidget(mRsvpButton,2,2,0,1);
165 topLayout->addMultiCellWidget(buttonBox,3,4,3,3); 166 topLayout->addMultiCellWidget(buttonBox,3,4,3,3);
166 topLayout->setRowStretch(1,2); 167 topLayout->setRowStretch(1,2);
167 topLayout->setColStretch(0,0); 168 topLayout->setColStretch(0,0);
168 topLayout->setColStretch(1,2); 169 topLayout->setColStretch(1,2);
169 topLayout->setColStretch(2,1); 170 topLayout->setColStretch(2,1);
170 topLayout->setColStretch(3,1); 171 topLayout->setColStretch(3,1);
171 172
172 } else { 173 } else {
173 topLayout->addMultiCellWidget(mOrganizerLabel,0,0,0,5); 174 topLayout->addMultiCellWidget(mOrganizerLabel,0,0,0,5);
174 topLayout->addMultiCellWidget(mListView,1,1,0,5); 175 topLayout->addMultiCellWidget(mListView,1,1,0,5);
175 topLayout->addWidget(attendeeLabel,3,0); 176 topLayout->addWidget(attendeeLabel,3,0);
176 topLayout->addMultiCellWidget(mNameEdit,3,3,1,4); 177 topLayout->addMultiCellWidget(mNameEdit,3,3,1,4);
177 topLayout->addWidget(emailLabel,4,0); 178 topLayout->addWidget(emailLabel,4,0);
178 topLayout->addMultiCellWidget(mEmailEdit,4,4,1,4); 179 topLayout->addMultiCellWidget(mEmailEdit,4,4,1,4);
179 topLayout->addWidget(attendeeRoleLabel,5,0); 180 topLayout->addWidget(attendeeRoleLabel,5,0);
180 topLayout->addMultiCellWidget(mRoleCombo,5,5,1,2); 181 topLayout->addMultiCellWidget(mRoleCombo,5,5,1,2);
181 topLayout->addWidget(statusLabel,5,3); 182 topLayout->addWidget(statusLabel,5,3);
182 topLayout->addMultiCellWidget(mStatusCombo,5,5,4,5); 183 topLayout->addMultiCellWidget(mStatusCombo,5,5,4,5);
183 topLayout->addMultiCellWidget(mAddressBookButton,2,2,4,5); 184 topLayout->addMultiCellWidget(mAddressBookButton,2,2,4,5);
184 topLayout->addMultiCellWidget(mRsvpButton,2,2,0,1); 185 topLayout->addMultiCellWidget(mRsvpButton,2,2,0,1);
185 topLayout->addMultiCellWidget(buttonBox,3,4,5,5); 186 topLayout->addMultiCellWidget(buttonBox,3,4,5,5);
186 topLayout->setRowStretch(1,5); 187 topLayout->setRowStretch(1,5);
187 topLayout->setColStretch(0,0); 188 topLayout->setColStretch(0,0);
188 } 189 }
189// #if 0 190// #if 0
190// topLayout->setColStretch(2,1); 191// topLayout->setColStretch(2,1);
191// topLayout->addWidget(statusLabel,3,3); 192// topLayout->addWidget(statusLabel,3,3);
192// topLayout->addWidget(mStatusCombo,3,4); 193// topLayout->addWidget(mStatusCombo,3,4);
193// #else 194// #else
194// topLayout->addWidget(statusLabel,4,3); 195// topLayout->addWidget(statusLabel,4,3);
195// // topLayout->addWidget(mStatusCombo,4,3); 196// // topLayout->addWidget(mStatusCombo,4,3);
196// topLayout->addMultiCellWidget(mStatusCombo,4,4,4,5); 197// topLayout->addMultiCellWidget(mStatusCombo,4,4,4,5);
197 198
198// #endif 199// #endif
199// // topLayout->setRowStretch(5,1); 200// // topLayout->setRowStretch(5,1);
200// topLayout->addMultiCellWidget(mRsvpButton,5,5,0,1); 201// topLayout->addMultiCellWidget(mRsvpButton,5,5,0,1);
201// topLayout->addMultiCellWidget(buttonBox,2,3,5,5); 202// topLayout->addMultiCellWidget(buttonBox,2,3,5,5);
202// topLayout->setRowStretch(1,5); 203// topLayout->setRowStretch(1,5);
203// topLayout->setColStretch(0,0); 204// topLayout->setColStretch(0,0);
204 205
205#ifdef KORG_NOKABC 206#ifdef KORG_NOKABC
206 mAddressBookButton->hide(); 207 mAddressBookButton->hide();
207#endif 208#endif
208 209
diff --git a/korganizer/kotodoeditor.cpp b/korganizer/kotodoeditor.cpp
index 9232e09..f9f037a 100644
--- a/korganizer/kotodoeditor.cpp
+++ b/korganizer/kotodoeditor.cpp
@@ -72,142 +72,142 @@ void KOTodoEditor::init()
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} 75}
76void KOTodoEditor::setupRecurrence() 76void KOTodoEditor::setupRecurrence()
77{ 77{
78 QFrame *topFrame = addPage( i18n("Recurrence") ); 78 QFrame *topFrame = addPage( i18n("Recurrence") );
79 QBoxLayout *topLayout = new QVBoxLayout( topFrame ); 79 QBoxLayout *topLayout = new QVBoxLayout( topFrame );
80 80
81 mRecurrence = new KOEditorRecurrence( topFrame ); 81 mRecurrence = new KOEditorRecurrence( topFrame );
82 topLayout->addWidget( mRecurrence ); 82 topLayout->addWidget( mRecurrence );
83} 83}
84 84
85void KOTodoEditor::setCategories( QString s ) 85void KOTodoEditor::setCategories( QString s )
86{ 86{
87 mGeneral->setCategories(s); 87 mGeneral->setCategories(s);
88} 88}
89void KOTodoEditor::setSecrecy( int sec ) 89void KOTodoEditor::setSecrecy( int sec )
90{ 90{
91 mGeneral->setSecrecy( sec ); 91 mGeneral->setSecrecy( sec );
92} 92}
93void KOTodoEditor::reload() 93void KOTodoEditor::reload()
94{ 94{
95 if ( mTodo ) readTodo( mTodo ); 95 if ( mTodo ) readTodo( mTodo );
96} 96}
97 97
98void KOTodoEditor::setupGeneral() 98void KOTodoEditor::setupGeneral()
99{ 99{
100 mGeneral = new KOEditorGeneralTodo(this); 100 mGeneral = new KOEditorGeneralTodo(this);
101 connect ( mGeneral, SIGNAL ( allAccepted() ), this, SLOT ( slotOk () ) ); 101 connect ( mGeneral, SIGNAL ( allAccepted() ), this, SLOT ( slotOk () ) );
102 102
103 // connect(mGeneral,SIGNAL(openCategoryDialog()),mCategoryDialog,SLOT(show())); 103 // connect(mGeneral,SIGNAL(openCategoryDialog()),mCategoryDialog,SLOT(show()));
104 //connect(mCategoryDialog, SIGNAL(categoriesSelected(const QString &)), 104 //connect(mCategoryDialog, SIGNAL(categoriesSelected(const QString &)),
105 // mGeneral,SLOT(setCategories(const QString &))); 105 // mGeneral,SLOT(setCategories(const QString &)));
106 106
107 if (KOPrefs::instance()->mCompactDialogs) { 107 if (KOPrefs::instance()->mCompactDialogs) {
108 QFrame *topFrame = addPage(i18n("General")); 108 QFrame *topFrame = addPage(i18n("General"));
109 109
110 QBoxLayout *topLayout = new QVBoxLayout(topFrame); 110 QBoxLayout *topLayout = new QVBoxLayout(topFrame);
111 if ( QApplication::desktop()->width() < 480 ) { 111 if ( QApplication::desktop()->width() < 480 ) {
112 topLayout->setMargin(1); 112 topLayout->setMargin(1);
113 topLayout->setSpacing(1); 113 topLayout->setSpacing(1);
114 } else { 114 } else {
115 topLayout->setMargin(marginHint()-1); 115 topLayout->setMargin(marginHint()-1);
116 topLayout->setSpacing(spacingHint()-1); 116 topLayout->setSpacing(spacingHint()-1);
117 } 117 }
118 mGeneral->initHeader(topFrame,topLayout); 118 mGeneral->initHeader(topFrame,topLayout);
119 mGeneral->initTime(topFrame,topLayout); 119 mGeneral->initTime(topFrame,topLayout);
120 mGeneral->initAlarm(topFrame,topLayout); 120 mGeneral->initAlarm(topFrame,topLayout);
121 mGeneral->enableAlarm( false ); 121 mGeneral->enableAlarm( false );
122 122
123 123
124 QBoxLayout *priorityLayout; 124 QBoxLayout *priorityLayout;
125 if ( QApplication::desktop()->width() < 500 ) 125 if ( QApplication::desktop()->width() < 500 )
126 priorityLayout = new QVBoxLayout( topLayout ); 126 priorityLayout = new QVBoxLayout( topLayout );
127 else 127 else
128 priorityLayout = new QHBoxLayout( topLayout ); 128 priorityLayout = new QHBoxLayout( topLayout );
129 QWidget* prioWidget = new QWidget (topFrame); 129 QWidget* prioWidget = new QWidget (topFrame);
130 priorityLayout->addWidget( prioWidget ); 130 priorityLayout->addWidget( prioWidget );
131 QHBoxLayout* priorityLayout2 = new QHBoxLayout( prioWidget); 131 QHBoxLayout* priorityLayout2 = new QHBoxLayout( prioWidget);
132 132
133 133
134 QIconSet icon; 134 QIconSet icon;
135 if ( QApplication::desktop()->width() < 321 ) 135 if ( QApplication::desktop()->width() < 321 )
136 icon = SmallIcon("fileexport16");
137 else
138 icon = SmallIcon("fileexport");
139 QPushButton * saveTemplate = new QPushButton( prioWidget);
140 saveTemplate->setIconSet (icon ) ;
141 int size = saveTemplate->sizeHint().height();
142 saveTemplate->setFixedSize( size, size );
143 if ( QApplication::desktop()->width() < 321 )
144 icon = SmallIcon("fileimport16"); 136 icon = SmallIcon("fileimport16");
145 else 137 else
146 icon = SmallIcon("fileimport"); 138 icon = SmallIcon("fileimport");
147 QPushButton * loadTemplate = new QPushButton( prioWidget); 139 QPushButton * loadTemplate = new QPushButton( prioWidget);
148 loadTemplate->setIconSet (icon ) ; 140 loadTemplate->setIconSet (icon ) ;
141 int size = loadTemplate->sizeHint().height();
149 loadTemplate->setFixedSize( size, size ); 142 loadTemplate->setFixedSize( size, size );
143 if ( QApplication::desktop()->width() < 321 )
144 icon = SmallIcon("fileexport16");
145 else
146 icon = SmallIcon("fileexport");
147 QPushButton * saveTemplate = new QPushButton( prioWidget);
148 saveTemplate->setIconSet (icon ) ;
149 saveTemplate->setFixedSize( size, size );
150 150
151 priorityLayout2->addWidget(loadTemplate); 151 priorityLayout2->addWidget(loadTemplate);
152 priorityLayout2->addWidget(saveTemplate); 152 priorityLayout2->addWidget(saveTemplate);
153 mGeneral->initPriority(prioWidget,priorityLayout2); 153 mGeneral->initPriority(prioWidget,priorityLayout2);
154 mGeneral->initCategories( topFrame, priorityLayout ); 154 mGeneral->initCategories( topFrame, priorityLayout );
155 topLayout->addStretch(1); 155 topLayout->addStretch(1);
156 156
157 QFrame *topFrame2 = addPage(i18n("Details")); 157 QFrame *topFrame2 = addPage(i18n("Details"));
158 158
159 QBoxLayout *topLayout2 = new QVBoxLayout(topFrame2); 159 QBoxLayout *topLayout2 = new QVBoxLayout(topFrame2);
160 topLayout2->setMargin(marginHint()); 160 topLayout2->setMargin(marginHint());
161 topLayout2->setSpacing(spacingHint()); 161 topLayout2->setSpacing(spacingHint());
162 162
163 QHBoxLayout *completionLayout = new QHBoxLayout( topLayout2 ); 163 QHBoxLayout *completionLayout = new QHBoxLayout( topLayout2 );
164 mGeneral->initCompletion(topFrame2,completionLayout); 164 mGeneral->initCompletion(topFrame2,completionLayout);
165 165
166 166
167 mGeneral->initSecrecy( topFrame2, topLayout2 ); 167 mGeneral->initSecrecy( topFrame2, topLayout2 );
168 mGeneral->initDescription(topFrame2,topLayout2); 168 mGeneral->initDescription(topFrame2,topLayout2);
169 169
170 // QHBox * hb = new QHBox ( topFrame2 ); 170 // QHBox * hb = new QHBox ( topFrame2 );
171 // topLayout2->addWidget(hb); 171 // topLayout2->addWidget(hb);
172 // hb->setSpacing( 3 ); 172 // hb->setSpacing( 3 );
173 173
174 connect( saveTemplate, SIGNAL( clicked() ), this , SLOT( slotSaveTemplate() ) ); 174 connect( saveTemplate, SIGNAL( clicked() ), this , SLOT( slotSaveTemplate() ) );
175 connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( slotLoadTemplate() ) ); 175 connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( slotLoadTemplate() ) );
176 176
177 } else { 177 } else {
178 QFrame *topFrame = addPage(i18n("General")); 178 QFrame *topFrame = addPage(i18n("General"));
179 179
180 QBoxLayout *topLayout = new QVBoxLayout(topFrame); 180 QBoxLayout *topLayout = new QVBoxLayout(topFrame);
181 topLayout->setSpacing(spacingHint()); 181 topLayout->setSpacing(spacingHint());
182 182
183 mGeneral->initHeader(topFrame,topLayout); 183 mGeneral->initHeader(topFrame,topLayout);
184 mGeneral->initTime(topFrame,topLayout); 184 mGeneral->initTime(topFrame,topLayout);
185 mGeneral->initStatus(topFrame,topLayout); 185 mGeneral->initStatus(topFrame,topLayout);
186 QBoxLayout *alarmLineLayout = new QHBoxLayout(topLayout); 186 QBoxLayout *alarmLineLayout = new QHBoxLayout(topLayout);
187 mGeneral->initAlarm(topFrame,alarmLineLayout); 187 mGeneral->initAlarm(topFrame,alarmLineLayout);
188 mGeneral->initDescription(topFrame,topLayout); 188 mGeneral->initDescription(topFrame,topLayout);
189 QBoxLayout *detailsLayout = new QHBoxLayout(topLayout); 189 QBoxLayout *detailsLayout = new QHBoxLayout(topLayout);
190 mGeneral->initCategories( topFrame, detailsLayout ); 190 mGeneral->initCategories( topFrame, detailsLayout );
191 mGeneral->initSecrecy( topFrame, detailsLayout ); 191 mGeneral->initSecrecy( topFrame, detailsLayout );
192 } 192 }
193 mGeneral->finishSetup(); 193 mGeneral->finishSetup();
194 194
195} 195}
196 196
197void KOTodoEditor::editTodo(Todo *todo, bool editDescription) 197void KOTodoEditor::editTodo(Todo *todo, bool editDescription)
198{ 198{
199 //init(); 199 //init();
200 200
201 mTodo = todo; 201 mTodo = todo;
202 readTodo(mTodo); 202 readTodo(mTodo);
203 if ( editDescription ) { 203 if ( editDescription ) {
204 showPage( 1 ); 204 showPage( 1 );
205 mGeneral->setFocusOn( 1 ); 205 mGeneral->setFocusOn( 1 );
206 } else { 206 } else {
207 showPage( 0 ); 207 showPage( 0 );
208 mGeneral->setFocusOn( 2 ); 208 mGeneral->setFocusOn( 2 );
209 } 209 }
210 checkRecurrence(); 210 checkRecurrence();
211} 211}
212 212
213void KOTodoEditor::newTodo(QDateTime due,Todo *relatedTodo,bool allDay) 213void KOTodoEditor::newTodo(QDateTime due,Todo *relatedTodo,bool allDay)