korganizer Library API Documentation

main.cpp

00001 /*
00002     This file is part of KOrganizer.
00003     Copyright (c) 1997-1999 Preston Brown
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., 675 Mass Ave, Cambridge, MA 02139, 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 
00025 #include <stdlib.h>
00026 
00027 #include <qdir.h>
00028 
00029 #include <kstandarddirs.h>
00030 #include <kglobal.h>
00031 #include <kdebug.h>
00032 #include <kaboutdata.h>
00033 #include <kcmdlineargs.h>
00034 #include <klocale.h>
00035 
00036 #include "koapp.h"
00037 #include "version.h"
00038 
00039 static const KCmdLineOptions options[] =
00040 {
00041   {"l", 0, 0},
00042   {"list", I18N_NOOP("List the events for the current day"), 0},
00043   {"s", 0, 0},
00044   {"show <numdays>", I18N_NOOP("Show a list of all events for the next <numdays>"),"1"},
00045   {"+[calendar]", I18N_NOOP("A calendar file to load"), 0},
00046   {0,0,0}
00047 };
00048 
00049 int main (int argc, char **argv)
00050 {
00051   KAboutData aboutData("korganizer",I18N_NOOP("KOrganizer"),
00052       korgVersion,I18N_NOOP("A Personal Organizer for KDE"),KAboutData::License_GPL,
00053       "(c) 1997-1999 Preston Brown\n(c) 2000-2003 Cornelius Schumacher",0,
00054       "http://korganizer.kde.org");
00055   aboutData.addAuthor("Cornelius Schumacher",I18N_NOOP("Current Maintainer"),
00056                       "schumacher@kde.org");
00057   aboutData.addAuthor("Preston Brown",I18N_NOOP("Original Author"),
00058                       "pbrown@kde.org");
00059   aboutData.addCredit("Richard Apodaca");
00060   aboutData.addCredit("Laszlo Boloni");
00061   aboutData.addCredit("Barry Benowitz");
00062   aboutData.addCredit("Christopher Beard");
00063   aboutData.addCredit("Ian Dawes");
00064   aboutData.addCredit("Thomas Eitzenberger");
00065   aboutData.addCredit("Neil Hart");
00066   aboutData.addCredit("Declan Houlihan");
00067   aboutData.addCredit("Hans-Jürgen Husel");
00068   aboutData.addCredit("Christian Kirsch");
00069   aboutData.addCredit("Uwe Koloska");
00070   aboutData.addCredit("Glen Parker");
00071   aboutData.addCredit("Dan Pilone");
00072   aboutData.addCredit("Roman Rohr");
00073   aboutData.addCredit("Günter Schwann");
00074   aboutData.addCredit("Herwin Jan Steehouwer");
00075   aboutData.addCredit("Nick Thompson");
00076   aboutData.addCredit("Larry Wright");
00077   aboutData.addCredit("Thomas Zander");
00078   aboutData.addCredit("Fester Zigterman");
00079 
00080   KCmdLineArgs::init( argc, argv, &aboutData );
00081   KCmdLineArgs::addCmdLineOptions( options );
00082   KUniqueApplication::addCmdLineOptions();
00083 
00084   if (!KOrganizerApp::start())
00085     exit(0);
00086 
00087   KOrganizerApp app;
00088 
00089   KGlobal::locale()->insertCatalogue("libkcal");
00090   KGlobal::locale()->insertCatalogue("libkdepim");
00091   // This is a workaround for a session management problem with KUniqueApplication
00092   // The session ID gets reset before the restoration is called. This line makes
00093   // sure that the config object is created right away  (with the correct config
00094   // file name). Thanks to Lubos Lunak.
00095   app.sessionConfig();
00096 
00097 //  kdDebug() << "app.exec" << endl;
00098   return app.exec();
00099 //  kdDebug() << "~app.exec" << endl;
00100 }
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.4.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sat Oct 18 02:47:32 2003 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001