summaryrefslogtreecommitdiffstats
path: root/kstars/kstars/tools/scriptfunction.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitce599e4f9f94b4eb00c1b5edb85bce5431ab3df2 (patch)
treed3bb9f5d25a2dc09ca81adecf39621d871534297 /kstars/kstars/tools/scriptfunction.h
downloadtdeedu-ce599e4f9f94b4eb00c1b5edb85bce5431ab3df2.tar.gz
tdeedu-ce599e4f9f94b4eb00c1b5edb85bce5431ab3df2.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kstars/kstars/tools/scriptfunction.h')
-rw-r--r--kstars/kstars/tools/scriptfunction.h73
1 files changed, 73 insertions, 0 deletions
diff --git a/kstars/kstars/tools/scriptfunction.h b/kstars/kstars/tools/scriptfunction.h
new file mode 100644
index 00000000..abb63707
--- /dev/null
+++ b/kstars/kstars/tools/scriptfunction.h
@@ -0,0 +1,73 @@
+/***************************************************************************
+ scriptfunction.h - description
+ -------------------
+ begin : Thu Apr 17 2003
+ copyright : (C) 2003 by Jason Harris
+ email : kstars@30doradus.org
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+
+#ifndef SCRIPTFUNCTION_H
+#define SCRIPTFUNCTION_H
+
+#include <qstring.h>
+
+/**
+ *
+ * Jason Harris
+ **/
+class ScriptFunction
+{
+public:
+ ScriptFunction( QString name, QString desc, bool clockfcn=false,
+ QString at1="", QString an1="",
+ QString at2="", QString an2="",
+ QString at3="", QString an3="",
+ QString at4="", QString an4="",
+ QString at5="", QString an5="",
+ QString at6="", QString an6=""
+ );
+ ScriptFunction( ScriptFunction *sf );
+ ~ScriptFunction();
+
+ QString name() const { return Name; }
+ QString prototype() const;
+ QString description() const { return Description; }
+ QString argType( unsigned int n ) const { return ArgType[n]; }
+ QString argName( unsigned int n ) const { return ArgName[n]; }
+ QString argVal( unsigned int n ) const { return ArgVal[n]; }
+
+ void setValid( bool b ) { Valid = b; }
+ bool valid() const { return Valid; }
+
+ void setClockFunction( bool b=true ) { ClockFunction = b; }
+ bool isClockFunction() const { return ClockFunction; }
+
+ void setArg( unsigned int n, QString newVal ) { ArgVal[n] = newVal; }
+ bool checkArgs();
+ unsigned int numArgs() const { return NumArgs; }
+
+ QString scriptLine() const;
+
+ void setINDIProperty(QString prop) { INDIProp = prop; }
+ QString INDIProperty() const { return INDIProp; }
+
+private:
+ QString Name, Description;
+ QString ArgType[6];
+ QString ArgName[6];
+ QString ArgVal[6];
+ QString INDIProp;
+ bool Valid, ClockFunction;
+ unsigned int NumArgs;
+};
+
+#endif