kitchensync

main.cpp

00001 /*
00002     This file is part of KitchenSync.
00003 
00004     Copyright (c) 2005 Tobias Koenig <tokoe@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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00019 */
00020 
00021 #include <kdebug.h>
00022 #include <kaboutdata.h>
00023 #include <kcmdlineargs.h>
00024 #include <kuniqueapplication.h>
00025 #include <stdlib.h>
00026 
00027 #include "mainwidget.h"
00028 #include "mainwindow.h"
00029 
00030 static KCmdLineOptions options[] =
00031 {
00032   KCmdLineLastOption
00033 };
00034 
00035 int main( int argc, char **argv )
00036 {
00037   KAboutData *about = MainWidget::aboutData();
00038 
00039   KCmdLineArgs::init( argc, argv, about );
00040   KCmdLineArgs::addCmdLineOptions( options );
00041   KUniqueApplication::addCmdLineOptions();
00042 
00043   KUniqueApplication::addCmdLineOptions();
00044 
00045   if( !KUniqueApplication::start() ) {
00046     kdDebug() << "kitchensync already runs." << endl;
00047     exit( 0 );
00048   };
00049 
00050   KUniqueApplication app;
00051   
00052   KGlobal::locale()->insertCatalogue( "libkcal" );
00053 
00054   MainWindow *mainWindow = new MainWindow;
00055   mainWindow->show();
00056 
00057   app.exec();
00058 }
KDE Home | KDE Accessibility Home | Description of Access Keys