Kstars

scriptfunction.h
1/*
2 SPDX-FileCopyrightText: 2003 Jason Harris <kstars@30doradus.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include <QString>
10
11/**
12 *
13 * Jason Harris
14 **/
16{
17 public:
18 ScriptFunction(const QString &name, const QString &desc, bool clockfcn = false, const QString &at1 = QString(),
19 const QString &an1 = QString(), const QString &at2 = QString(), const QString &an2 = QString(),
20 const QString &at3 = QString(), const QString &an3 = QString(), const QString &at4 = QString(),
21 const QString &an4 = QString(), const QString &at5 = QString(), const QString &an5 = QString(),
22 const QString &at6 = QString(), const QString &an6 = QString());
23 explicit ScriptFunction(ScriptFunction *sf);
24 ~ScriptFunction() = default;
25
26 QString name() const { return Name; }
27 QString prototype() const;
28 QString description() const { return Description; }
29 QString argType(unsigned int n) const { return ArgType[n]; }
30 QString argName(unsigned int n) const { return ArgName[n]; }
31 QString argVal(unsigned int n) const { return ArgVal[n]; }
32 QString argDBusType(unsigned int n) const { return ArgDBusType[n]; }
33
34 void setValid(bool b) { Valid = b; }
35 bool valid() const { return Valid; }
36
37 void setClockFunction(bool b = true) { ClockFunction = b; }
38 bool isClockFunction() const { return ClockFunction; }
39
40 void setArg(unsigned int n, QString newVal) { ArgVal[n] = newVal; }
41 bool checkArgs();
42 int numArgs() const { return NumArgs; }
43
44 QString scriptLine() const;
45
46 void setINDIProperty(QString prop) { INDIProp = prop; }
47 QString INDIProperty() const { return INDIProp; }
48 QString DBusType(const QString &type);
49
50 private:
51 QString Name, Description;
52 QString ArgType[6];
53 QString ArgDBusType[6];
54 QString ArgName[6];
55 QString ArgVal[6];
56 QString INDIProp;
57 bool Valid, ClockFunction;
58 int NumArgs;
59};
Jason Harris.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:47 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.