korganizer Library API Documentation

kogroupwareincomingdialog.cpp

00001 /*
00002     This file is part of KOrganizer.
00003 
00004     Copyright (c) 2002 Klarälvdalens Datakonsult AB
00005 
00006     This program is free software; you can redistribute it and/or modify
00007     it under the terms of the GNU General Public License as published by
00008     the Free Software Foundation; either version 2 of the License, or
00009     (at your option) any later version.
00010 
00011     This program is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00014     GNU General Public License for more details.
00015 
00016     You should have received a copy of the GNU General Public License
00017     along with this program; if not, write to the Free Software
00018     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00019 
00020     As a special exception, permission is given to link this program
00021     with any edition of Qt, and distribute the resulting executable,
00022     without including the source code for Qt in the source distribution.
00023 */
00024 #include "kogroupwareincomingdialog.h"
00025 
00026 #include <libkcal/event.h>
00027 #include <qlabel.h>
00028 #include <qtextedit.h>
00029 
00030 
00031 /*
00032  *  Constructs a KOGroupwareIncomingDialog which is a child of 'parent', with the
00033  *  name 'name' and widget flags set to 'f'
00034  *
00035  *  The dialog will by default be modeless, unless you set 'modal' to
00036  *  true to construct a modal dialog.
00037  */
00038 KOGroupwareIncomingDialog::KOGroupwareIncomingDialog( KCal::Incidence *evt,
00039                                                       QWidget *parent,
00040                                                       const char *name,
00041                                                       bool modal,
00042                                                       WFlags fl )
00043   : KOGroupwareIncomingDialog_base( parent, name, modal, fl )
00044 {
00045   mAccepted = false;
00046   mConditionallyAccepted = false;
00047   mDeclined = false;
00048 
00049   fromLA->setText( evt->dtStartDateStr() + ", " + evt->dtStartTimeStr() );
00050   if( evt->type() == "Event" ) {
00051     KCal::Event* event = static_cast<KCal::Event*>(evt);
00052     toLA->setText( event->dtEndDateStr() + ", " + event->dtEndTimeStr() );
00053   }
00054   locationLA->setText( evt->location() );
00055   summaryLA->setText( evt->summary() );
00056   descriptionTE->setText( evt->description() );
00057 }
00058 
00059 KOGroupwareIncomingDialog::~KOGroupwareIncomingDialog()
00060 {
00061 }
00062 
00063 /*
00064  * protected slot
00065  */
00066 void KOGroupwareIncomingDialog::slotAcceptEvent()
00067 {
00068   mAccepted = true;
00069   mConditionallyAccepted = false;
00070   mDeclined = false;
00071 }
00072 
00073 /*
00074  * protected slot
00075  */
00076 void KOGroupwareIncomingDialog::slotAcceptEventConditionally()
00077 {
00078   mAccepted = false;
00079   mConditionallyAccepted = true;
00080   mDeclined = false;
00081 }
00082 
00083 /*
00084  * protected slot
00085  */
00086 void KOGroupwareIncomingDialog::slotDeclineEvent()
00087 {
00088   mAccepted = false;
00089   mConditionallyAccepted = false;
00090   mDeclined = true;
00091 }
00092 
00093 #include "kogroupwareincomingdialog.moc"
KDE Logo
This file is part of the documentation for korganizer Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat May 1 11:38:29 2004 by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2003