kitchensync Library API Documentation

main.cpp

00001 /*
00002     This file is part of KitchenSync.
00003 
00004     Copyright (c) 2002 Holger Freyther <zecke@handhelds.org>
00005     Copyright (c) 2002 Maximilian Reiß <harlekin@handhelds.org>
00006 
00007     This library is free software; you can redistribute it and/or
00008     modify it under the terms of the GNU Library General Public
00009     License as published by the Free Software Foundation; either
00010     version 2 of the License, or (at your option) any later version.
00011 
00012     This library is distributed in the hope that it will be useful,
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015     Library General Public License for more details.
00016 
00017     You should have received a copy of the GNU Library General Public License
00018     along with this library; see the file COPYING.LIB.  If not, write to
00019     the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00020     Boston, MA 02111-1307, USA.
00021 */
00022 
00023 #include <kdebug.h>
00024 #include <kaboutdata.h>
00025 #include <kcmdlineargs.h>
00026 #include <kuniqueapplication.h>
00027 #include <stdlib.h>
00028 
00029 #include <mainwindow.h>
00030 
00031 #include "splash.h"
00032 #include "aboutdata.h"
00033 
00034 static KCmdLineOptions options[] =
00035 {
00036   KCmdLineLastOption
00037 };
00038 
00039 int main( int argc, char *argv[] )
00040 {
00041   KSync::AboutData aboutData;
00042 
00043   KCmdLineArgs::init( argc, argv, &aboutData );
00044   KCmdLineArgs::addCmdLineOptions( options );
00045   KUniqueApplication::addCmdLineOptions();
00046 
00047   KUniqueApplication::addCmdLineOptions();
00048 
00049   if( !KUniqueApplication::start() ) {
00050     kdDebug(5210) << "KitchenSync already runs." << endl;
00051     exit( 0 );
00052   };
00053 
00054   KUniqueApplication a;
00055   // time for a Widget
00056   KSync::Splash *splash = new KSync::Splash;
00057   KSync::MainWindow *mainwindow = new KSync::MainWindow;
00058   delete splash;
00059   mainwindow->show();
00060   kdDebug(5210) << "exec now " << endl;
00061   a.exec();
00062 }
KDE Logo
This file is part of the documentation for kitchensync Library Version 3.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Aug 23 18:20:09 2007 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003