moved kdeaccessibility kdeaddons kdeadmin kdeartwork kdebindings kdeedu kdegames...
[kdeedu.git] / kstars / kstars / tools / scriptfunction.h
blobabb63707362f2387dbc0465ce94b2041a0a9b1d4
1 /***************************************************************************
2 scriptfunction.h - description
3 -------------------
4 begin : Thu Apr 17 2003
5 copyright : (C) 2003 by Jason Harris
6 email : kstars@30doradus.org
7 ***************************************************************************/
9 /***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
18 #ifndef SCRIPTFUNCTION_H
19 #define SCRIPTFUNCTION_H
21 #include <qstring.h>
23 /**
25 * Jason Harris
26 **/
27 class ScriptFunction
29 public:
30 ScriptFunction( QString name, QString desc, bool clockfcn=false,
31 QString at1="", QString an1="",
32 QString at2="", QString an2="",
33 QString at3="", QString an3="",
34 QString at4="", QString an4="",
35 QString at5="", QString an5="",
36 QString at6="", QString an6=""
38 ScriptFunction( ScriptFunction *sf );
39 ~ScriptFunction();
41 QString name() const { return Name; }
42 QString prototype() const;
43 QString description() const { return Description; }
44 QString argType( unsigned int n ) const { return ArgType[n]; }
45 QString argName( unsigned int n ) const { return ArgName[n]; }
46 QString argVal( unsigned int n ) const { return ArgVal[n]; }
48 void setValid( bool b ) { Valid = b; }
49 bool valid() const { return Valid; }
51 void setClockFunction( bool b=true ) { ClockFunction = b; }
52 bool isClockFunction() const { return ClockFunction; }
54 void setArg( unsigned int n, QString newVal ) { ArgVal[n] = newVal; }
55 bool checkArgs();
56 unsigned int numArgs() const { return NumArgs; }
58 QString scriptLine() const;
60 void setINDIProperty(QString prop) { INDIProp = prop; }
61 QString INDIProperty() const { return INDIProp; }
63 private:
64 QString Name, Description;
65 QString ArgType[6];
66 QString ArgName[6];
67 QString ArgVal[6];
68 QString INDIProp;
69 bool Valid, ClockFunction;
70 unsigned int NumArgs;
73 #endif