summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-08-19 20:48:51 (UTC)
committer zautrix <zautrix>2004-08-19 20:48:51 (UTC)
commitd9b7a7296b031b3cf3e510a163367b9c4ab42d7a (patch) (unidiff)
tree6423ca29d29c43e1cd4298c81f2031762199e36a
parent895e3797f6437347fd73b87a3bf9d4cecfa5a5a9 (diff)
downloadkdepimpi-d9b7a7296b031b3cf3e510a163367b9c4ab42d7a.zip
kdepimpi-d9b7a7296b031b3cf3e510a163367b9c4ab42d7a.tar.gz
kdepimpi-d9b7a7296b031b3cf3e510a163367b9c4ab42d7a.tar.bz2
added missing ifdef for dektop version
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koeditordetails.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/korganizer/koeditordetails.cpp b/korganizer/koeditordetails.cpp
index 8e2fabe..2e1ae6e 100644
--- a/korganizer/koeditordetails.cpp
+++ b/korganizer/koeditordetails.cpp
@@ -140,132 +140,133 @@ KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name)
140 mAddressBookButton = new QPushButton(i18n("Address &Book..."),this); 140 mAddressBookButton = new QPushButton(i18n("Address &Book..."),this);
141 // buttonLayout->addWidget(mAddressBookButton); 141 // buttonLayout->addWidget(mAddressBookButton);
142 connect(mAddressBookButton,SIGNAL(clicked()),SLOT(openAddressBook())); 142 connect(mAddressBookButton,SIGNAL(clicked()),SLOT(openAddressBook()));
143 //mRoleCombo->setFixedSize( mRoleCombo->sizeHint () ); 143 //mRoleCombo->setFixedSize( mRoleCombo->sizeHint () );
144 144
145 if (qApp->desktop()->width() < 300 ) { 145 if (qApp->desktop()->width() < 300 ) {
146 mListView->setFixedHeight(80); 146 mListView->setFixedHeight(80);
147 topLayout->addMultiCellWidget(mOrganizerLabel,0,0,0,3); 147 topLayout->addMultiCellWidget(mOrganizerLabel,0,0,0,3);
148 topLayout->addMultiCellWidget(mListView,1,1,0,3); 148 topLayout->addMultiCellWidget(mListView,1,1,0,3);
149 topLayout->addWidget(attendeeLabel,3,0); 149 topLayout->addWidget(attendeeLabel,3,0);
150 topLayout->addMultiCellWidget(mNameEdit,3,3,1,2); 150 topLayout->addMultiCellWidget(mNameEdit,3,3,1,2);
151 topLayout->addWidget(emailLabel,4,0); 151 topLayout->addWidget(emailLabel,4,0);
152 topLayout->addMultiCellWidget(mEmailEdit,4,4,1,2); 152 topLayout->addMultiCellWidget(mEmailEdit,4,4,1,2);
153 topLayout->addWidget(attendeeRoleLabel,5,0); 153 topLayout->addWidget(attendeeRoleLabel,5,0);
154 topLayout->addMultiCellWidget(mRoleCombo,5,5,1,2); 154 topLayout->addMultiCellWidget(mRoleCombo,5,5,1,2);
155 topLayout->addWidget(statusLabel,6,0); 155 topLayout->addWidget(statusLabel,6,0);
156 topLayout->addMultiCellWidget(mStatusCombo,6,6,1,2); 156 topLayout->addMultiCellWidget(mStatusCombo,6,6,1,2);
157 topLayout->addMultiCellWidget(mAddressBookButton,2,2,2,3); 157 topLayout->addMultiCellWidget(mAddressBookButton,2,2,2,3);
158 topLayout->addMultiCellWidget(mRsvpButton,2,2,0,1); 158 topLayout->addMultiCellWidget(mRsvpButton,2,2,0,1);
159 topLayout->addMultiCellWidget(buttonBox,3,4,3,3); 159 topLayout->addMultiCellWidget(buttonBox,3,4,3,3);
160 topLayout->setRowStretch(1,2); 160 topLayout->setRowStretch(1,2);
161 topLayout->setColStretch(0,0); 161 topLayout->setColStretch(0,0);
162 topLayout->setColStretch(1,2); 162 topLayout->setColStretch(1,2);
163 topLayout->setColStretch(2,1); 163 topLayout->setColStretch(2,1);
164 topLayout->setColStretch(3,1); 164 topLayout->setColStretch(3,1);
165 165
166 } else { 166 } else {
167 topLayout->addMultiCellWidget(mOrganizerLabel,0,0,0,5); 167 topLayout->addMultiCellWidget(mOrganizerLabel,0,0,0,5);
168 topLayout->addMultiCellWidget(mListView,1,1,0,5); 168 topLayout->addMultiCellWidget(mListView,1,1,0,5);
169 topLayout->addWidget(attendeeLabel,3,0); 169 topLayout->addWidget(attendeeLabel,3,0);
170 topLayout->addMultiCellWidget(mNameEdit,3,3,1,4); 170 topLayout->addMultiCellWidget(mNameEdit,3,3,1,4);
171 topLayout->addWidget(emailLabel,4,0); 171 topLayout->addWidget(emailLabel,4,0);
172 topLayout->addMultiCellWidget(mEmailEdit,4,4,1,4); 172 topLayout->addMultiCellWidget(mEmailEdit,4,4,1,4);
173 topLayout->addWidget(attendeeRoleLabel,5,0); 173 topLayout->addWidget(attendeeRoleLabel,5,0);
174 topLayout->addMultiCellWidget(mRoleCombo,5,5,1,2); 174 topLayout->addMultiCellWidget(mRoleCombo,5,5,1,2);
175 topLayout->addWidget(statusLabel,5,3); 175 topLayout->addWidget(statusLabel,5,3);
176 topLayout->addMultiCellWidget(mStatusCombo,5,5,4,5); 176 topLayout->addMultiCellWidget(mStatusCombo,5,5,4,5);
177 topLayout->addMultiCellWidget(mAddressBookButton,2,2,4,5); 177 topLayout->addMultiCellWidget(mAddressBookButton,2,2,4,5);
178 topLayout->addMultiCellWidget(mRsvpButton,2,2,0,1); 178 topLayout->addMultiCellWidget(mRsvpButton,2,2,0,1);
179 topLayout->addMultiCellWidget(buttonBox,3,4,5,5); 179 topLayout->addMultiCellWidget(buttonBox,3,4,5,5);
180 topLayout->setRowStretch(1,5); 180 topLayout->setRowStretch(1,5);
181 topLayout->setColStretch(0,0); 181 topLayout->setColStretch(0,0);
182 } 182 }
183// #if 0 183// #if 0
184// topLayout->setColStretch(2,1); 184// topLayout->setColStretch(2,1);
185// topLayout->addWidget(statusLabel,3,3); 185// topLayout->addWidget(statusLabel,3,3);
186// topLayout->addWidget(mStatusCombo,3,4); 186// topLayout->addWidget(mStatusCombo,3,4);
187// #else 187// #else
188// topLayout->addWidget(statusLabel,4,3); 188// topLayout->addWidget(statusLabel,4,3);
189// // topLayout->addWidget(mStatusCombo,4,3); 189// // topLayout->addWidget(mStatusCombo,4,3);
190// topLayout->addMultiCellWidget(mStatusCombo,4,4,4,5); 190// topLayout->addMultiCellWidget(mStatusCombo,4,4,4,5);
191 191
192// #endif 192// #endif
193// // topLayout->setRowStretch(5,1); 193// // topLayout->setRowStretch(5,1);
194// topLayout->addMultiCellWidget(mRsvpButton,5,5,0,1); 194// topLayout->addMultiCellWidget(mRsvpButton,5,5,0,1);
195// topLayout->addMultiCellWidget(buttonBox,2,3,5,5); 195// topLayout->addMultiCellWidget(buttonBox,2,3,5,5);
196// topLayout->setRowStretch(1,5); 196// topLayout->setRowStretch(1,5);
197// topLayout->setColStretch(0,0); 197// topLayout->setColStretch(0,0);
198 198
199#ifdef KORG_NOKABC 199#ifdef KORG_NOKABC
200 mAddressBookButton->hide(); 200 mAddressBookButton->hide();
201#endif 201#endif
202 202
203 updateAttendeeInput(); 203 updateAttendeeInput();
204 204#ifndef DESKTOP_VERSION
205//US listen for arriving address resultsets 205//US listen for arriving address resultsets
206 connect(ExternalAppHandler::instance(), SIGNAL(receivedNameEmailUidListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&)), 206 connect(ExternalAppHandler::instance(), SIGNAL(receivedNameEmailUidListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&)),
207 this, SLOT(insertAttendees(const QString&, const QStringList&, const QStringList&, const QStringList&))); 207 this, SLOT(insertAttendees(const QString&, const QStringList&, const QStringList&, const QStringList&)));
208#endif
208 209
209} 210}
210 211
211KOEditorDetails::~KOEditorDetails() 212KOEditorDetails::~KOEditorDetails()
212{ 213{
213} 214}
214 215
215void KOEditorDetails::removeAttendee() 216void KOEditorDetails::removeAttendee()
216{ 217{
217 AttendeeListItem *aItem = (AttendeeListItem *)mListView->selectedItem(); 218 AttendeeListItem *aItem = (AttendeeListItem *)mListView->selectedItem();
218 if (!aItem) return; 219 if (!aItem) return;
219 220
220 Attendee *delA = new Attendee(aItem->data()->name(),aItem->data()->email(), 221 Attendee *delA = new Attendee(aItem->data()->name(),aItem->data()->email(),
221 aItem->data()->RSVP(),aItem->data()->status(),aItem->data()->role(), 222 aItem->data()->RSVP(),aItem->data()->status(),aItem->data()->role(),
222 aItem->data()->uid()); 223 aItem->data()->uid());
223 mdelAttendees.append(delA); 224 mdelAttendees.append(delA);
224 225
225 delete aItem; 226 delete aItem;
226 227
227 updateAttendeeInput(); 228 updateAttendeeInput();
228} 229}
229 230
230 231
231void KOEditorDetails::openAddressBook() 232void KOEditorDetails::openAddressBook()
232{ 233{
233#ifndef KORG_NOKABC 234#ifndef KORG_NOKABC
234 235
235#ifdef DESKTOP_VERSION 236#ifdef DESKTOP_VERSION
236 KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this); 237 KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this);
237 uint i=0; 238 uint i=0;
238 for (i=0; i < list.count(); i++) { 239 for (i=0; i < list.count(); i++) {
239 insertAttendee( new Attendee( list[i].realName(), list[i].preferredEmail(),false,KCal::Attendee::NeedsAction,KCal::Attendee::ReqParticipant,list[i].uid()) ); 240 insertAttendee( new Attendee( list[i].realName(), list[i].preferredEmail(),false,KCal::Attendee::NeedsAction,KCal::Attendee::ReqParticipant,list[i].uid()) );
240 } 241 }
241#else 242#else
242 bool res = ExternalAppHandler::instance()->requestNameEmailUidListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/); 243 bool res = ExternalAppHandler::instance()->requestNameEmailUidListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/);
243 // the result should now arrive through method insertAttendees 244 // the result should now arrive through method insertAttendees
244#endif 245#endif
245 246
246 247
247#if 0 248#if 0
248 KABC::Addressee a = KABC::AddresseeDialog::getAddressee(this); 249 KABC::Addressee a = KABC::AddresseeDialog::getAddressee(this);
249 if (!a.isEmpty()) { 250 if (!a.isEmpty()) {
250 insertAttendee( new Attendee( a.realName(), a.preferredEmail(),false,KCal::Attendee::NeedsAction,KCal::Attendee::ReqParticipant,a.uid()) ); 251 insertAttendee( new Attendee( a.realName(), a.preferredEmail(),false,KCal::Attendee::NeedsAction,KCal::Attendee::ReqParticipant,a.uid()) );
251 } 252 }
252#endif 253#endif
253#endif 254#endif
254} 255}
255 256
256 257
257void KOEditorDetails::addNewAttendee() 258void KOEditorDetails::addNewAttendee()
258{ 259{
259#if 0 260#if 0
260 // this is cool. If they didn't enter an email address, 261 // this is cool. If they didn't enter an email address,
261 // try to look it up in the address book and fill it in for them. 262 // try to look it up in the address book and fill it in for them.
262 if (QString(mEmailEdit->text()).stripWhiteSpace().isEmpty()) { 263 if (QString(mEmailEdit->text()).stripWhiteSpace().isEmpty()) {
263 KabAPI addrBook; 264 KabAPI addrBook;
264 QString name; 265 QString name;
265 std::list<AddressBook::Entry> entries; 266 std::list<AddressBook::Entry> entries;
266 name = mNameEdit->text(); 267 name = mNameEdit->text();
267 if (addrBook.init() == AddressBook::NoError) { 268 if (addrBook.init() == AddressBook::NoError) {
268 if (addrBook.getEntryByName(name, entries, 1) == AddressBook::NoError) { 269 if (addrBook.getEntryByName(name, entries, 1) == AddressBook::NoError) {
269 kdDebug() << "positive match" << endl; 270 kdDebug() << "positive match" << endl;
270 // take first email address 271 // take first email address
271 if (!entries.front().emails.isEmpty() && 272 if (!entries.front().emails.isEmpty() &&