korganizer
kocore.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef KOCORE_H
00026 #define KOCORE_H
00027
00028 #include <calendar/calendardecoration.h>
00029 #include <korganizer/part.h>
00030 #include <korganizer/printplugin.h>
00031
00032 #include <kdepimmacros.h>
00033 #include <ktrader.h>
00034
00035 namespace KPIM { class IdentityManager; }
00036
00037 class KDE_EXPORT KOCore
00038 {
00039 public:
00040 ~KOCore();
00041
00042 static KOCore *self();
00043
00044 KTrader::OfferList availablePlugins();
00045 KTrader::OfferList availableCalendarDecorations();
00046 KTrader::OfferList availableParts();
00047 KTrader::OfferList availablePrintPlugins();
00048
00049 KOrg::Plugin *loadPlugin( KService::Ptr service );
00050 KOrg::Plugin *loadPlugin( const QString & );
00051
00052 KOrg::CalendarDecoration *loadCalendarDecoration( KService::Ptr service );
00053 KOrg::CalendarDecoration *loadCalendarDecoration( const QString & );
00054
00055 KOrg::Part *loadPart( KService::Ptr, KOrg::MainWindow *parent );
00056 KOrg::Part *loadPart( const QString &, KOrg::MainWindow *parent );
00057
00058 KOrg::PrintPlugin *loadPrintPlugin( KService::Ptr service );
00059 KOrg::PrintPlugin *loadPrintPlugin( const QString & );
00060
00061 KOrg::CalendarDecoration::List calendarDecorations();
00062 KOrg::PrintPlugin::List loadPrintPlugins();
00063 KOrg::Part::List loadParts( KOrg::MainWindow *parent );
00064
00065 void addXMLGUIClient( QWidget*, KXMLGUIClient *guiclient );
00066 void removeXMLGUIClient( QWidget* );
00067 KXMLGUIClient *xmlguiClient( QWidget* ) const;
00068
00073 void unloadParts( KOrg::MainWindow *parent, KOrg::Part::List &parts );
00074 void unloadPlugins();
00075
00076 void reloadPlugins();
00077
00082 KOrg::Part::List reloadParts( KOrg::MainWindow *parent,
00083 KOrg::Part::List &parts );
00084
00085 KPIM::IdentityManager* identityManager();
00086
00087 protected:
00088 KOCore();
00089
00090 KTrader::OfferList availablePlugins( const QString &type,
00091 int pluginInterfaceVersion = -1 );
00092
00093 private:
00094 static KOCore *mSelf;
00095
00096 KOrg::CalendarDecoration::List mCalendarDecorations;
00097 bool mCalendarDecorationsLoaded;
00098
00099 QMap<QWidget*, KXMLGUIClient*> mXMLGUIClients;
00100
00101 KPIM::IdentityManager *mIdentityManager;
00102 };
00103
00104 #endif
|