korganizer Library API Documentation

koeventviewerdialog.cpp

00001 /*
00002     This file is part of KOrganizer.
00003 
00004     Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
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 
00025 #include "koeventviewerdialog.h"
00026 
00027 #include "koeventviewer.h"
00028 
00029 #include <libkcal/event.h>
00030 
00031 #include <klocale.h>
00032 
00033 KOEventViewerDialog::KOEventViewerDialog( QWidget *parent, const char *name,
00034                                           bool compact )
00035   : KDialogBase( parent, name, false, i18n("Event Viewer"), Ok, Ok, false,
00036                  i18n("Edit") )
00037 {
00038   mEventViewer = new KOEventViewer( this );
00039   setMainWidget( mEventViewer );
00040 
00041   // TODO: Set a sensible size (based on the content?).
00042   if ( compact ) {
00043     setFixedSize( 240,284 );
00044     move( 0, 15 );
00045   } else {
00046     setMinimumSize( 300, 200 );
00047     resize( 320, 300 );
00048   }
00049   connect( this, SIGNAL(finished()), this, SLOT(delayedDestruct()) );
00050 }
00051 
00052 KOEventViewerDialog::~KOEventViewerDialog()
00053 {
00054 }
00055 
00056 void KOEventViewerDialog::setEvent( Event *event )
00057 {
00058   mEventViewer->setEvent(event);
00059 }
00060 
00061 void KOEventViewerDialog::setTodo( Todo *todo )
00062 {
00063   mEventViewer->setTodo( todo );
00064 }
00065 
00066 void KOEventViewerDialog::setJournal( Journal *journal )
00067 {
00068   mEventViewer->setJournal( journal );
00069 }
00070 
00071 void KOEventViewerDialog::appendEvent( Event *event )
00072 {
00073   mEventViewer->appendEvent(event);
00074 }
00075 
00076 void KOEventViewerDialog::appendTodo( Todo *todo )
00077 {
00078   mEventViewer->appendTodo( todo );
00079 }
00080 
00081 void KOEventViewerDialog::appendJournal( Journal *journal )
00082 {
00083   mEventViewer->appendJournal( journal );
00084 }
00085 
00086 void KOEventViewerDialog::addText( const QString &text )
00087 {
00088   mEventViewer->addText(text);
00089 }
00090 
00091 #include "koeventviewerdialog.moc"
KDE Logo
This file is part of the documentation for korganizer Library Version 3.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Oct 17 09:56:25 2007 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003