korganizer Library API Documentation

kocore.h

00001 /*
00002     This file is part of KOrganizer.
00003     Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
00004 
00005     This program is free software; you can redistribute it and/or modify
00006     it under the terms of the GNU General Public License as published by
00007     the Free Software Foundation; either version 2 of the License, or
00008     (at your option) any later version.
00009 
00010     This program is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00013     GNU General Public License for more details.
00014 
00015     You should have received a copy of the GNU General Public License
00016     along with this program; if not, write to the Free Software
00017     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00018 
00019     As a special exception, permission is given to link this program
00020     with any edition of Qt, and distribute the resulting executable,
00021     without including the source code for Qt in the source distribution.
00022 */
00023 #ifndef KOCORE_H
00024 #define KOCORE_H
00025 
00026 #include <ktrader.h>
00027 
00028 #include <calendar/calendardecoration.h>
00029 #include <korganizer/part.h>
00030 
00031 #include <calendarsystem/kcalendarsystem.h>
00032 
00033 class KOCore {
00034   public:
00035     static KOCore *self();
00036 
00037     KTrader::OfferList availablePlugins(const QString &type);
00038   
00039     KOrg::Plugin *loadPlugin(KService::Ptr service);
00040     KOrg::Plugin *loadPlugin(const QString &);
00041     
00042     KOrg::CalendarDecoration *loadCalendarDecoration(KService::Ptr service);
00043     KOrg::CalendarDecoration *loadCalendarDecoration(const QString &);
00044 
00045     KOrg::Part *loadPart(KService::Ptr,KOrg::MainWindow *parent);
00046     KOrg::Part *loadPart(const QString &,KOrg::MainWindow *parent);
00047 
00048     KOrg::CalendarDecoration::List calendarDecorations();
00049     KOrg::Part::List loadParts(KOrg::MainWindow *parent);
00050 
00056     void unloadParts(KOrg::MainWindow *parent, KOrg::Part::List& parts);
00057     void unloadPlugins();
00058 
00059     void reloadPlugins();
00060 
00065     KOrg::Part::List reloadParts(KOrg::MainWindow *parent, KOrg::Part::List& parts);
00066 
00067     QString holiday( const QDate & );
00068 
00069     KCalendarSystem *calendarSystem();
00070 
00071   protected:
00072     KOCore();
00073     
00074   private:
00075     static KOCore *mSelf;
00076     
00077     KOrg::CalendarDecoration::List mCalendarDecorations;
00078     bool mCalendarDecorationsLoaded;
00079     
00080     KOrg::CalendarDecoration *mHolidays;
00081 
00082     KCalendarSystem *mCalendarSystem;
00083 };
00084 
00085 #endif
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sun Feb 15 11:41:09 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001