kalarmd Library API Documentation

guiapp.cpp

00001 /*
00002     This file is part of the KDE alarm daemon GUI.
00003     Copyright (c) 1997-1999 Preston Brown
00004     Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
00005     Copyright (c) 2001 David Jarvie <software@astrojar.org.uk>
00006 
00007     This program is free software; you can redistribute it and/or modify
00008     it under the terms of the GNU General Public License as published by
00009     the Free Software Foundation; either version 2 of the License, or
00010     (at your option) any later version.
00011 
00012     This program 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
00015     GNU General Public License for more details.
00016 
00017     You should have received a copy of the GNU General Public License
00018     along with this program; if not, write to the Free Software
00019     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00020 
00021     As a special exception, permission is given to link this program
00022     with any edition of Qt, and distribute the resulting executable,
00023     without including the source code for Qt in the source distribution.
00024 */
00025 
00026 // $Id: guiapp.cpp,v 1.5 2002/01/16 16:57:02 cschumac Exp $
00027 
00028 #include <qstring.h>
00029 
00030 #include <kcmdlineargs.h>
00031 #include <kdebug.h>
00032 
00033 #include "alarmgui.h"
00034 
00035 #include "guiapp.h"
00036 #include "guiapp.moc"
00037 
00038 
00039 AlarmGuiApp::AlarmGuiApp() :
00040   KUniqueApplication(),
00041   mAdg(0L)
00042 {
00043 }
00044 
00045 AlarmGuiApp::~AlarmGuiApp()
00046 {
00047 }
00048 
00049 int AlarmGuiApp::newInstance()
00050 {
00051   kdDebug() << "kalarmdgui:AlarmGuiApp::newInstance()" << endl;
00052 
00053   // Check if we already have a running alarm daemon widget
00054   if (mAdg) return 0;
00055 
00056   KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
00057 
00058   mAdg = new AlarmGui(0L, DCOP_OBJECT_NAME);
00059 
00060   return 0;
00061 }
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.4.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sat Oct 18 02:47:22 2003 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001