korganizer
korgplugins.cpp00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include <kaboutdata.h>
00026 #include <kapplication.h>
00027 #include <kdebug.h>
00028 #include <klocale.h>
00029 #include <kcmdlineargs.h>
00030
00031 #include <calendar/plugin.h>
00032
00033 #include "kocore.h"
00034
00035 int main(int argc,char **argv)
00036 {
00037 KAboutData aboutData("korgplugins",I18N_NOOP("KOrgPlugins"),"0.1");
00038 KCmdLineArgs::init(argc,argv,&aboutData);
00039
00040 KApplication app;
00041
00042 KTrader::OfferList plugins = KOCore::self()->availablePlugins();
00043 KTrader::OfferList::ConstIterator it;
00044 for(it = plugins.begin(); it != plugins.end(); ++it) {
00045 kdDebug(5850) << "Plugin: " << (*it)->desktopEntryName() << " ("
00046 << (*it)->name() << ")" << endl;
00047 KOrg::Plugin *p = KOCore::self()->loadPlugin(*it);
00048 if (!p) {
00049 kdDebug(5850) << "Plugin loading failed." << endl;
00050 } else {
00051 kdDebug(5850) << "PLUGIN INFO: " << p->info() << endl;
00052 }
00053 }
00054
00055 plugins = KOCore::self()->availablePrintPlugins();
00056 for(it = plugins.begin(); it != plugins.end(); ++it) {
00057 kdDebug(5850) << "Print plugin: " << (*it)->desktopEntryName() << " ("
00058 << (*it)->name() << ")" << endl;
00059 KOrg::PrintPlugin *p = KOCore::self()->loadPrintPlugin(*it);
00060 if (!p) {
00061 kdDebug(5850) << "Print plugin loading failed." << endl;
00062 } else {
00063 kdDebug(5850) << "PRINT PLUGIN INFO: " << p->info() << endl;
00064 }
00065 }
00066
00067 plugins = KOCore::self()->availableParts();
00068 for(it = plugins.begin(); it != plugins.end(); ++it) {
00069 kdDebug(5850) << "Part: " << (*it)->desktopEntryName() << " ("
00070 << (*it)->name() << ")" << endl;
00071 KOrg::Part *p = KOCore::self()->loadPart(*it,0);
00072 if (!p) {
00073 kdDebug(5850) << "Part loading failed." << endl;
00074 } else {
00075 kdDebug(5850) << "PART INFO: " << p->info() << endl;
00076 }
00077 }
00078
00079 plugins = KOCore::self()->availableCalendarDecorations();
00080 for(it = plugins.begin(); it != plugins.end(); ++it) {
00081 kdDebug(5850) << "CalendarDecoration: " << (*it)->desktopEntryName() << " ("
00082 << (*it)->name() << ")" << endl;
00083 KOrg::CalendarDecoration *p = KOCore::self()->loadCalendarDecoration(*it);
00084 if (!p) {
00085 kdDebug(5850) << "Calendar decoration loading failed." << endl;
00086 } else {
00087 kdDebug(5850) << "CALENDAR DECORATION INFO: " << p->info() << endl;
00088 }
00089 }
00090
00091 }
|