• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdepim
  • Sitemap
  • Contact Us
 

korganizer/korgac

korgacmain.cpp

Go to the documentation of this file.
00001 /*
00002   This file is part of the KOrganizer alarm client.
00003 
00004   Copyright (c) 2003 Cornelius Schumacher <schumacher@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 along
00017   with this program; if not, write to the Free Software Foundation, Inc.,
00018   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00019 
00020   As a special exception, permission is given to link this program
00021   with any edition of Qt, and distribute the resulting executable,
00022   without including the source code for Qt in the source distribution.
00023 */
00024 
00025 #include "koalarmclient.h"
00026 
00027 #include <kdebug.h>
00028 #include <klocale.h>
00029 #include <kcmdlineargs.h>
00030 #include <kaboutdata.h>
00031 #include <kuniqueapplication.h>
00032 
00033 #include <stdlib.h>
00034 
00035 class ReminderDaemonApp : public KUniqueApplication
00036 {
00037   public:
00038     ReminderDaemonApp() : mClient( 0 )
00039     {
00040       // ensure the Quit dialog's Cancel reponse does not close the app
00041       setQuitOnLastWindowClosed( false );
00042     }
00043 
00044     int newInstance()
00045     {
00046       // Check if we already have a running alarm daemon widget
00047       if ( mClient ) {
00048         return 0;
00049       }
00050 
00051       mClient = new KOAlarmClient;
00052 
00053       return 0;
00054     }
00055 
00056   private:
00057     KOAlarmClient *mClient;
00058 };
00059 
00060 static const char korgacVersion[] = "0.9";
00061 
00062 int main( int argc, char **argv )
00063 {
00064   KLocale::setMainCatalog( "korganizer" );
00065   KAboutData aboutData( "korgac", 0, ki18n( "KOrganizer Reminder Daemon" ),
00066                         korgacVersion, ki18n( "KOrganizer Reminder Daemon" ),
00067                         KAboutData::License_GPL,
00068                         ki18n( "(c) 2003 Cornelius Schumacher" ),
00069                         KLocalizedString(), "http://pim.kde.org" );
00070   aboutData.addAuthor( ki18n( "Cornelius Schumacher" ), ki18n( "Former Maintainer" ),
00071                        "schumacher@kde.org" );
00072   aboutData.addAuthor( ki18n( "Reinhold Kainhofer" ), ki18n ( "Former Maintainer" ),
00073                        "kainhofer@kde.org" );
00074   aboutData.addAuthor( ki18n( "Allen Winter" ),ki18n( "Janitorial Staff" ),
00075                        "winter@kde.org" );
00076 
00077   KCmdLineArgs::init( argc, argv, &aboutData );
00078 
00079   KCmdLineOptions options;
00080   KCmdLineArgs::addCmdLineOptions( options );
00081   KUniqueApplication::addCmdLineOptions();
00082 
00083   if ( !ReminderDaemonApp::start() ) {
00084     exit( 0 );
00085   }
00086 
00087   ReminderDaemonApp app;
00088   app.disableSessionManagement();
00089 
00090   return app.exec();
00091 }

korganizer/korgac

Skip menu "korganizer/korgac"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  •   doc
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal