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("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 }
KDE Logo
This file is part of the documentation for korganizer Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Jul 28 23:58:14 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003