moved kdeaccessibility kdeaddons kdeadmin kdeartwork kdebindings kdeedu kdegames...
[kdeedu.git] / kig / scripting / script-common.h
blob4c23268bc3c41ca8f9a325ac508738a4c93db856
1 // Copyright (C) 2004 Pino Toscano <toscano.pino@tiscali.it>
3 // This program is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU General Public License
5 // as published by the Free Software Foundation; either version 2
6 // of the License, or (at your option) any later version.
8 // This program is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 // GNU General Public License for more details.
13 // You should have received a copy of the GNU General Public License
14 // along with this program; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
16 // 02111-1307, USA.
18 #ifndef KIG_SCRIPTING_SCRIPT_COMMON_H
19 #define KIG_SCRIPTING_SCRIPT_COMMON_H
21 #include <algorithm>
23 class QString;
25 class ScriptType
27 public:
28 /**
29 * This enum represents all the script language types actually in
30 * Kig. The first type ( Unknown ) can be used if we don't want
31 * particular tunings for a script language.
33 enum Type { Unknown = 0, Python = 1 };
34 /**
35 * Returns an i18n'ed statement like 'Now fill in the code:' with
36 * the name of the script language.
38 static QString fillCodeStatement( ScriptType::Type type );
39 /**
40 * Returns a template code for a script language.
42 static QString templateCode( ScriptType::Type type, uint nargs );
43 /**
44 * Returns the icon's name for a script language.
46 static const char* icon( ScriptType::Type type );
47 /**
48 * Returns the Kate highlight stytle name for a script language.
50 static QString highlightStyle( ScriptType::Type type );
51 /**
52 * Converts an int to a ScriptType::Type. Useful when reading script
53 * types from files.
55 static ScriptType::Type intToType( int type );
58 #endif