kalarmd Library API Documentation

korgacmain.cpp

00001 /*
00002     This file is part of the KOrganizer alarm client.
00003     Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
00004 
00005     This program is free software; you can redistribute it and/or modify
00006     it under the terms of the GNU General Public License as published by
00007     the Free Software Foundation; either version 2 of the License, or
00008     (at your option) any later version.
00009 
00010     This program is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00013     GNU General Public License for more details.
00014 
00015     You should have received a copy of the GNU General Public License
00016     along with this program; if not, write to the Free Software
00017     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00018 
00019     As a special exception, permission is given to link this program
00020     with any edition of Qt, and distribute the resulting executable,
00021     without including the source code for Qt in the source distribution.
00022 */
00023 
00024 // $Id: korgacmain.cpp,v 1.3 2002/03/17 17:13:26 cschumac Exp $
00025 //
00026 // KOrganizer alarm client main program
00027 //
00028 
00029 #include <stdlib.h>
00030 
00031 #include <kdebug.h>
00032 #include <klocale.h>
00033 #include <kcmdlineargs.h>
00034 #include <kaboutdata.h>
00035 #include <kuniqueapplication.h>
00036 
00037 #include "koalarmclient.h"
00038 
00039 class MyApp : public KUniqueApplication
00040 {
00041   public:
00042     MyApp() : mClient( 0 ) {}
00043     int newInstance()
00044     {
00045       // Check if we already have a running alarm daemon widget
00046       if (mClient) return 0;
00047 
00048 //      KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
00049 
00050       mClient = new KOAlarmClient;
00051 
00052       return 0;
00053     }
00054   private:
00055     KOAlarmClient *mClient;
00056 };
00057 
00058 
00059 static const char* korgacVersion = "0.9";
00060 static const KCmdLineOptions options[] =
00061 {
00062    {0L,0L,0L}
00063 };
00064 
00065 int main(int argc, char **argv)
00066 {
00067   KLocale::setMainCatalogue("kalarmdgui");
00068   KAboutData aboutData("korgac", I18N_NOOP("KOrganizer Alarm Client"),
00069       korgacVersion, I18N_NOOP("KOrganizer Alarm Client"), KAboutData::License_GPL,
00070       "(c) 2001 Cornelius Schumacher\n"
00071       "(c) 2001 David Jarvie <software@astrojar.org.uk>",
00072       0, "http://pim.kde.org");
00073   aboutData.addAuthor("Cornelius Schumacher",I18N_NOOP("Maintainer"),
00074                       "schumacher@kde.org");
00075   aboutData.addAuthor("David Jarvie",0,
00076                       "software@astrojar.org.uk");
00077 
00078   KCmdLineArgs::init(argc,argv,&aboutData);
00079   KCmdLineArgs::addCmdLineOptions(options);
00080   KUniqueApplication::addCmdLineOptions();
00081 
00082   if (!MyApp::start())
00083     exit(0);
00084 
00085   MyApp app;
00086 
00087   return app.exec();
00088 }
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:22 2003 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001