summaryrefslogtreecommitdiffstats
path: root/src/main.cpp
blob: 57c4b4123c7a2309eefa2197e0d1212b22a48fd2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/***************************************************************************
 *                                                                         *
 *   Copyright (C) 2005, 2006 by Kevin Gilbert                             *
 *   [email protected]                                                *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 *                                                                         *
 ***************************************************************************/

#include <tdeaboutdata.h>
#include <tdeapplication.h>
#include <tdecmdlineargs.h>
#include <kdebug.h>
#include <tdelocale.h>

#include "global.h"
#include "knmap.h"

static const char      description[] = I18N_NOOP( "A TDE frontend for nmap" );
static TDECmdLineOptions options[]     = { TDECmdLineLastOption };

//	main
//	====

int main( int argc, string argv[])
{	TQString version = TQString( "Version 2.1, %1 %2" ).arg( __TIME__ ).arg( __DATE__ );
	TDEAboutData about( "knmap",
					  I18N_NOOP( "Knmap" ),
 					  version,
					  description,
					  TDEAboutData::License_GPL,
					  "(C) 2005, 2006 Kevin Gilbert",
					  I18N_NOOP( "This program is a complete re-write of one by the same name written by Alexandre\n"
								 "Sagala. The last version of that program was 0.9 which was released on 2003-03-09\n"
								 "and targeted the KDE 2.2 and QT 2.3 environments. Unfortunately it does not compile\n"
								 "on today's KDE / QT environments.\n"
								 "\n"
								 "Not to mention that it did not cater for the full set of 'nmap' options. Or, perhaps,\n"
								 "'nmap' progressed whilst that version of Knmap languished.\n"
								 "\n"
								 "The icons used for this application are from the Open Clip Art Library. I am indebted\n"
								 "to those damn fine folk as my artistic ability is zero - which is marginally above\n"
								 "my programming ability.  :-(" ),
					  "http://informatics.cdu.edu.au/staff/kgilbert" );
	about.addAuthor( "Kevin Gilbert",
					 "Initial rewrite released as version 1.0\nVersions 2.0, 2.1",
					 "[email protected]",
					 "http://informatics.cdu.edu.au/staff/kgilbert" );
	TDECmdLineArgs::init( argc, argv, &about );
	TDECmdLineArgs::addCmdLineOptions( options );
	TDEApplication app;

	if( app.isRestored( ))
	{	RESTORE( Knmap );
	}
	else
	{	TDECmdLineArgs* args = TDECmdLineArgs::parsedArgs( );
		Knmap* mainWin = new Knmap;
		app.setMainWidget( mainWin );
		mainWin->show( );
		args->clear( );
	}

	return app.exec( );
}