kitchensync

main.cpp
1 /*
2  This file is part of KitchenSync.
3 
4  Copyright (c) 2005 Tobias Koenig <tokoe@kde.org>
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 */
20 
21 #include <kdebug.h>
22 #include <tdeaboutdata.h>
23 #include <tdecmdlineargs.h>
24 #include <kuniqueapplication.h>
25 #include <stdlib.h>
26 
27 #include "mainwidget.h"
28 #include "mainwindow.h"
29 
30 static TDECmdLineOptions options[] =
31 {
32  TDECmdLineLastOption
33 };
34 
35 int main( int argc, char **argv )
36 {
37  TDEAboutData *about = MainWidget::aboutData();
38 
39  TDECmdLineArgs::init( argc, argv, about );
40  TDECmdLineArgs::addCmdLineOptions( options );
41  KUniqueApplication::addCmdLineOptions();
42 
43  KUniqueApplication::addCmdLineOptions();
44 
45  if( !KUniqueApplication::start() ) {
46  kdDebug() << "kitchensync already runs." << endl;
47  exit( 0 );
48  };
49 
50  KUniqueApplication app;
51 
52  TDEGlobal::locale()->insertCatalogue( "libkcal" );
53 
54  MainWindow *mainWindow = new MainWindow;
55  mainWindow->show();
56 
57  app.exec();
58 }
This class serves as the main window for Kitchensync.
Definition: mainwindow.h:32