Kstars
7#include "scriptfunction.h"
22 ArgDBusType[0] = DBusType(
at1);
25 ArgDBusType[1] = DBusType(
at2);
28 ArgDBusType[2] = DBusType(
at3);
31 ArgDBusType[3] = DBusType(
at4);
34 ArgDBusType[4] = DBusType(
at5);
37 ArgDBusType[5] = DBusType(
at6);
41 QString nameStyle =
"<span style=\"font-family:monospace;font-weight:600\">%1</span>";
42 QString typeStyle =
"<span style=\"font-family:monospace;color:#009d00\">%1</span>";
43 QString paramStyle =
"<span style=\"font-family:monospace;color:#00007f\">%1</span>";
45 Description =
"<html><head><meta name=\"qrichtext\" content=\"1\" /></head>";
46 Description +=
"<body style=\"font-size:11pt;font-family:sans\">";
50 if (!
at1.isEmpty() && !
an1.isEmpty())
57 if (!
at2.isEmpty() && !
an2.isEmpty())
64 if (!
at3.isEmpty() && !
an3.isEmpty())
71 if (!
at4.isEmpty() && !
an4.isEmpty())
78 if (!
at5.isEmpty() && !
an5.isEmpty())
85 if (!
at6.isEmpty() && !
an6.isEmpty())
113 Description =
sf->description();
114 ClockFunction =
sf->isClockFunction();
115 NumArgs =
sf->numArgs();
116 INDIProp =
sf->INDIProperty();
119 for (
unsigned int i = 0; i < 6; i++)
121 ArgType[i] =
sf->argType(i);
122 ArgName[i] =
sf->argName(i);
123 ArgDBusType[i] =
sf->argDBusType(i);
126 ArgVal[i] =
sf->argVal(i);
134 else if (type ==
QString(
"uint"))
136 else if (type ==
QString(
"double"))
138 else if (type ==
QString(
"QString"))
140 else if (type ==
QString(
"bool"))
146QString ScriptFunction::prototype()
const
151 if (!ArgType[0].isEmpty() && !ArgName[0].isEmpty())
153 p +=
' ' + ArgType[0];
154 p +=
' ' + ArgName[0];
158 if (!ArgType[1].isEmpty() && !ArgName[1].isEmpty())
160 p +=
", " + ArgType[1];
161 p +=
' ' + ArgName[1];
164 if (!ArgType[2].isEmpty() && !ArgName[2].isEmpty())
166 p +=
", " + ArgType[2];
167 p +=
' ' + ArgName[2];
170 if (!ArgType[3].isEmpty() && !ArgName[3].isEmpty())
172 p +=
", " + ArgType[3];
173 p +=
' ' + ArgName[3];
176 if (!ArgType[4].isEmpty() && !ArgName[4].isEmpty())
178 p +=
", " + ArgType[4];
179 p +=
' ' + ArgName[4];
182 if (!ArgType[5].isEmpty() && !ArgName[5].isEmpty())
184 p +=
", " + ArgType[5];
185 p +=
' ' + ArgName[5];
195QString ScriptFunction::scriptLine()
const
200 while (i < 6 && !ArgName[i].isEmpty())
204 if (ArgDBusType[i] ==
"string")
212 if (value.
at(0) !=
'\"' && value.
at(0) !=
'\'')
214 value =
'\"' + value;
216 if (value.
right(1) !=
"\"" && value.
right(1) !=
"\'")
218 value = value +
'\"';
224 out +=
' ' + ArgDBusType[i] +
':' + value;
Type type(const QSqlDatabase &db)
QString name(StandardShortcut id)
const QChar at(qsizetype position) const const
bool isEmpty() const const
QString right(qsizetype n) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:19:04 by
doxygen 1.10.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.