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("Calendar/Plugin");
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()->availablePlugins("KOrganizer/Part");
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()->availablePlugins("KOrganizer/View");
00067 for(it = plugins.begin(); it != plugins.end(); ++it) {
00068 kdDebug(5850) << "Part: " << (*it)->desktopEntryName() << " ("
00069 << (*it)->name() << ")" << endl;
00070 #if 0
00071 KOrg::Part *p = KOCore::self()->loadPart(*it,0,0);
00072 if (!p) {
00073 kdDebug(5850) << "Plugin loading failed." << endl;
00074 } else {
00075 kdDebug(5850) << "PLUGIN INFO: " << p->info() << endl;
00076 }
00077 #endif
00078 }
00079
00080 #if 0
00081 KOrg::TextDecoration::List tdl = KOCore::self()->textDecorations();
00082 KOrg::TextDecoration *td = tdl.first();
00083 while(td) {
00084 kdDebug(5850) << "TEXT DECORATION INFO: " << td->info() << endl;
00085 td = tdl.next();
00086 }
00087
00088 KOrg::WidgetDecoration *moon = KOCore::self()->loadWidgetDecoration("moon");
00089 if (moon) {
00090 QWidget *wid = moon->daySmall(0,QDate::currentDate());
00091 app.setMainWidget(wid);
00092 wid->show();
00093 app.exec();
00094 }
00095 #endif
00096 }
This file is part of the documentation for korganizer Library Version 3.2.2.