korganizer

kocore.h
1 /*
2  This file is part of KOrganizer.
3 
4  Copyright (c) 2001,2003 Cornelius Schumacher <schumacher@kde.org>
5  Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
6 
7  This program is free software; you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation; either version 2 of the License, or
10  (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 
21  As a special exception, permission is given to link this program
22  with any edition of TQt, and distribute the resulting executable,
23  without including the source code for TQt in the source distribution.
24 */
25 #ifndef KOCORE_H
26 #define KOCORE_H
27 
28 #include <calendar/calendardecoration.h>
29 #include <korganizer/part.h>
30 #include <korganizer/printplugin.h>
31 
32 #include <tdemacros.h>
33 #include <ktrader.h>
34 
35 namespace KPIM { class IdentityManager; }
36 
37 class TDE_EXPORT KOCore
38 {
39  public:
40  ~KOCore();
41 
42  static KOCore *self();
43 
44  TDETrader::OfferList availablePlugins();
45  TDETrader::OfferList availableCalendarDecorations();
46  TDETrader::OfferList availableParts();
47  TDETrader::OfferList availablePrintPlugins();
48 
49  KOrg::Plugin *loadPlugin( KService::Ptr service );
50  KOrg::Plugin *loadPlugin( const TQString & );
51 
52  KOrg::CalendarDecoration *loadCalendarDecoration( KService::Ptr service );
53  KOrg::CalendarDecoration *loadCalendarDecoration( const TQString & );
54 
55  KOrg::Part *loadPart( KService::Ptr, KOrg::MainWindow *parent );
56  KOrg::Part *loadPart( const TQString &, KOrg::MainWindow *parent );
57 
58  KOrg::PrintPlugin *loadPrintPlugin( KService::Ptr service );
59  KOrg::PrintPlugin *loadPrintPlugin( const TQString & );
60 
61  KOrg::CalendarDecoration::List calendarDecorations();
62  KOrg::PrintPlugin::List loadPrintPlugins();
63  KOrg::Part::List loadParts( KOrg::MainWindow *parent );
64 
65  void addXMLGUIClient( TQWidget*, KXMLGUIClient *guiclient );
66  void removeXMLGUIClient( TQWidget* );
67  KXMLGUIClient *xmlguiClient( TQWidget* ) const;
68 
73  void unloadParts( KOrg::MainWindow *parent, KOrg::Part::List &parts );
74  void unloadPlugins();
75 
76  void reloadPlugins();
77 
82  KOrg::Part::List reloadParts( KOrg::MainWindow *parent,
83  KOrg::Part::List &parts );
84 
85  KPIM::IdentityManager* identityManager();
86 
87  protected:
88  KOCore();
89 
90  TDETrader::OfferList availablePlugins( const TQString &type,
91  int pluginInterfaceVersion = -1 );
92 
93  private:
94  static KOCore *mSelf;
95 
96  KOrg::CalendarDecoration::List mCalendarDecorations;
97  bool mCalendarDecorationsLoaded;
98 
99  TQMap<TQWidget*, KXMLGUIClient*> mXMLGUIClients;
100 
101  KPIM::IdentityManager *mIdentityManager;
102 };
103 
104 #endif
This class provides the interface for a date dependent decoration.
interface for korganizer main window
Definition: mainwindow.h:41
Base class for KOrganizer printing classes.
Definition: printplugin.h:52