main.cpp
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #ifdef HAVE_CONFIG_H
00034 #include <config.h>
00035 #endif
00036
00037 #include "aboutdata.h"
00038 #include "kwatchgnupgmainwin.h"
00039
00040 #include <kuniqueapplication.h>
00041 #include <kcmdlineargs.h>
00042 #include <kmessagebox.h>
00043 #include <klocale.h>
00044 #include <kglobal.h>
00045 #include <kiconloader.h>
00046 #include <kdebug.h>
00047
00048 class KWatchGnuPGApplication : public KUniqueApplication {
00049 public:
00050 KWatchGnuPGApplication();
00051 ~KWatchGnuPGApplication();
00052 virtual int newInstance();
00053 private:
00054 KWatchGnuPGMainWindow* mMainWin;
00055 };
00056
00057 KWatchGnuPGApplication::KWatchGnuPGApplication()
00058 : KUniqueApplication(), mMainWin(0)
00059 {
00060 }
00061
00062 KWatchGnuPGApplication::~KWatchGnuPGApplication()
00063 {
00064 delete mMainWin;
00065 }
00066
00067 int KWatchGnuPGApplication::newInstance()
00068 {
00069 if( !mMainWin ) {
00070 mMainWin = new KWatchGnuPGMainWindow( 0, "kwatchgnupg mainwin" );
00071 setMainWidget( mMainWin );
00072 }
00073 mMainWin->show();
00074 return KUniqueApplication::newInstance();
00075 }
00076
00077 int main( int argc, char** argv )
00078 {
00079 AboutData aboutData;
00080
00081 KCmdLineArgs::init(argc, argv, &aboutData);
00082 static const KCmdLineOptions options[] = {
00083 KCmdLineLastOption
00084 };
00085 KCmdLineArgs::addCmdLineOptions( options );
00086 KWatchGnuPGApplication::addCmdLineOptions();
00087
00088 #if 0
00089 if (!KWatchGnuPGApplication::start()) {
00090 kdError() << "KWatchGnuPG is already running!" << endl;
00091 return 0;
00092 }
00093 #endif
00094 KWatchGnuPGApplication app;
00095 return app.exec();
00096 }
This file is part of the documentation for certmanager Library Version 3.3.0.