korganizer

kocounterdialog.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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 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 
00026 #include <klocale.h>
00027 
00028 #include <libkcal/event.h>
00029 #include <libkcal/todo.h>
00030 #include "koeventviewer.h"
00031 
00032 #include "kocounterdialog.h"
00033 #include "kocounterdialog.moc"
00034 
00035 KOCounterDialog::KOCounterDialog( QWidget *parent, const char *name )
00036   : KDialogBase( parent, name, false, i18n("Counter-Event Viewer"),
00037                  User1 | User2, User1, false, i18n("Decline"), i18n("Accept") )
00038 {
00039   mEventViewer = new KOEventViewer( this );
00040   setMainWidget( mEventViewer );
00041 
00042   connect( this, SIGNAL( user1Clicked() ), SLOT( slotCancel() ) );
00043   connect( this, SIGNAL( user2Clicked() ), SLOT( slotOk( ) ) );
00044 
00045   // FIXME: Set a sensible size (based on the content?).
00046   setMinimumSize( 300, 200 );
00047   resize( 320, 300 );
00048 }
00049 
00050 KOCounterDialog::~KOCounterDialog()
00051 {
00052 }
00053 
00054 void KOCounterDialog::setIncidence( Incidence *incidence )
00055 {
00056   mEventViewer->setIncidence( incidence );
00057 }
00058 
00059 void KOCounterDialog::addIncidence( Incidence *incidence )
00060 {
00061   mEventViewer->appendIncidence( incidence );
00062 }
00063 
00064 void KOCounterDialog::addText( const QString &text )
00065 {
00066   mEventViewer->addText( text );
00067 }
KDE Home | KDE Accessibility Home | Description of Access Keys