korgplugins.cpp
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #include <kaboutdata.h>
00025 #include <kapplication.h>
00026 #include <kdebug.h>
00027 #include <klocale.h>
00028 #include <kcmdlineargs.h>
00029
00030 #include <calendar/plugin.h>
00031
00032 #include "kocore.h"
00033
00034 int main(int argc,char **argv)
00035 {
00036 KAboutData aboutData("korgplugins",I18N_NOOP("KOrgPlugins"),"0.1");
00037 KCmdLineArgs::init(argc,argv,&aboutData);
00038
00039 KApplication app;
00040
00041 KTrader::OfferList plugins = KOCore::self()->availablePlugins();
00042 KTrader::OfferList::ConstIterator it;
00043 for(it = plugins.begin(); it != plugins.end(); ++it) {
00044 kdDebug(5850) << "Plugin: " << (*it)->desktopEntryName() << " ("
00045 << (*it)->name() << ")" << endl;
00046 KOrg::Plugin *p = KOCore::self()->loadPlugin(*it);
00047 if (!p) {
00048 kdDebug(5850) << "Plugin loading failed." << endl;
00049 } else {
00050 kdDebug(5850) << "PLUGIN INFO: " << p->info() << endl;
00051 }
00052 }
00053
00054 plugins = KOCore::self()->availableParts();
00055 for(it = plugins.begin(); it != plugins.end(); ++it) {
00056 kdDebug(5850) << "Part: " << (*it)->desktopEntryName() << " ("
00057 << (*it)->name() << ")" << endl;
00058 KOrg::Part *p = KOCore::self()->loadPart(*it,0);
00059 if (!p) {
00060 kdDebug(5850) << "Plugin loading failed." << endl;
00061 } else {
00062 kdDebug(5850) << "PLUGIN INFO: " << p->info() << endl;
00063 }
00064 }
00065
00066 plugins = KOCore::self()->availableCalendarDecorations();
00067 for(it = plugins.begin(); it != plugins.end(); ++it) {
00068 kdDebug(5850) << "CalendarDecoration: " << (*it)->desktopEntryName() << " ("
00069 << (*it)->name() << ")" << endl;
00070 #if 0
00071
00072 KOrg::Part *p = KOCore::self()->loadPart(*it,0,0);
00073 if (!p) {
00074 kdDebug(5850) << "Plugin loading failed." << endl;
00075 } else {
00076 kdDebug(5850) << "PLUGIN INFO: " << p->info() << endl;
00077 }
00078 #endif
00079 }
00080
00081 #if 0
00082 KOrg::TextDecoration::List tdl = KOCore::self()->textDecorations();
00083 KOrg::TextDecoration *td = tdl.first();
00084 while(td) {
00085 kdDebug(5850) << "TEXT DECORATION INFO: " << td->info() << endl;
00086 td = tdl.next();
00087 }
00088
00089 KOrg::WidgetDecoration *moon = KOCore::self()->loadWidgetDecoration("moon");
00090 if (moon) {
00091 QWidget *wid = moon->daySmall(0,QDate::currentDate());
00092 app.setMainWidget(wid);
00093 wid->show();
00094 app.exec();
00095 }
00096 #endif
00097 }
This file is part of the documentation for korganizer Library Version 3.3.2.