knotes Library API Documentation

main.cpp

00001 /*******************************************************************
00002  KNotes -- Notes for the KDE project
00003 
00004  Copyright (c) 1997-2003, The KNotes Developers
00005 
00006  This program is free software; you can redistribute it and/or
00007  modify it under the terms of the GNU General Public License
00008  as published by the Free Software Foundation; either version 2
00009  of the License, or (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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00019 *******************************************************************/
00020 
00021 #include <kuniqueapplication.h>
00022 #include <kcmdlineargs.h>
00023 #include <kaboutdata.h>
00024 #include <klocale.h>
00025 
00026 #include <iostream>
00027 
00028 #include "knotesapp.h"
00029 #include "version.h"
00030 
00031 using namespace std;
00032 
00033 int main( int argc, char* argv[] )
00034 {
00035     KAboutData aboutData( "knotes", I18N_NOOP("KNotes"),
00036         I18N_NOOP( KNOTES_VERSION ), I18N_NOOP( "KDE Notes" ), KAboutData::License_GPL,
00037         I18N_NOOP("(c) 1997-2003, The KNotes Developers") );
00038 
00039     aboutData.addAuthor("Michael Brade", I18N_NOOP("Maintainer"), "brade@kde.org");
00040     aboutData.addAuthor("Bernd Johannes Wuebben", I18N_NOOP("Original KNotes Author"), "wuebben@kde.org");
00041     aboutData.addAuthor("Wynn Wilkes", I18N_NOOP("Ported KNotes to KDE 2"), "wynnw@calderasystems.com");
00042     aboutData.addAuthor("Matthias Ettrich",0, "ettrich@kde.org");
00043     aboutData.addAuthor("Didier Belot",0, "dib@avo.fr");
00044     aboutData.addAuthor("Harri Porten",0, "porten@kde.org");
00045     aboutData.addAuthor("David Faure",0, "faure@kde.org");
00046     aboutData.addAuthor("Dirk A. Mueller",0, "dmuell@gmx.net");
00047     aboutData.addAuthor("Petter Reinholdtsen",0, "pere@td.org.uit.no");
00048     aboutData.addAuthor("Carsten Pfeiffer",0, "pfeiffer@kde.org");
00049     aboutData.addAuthor("Espen Sand",0, "espen@kde.org");
00050     aboutData.addAuthor("Matthias Kiefer",0, "kiefer@kde.org");
00051 
00052     KCmdLineArgs::init( argc, argv, &aboutData );
00053 
00054     KUniqueApplication::addCmdLineOptions();
00055 
00056     // Check if unique application is already running...
00057     if ( !KUniqueApplication::start() )
00058     {
00059         cerr << "KNotes is already running, exiting..." << endl;
00060         return 1;
00061     }
00062     KUniqueApplication app;
00063 
00064     KNotesApp* a = new KNotesApp();
00065 
00066     app.connect( &app, SIGNAL( lastWindowClosed() ), &app, SLOT( quit() ) );
00067 
00068     a->show();
00069 
00070     int rval = app.exec();
00071     delete a;
00072 
00073     return rval;
00074 }
KDE Logo
This file is part of the documentation for knotes Library Version 3.2.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Mar 6 17:18:05 2004 by doxygen 1.3.6-20040222 written by Dimitri van Heesch, © 1997-2003