summaryrefslogtreecommitdiffstats
path: root/kturtle/src/main.cpp
blob: d5810c6b8d06eb02a9fab4d13dd32333c5b6b892 (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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
/*
    Copyright (C) 2003 Cies Breijs <cies # kde ! nl>
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of version 2 of the GNU General Public
    License as published by the Free Software Foundation.

    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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */

 
#include <kaboutdata.h>
#include <kapplication.h>
#include <kcmdlineargs.h>

#include "kturtle.h"


static const char description[] =
	I18N_NOOP("Educational Programming Environment using the Logo programming language");

static const char version[] = "0.6";

static const char copyright[] = I18N_NOOP("(C) 2003 The KTurtle Authors");

static const char website[] = "http://edu.kde.org/kturtle";

static KCmdLineOptions options[] =
{
///   @todo  so some about the command line arguments... Something like:
// 	{ "e <argument>", I18N_NOOP( "sets the folder with the examples to <argument>" ), 0 }
// 	{ "t <argument>", I18N_NOOP( "sets the xml file containing the translatiosns of the Logo commands" ), 0 }
// 	{ "h <argument>", I18N_NOOP( "sets the xml file containing the highlightstyle" ), 0 }
// 	{ "+[URL]", I18N_NOOP( "A Logo file to open" ), 0 },
	KCmdLineLastOption
};


int main(int argc, char **argv)
{
	KAboutData about("kturtle", I18N_NOOP("KTurtle"), version, description, KAboutData::License_GPL, copyright, 0, website);
	about.addAuthor("Cies Breijs",
	      I18N_NOOP("Main developer and initiator"),
	                "cies # kde.nl");
	about.addAuthor("Anne-Marie Mahfouf",
	      I18N_NOOP("Big contributor, supporter and fan"),
	                "annemarie.mahfouf # free.fr");    
	about.addAuthor("Walter Schreppers",
	      I18N_NOOP("Author of \"wsbasic\" (wsbasic.sf.net) the base for the interpreter of KTurtle"),
	                "Walter.Schreppers # ua.ac.be");
	about.addCredit("Matthias Meßmer",
	      I18N_NOOP("German Data Files"),
	                "bmlmessmer # web.de"); 
	about.addCredit("Burkhard Lück",
	      I18N_NOOP("German Data Files"),
			"lueck # hube-lueck.de"); 
	about.addCredit("Stefan Asserhäll",
	      I18N_NOOP("Swedish Data Files"),
	                "stefan.asserhall # telia.com"); 
	about.addCredit("Jure Repinc",
	      I18N_NOOP("Slovenian Data Files"),
	                "jlp # holodeck1.com");
	about.addCredit("Chusslove Illich",
	      I18N_NOOP("Serbian (Latin and Cyrillic) Data Files"),
	                "caslav.ilic # gmx.net");
	about.addCredit("Pino Toscano",
	      I18N_NOOP("Italian Data Files"),
	                "toscano.pino # tiscali.it");
	about.addCredit("Andy Potter",
	      I18N_NOOP("British English Data Files"),
	                "A.J.Potter # rhul.ac.uk");	                
	about.addCredit("Rafael Beccar",
	      I18N_NOOP("Spanish Data Files"),
	                "rafael.beccar # kdemail.net");
	about.addCredit("Riverson Rios",
			I18N_NOOP("Brazilian Portuguese Data Files"),
			"riverson # ccv.ufc.br");
        about.addCredit("Karl Ove Hufthammer",
			 I18N_NOOP("Norwegian Nynorsk and Bokmål Data files"), "karl # huftis.org");
	about.addCredit("Albert Astals Cid",
	      I18N_NOOP("Parser Cyrillic support"),
	                "astals11 # terra.es");
	TDECmdLineArgs::init(argc, argv, &about);
	TDECmdLineArgs::addCmdLineOptions( options );
	KApplication app;
	MainWindow *mainwindow = 0;

	if ( app.isRestored() )
	{
		RESTORE(MainWindow);
	}
	else
	{
		// no session... just start up normally
		TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();

		/// @todo do something with the command line args here

		mainwindow = new MainWindow();
		app.setMainWidget(mainwindow);
		mainwindow->show();

		args->clear();
	}

	// mainwindow has WDestructiveClose flag by default, so it will delete itself.
	return app.exec();
}