Main Page | Class List | File List | Class Members | File Members | Related Pages

main.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2005 by Bojan D.                                        *
00003  *   bojan_d@users.sourceforge.net                                         *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 
00037 #include "kwebsnap.h"
00038 #include <kapplication.h>
00039 #include <kaboutdata.h>
00040 #include <kcmdlineargs.h>
00041 #include <klocale.h>
00042 
00043 static const char description[] =
00044     I18N_NOOP("FTP image capture program thingy.");
00045 
00046 static const char version[] = "0.1";
00047 
00048 static KCmdLineOptions options[] =
00049 {
00050 //    { "+[URL]", I18N_NOOP( "Document to open." ), 0 },
00051     KCmdLineLastOption
00052 };
00053 
00059 int main(int argc, char **argv)
00060 {
00061     KAboutData about("kwebsnap", I18N_NOOP("KWebSnap"), version, description,
00062                      KAboutData::License_GPL, "(C) 2005 Bojan D.", 0, "http://websnap.sourceforge.net", "bojan_d@users.sourceforge.net");
00063     about.addAuthor( "Bojan D.", "Main developer", "bojan_d@users.sourceforge.net" );
00064         about.addCredit( "KSnapshot developers", I18N_NOOP("Code for taking screenshots."), "http://www.kde.org" );
00065     about.addCredit( "The amaroK Development Squad", I18N_NOOP("Code to draw icon inside system tray."), "amarok.kde.org");
00066         
00067         KCmdLineArgs::init(argc, argv, &about);
00068     KCmdLineArgs::addCmdLineOptions( options );
00069     
00070         KApplication app;
00071     KWebSnap *mainWin = 0;
00072 
00073     if (app.isRestored())
00074     {
00075         RESTORE(KWebSnap);
00076     }
00077     else
00078     {
00079         // no session.. just start up normally
00080         KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
00081 
00083 
00084         mainWin = new KWebSnap();
00085         app.setMainWidget( mainWin );
00086                 mainWin->show();
00087                 
00088         args->clear();
00089     }
00090 
00091     // mainWin has WDestructiveClose flag by default, so it will delete itself.
00092     return app.exec();
00093 }
00094 

Generated on Mon Sep 5 12:52:34 2005 for kwebsnap.kdevelop by  doxygen 1.3.9.1