korganizer Library API Documentation

korgplugins.cpp

00001 /* 00002 This file is part of KOrganizer. 00003 00004 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 00005 00006 This program is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation; either version 2 of the License, or 00009 (at your option) any later version. 00010 00011 This program is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with this program; if not, write to the Free Software 00018 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00019 00020 As a special exception, permission is given to link this program 00021 with any edition of Qt, and distribute the resulting executable, 00022 without including the source code for Qt in the source distribution. 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 // TODO: Update this to calendar decorations 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 }
KDE Logo
This file is part of the documentation for korganizer Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Aug 27 12:53:26 2004 by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2003