24 #include <QtCore/QDebug>
25 #include <QtGui/QFont>
26 #include <QtCore/QStringList>
27 using namespace KJSEmbed;
46 bool cppValue =
value.exactMatch();
47 result = KJS::jsBoolean(cppValue);
51 QString cppValue =
value.family();
56 bool cppValue =
value.fixedPitch();
57 result = KJS::jsBoolean(cppValue);
63 result = KJS::jsBoolean(cppValue);
80 bool cppValue =
value.isCopyOf(arg0);
81 result = KJS::jsBoolean(cppValue);
85 bool cppValue =
value.italic();
86 result = KJS::jsBoolean(cppValue);
90 bool cppValue =
value.kerning();
91 result = KJS::jsBoolean(cppValue);
100 QString cppValue =
value.lastResortFamily();
105 QString cppValue =
value.lastResortFont();
110 bool cppValue =
value.overline();
111 result = KJS::jsBoolean(cppValue);
115 int cppValue =
value.pixelSize();
116 result = KJS::jsNumber(cppValue);
120 int cppValue =
value.pointSize();
121 result = KJS::jsNumber(cppValue);
125 bool cppValue =
value.rawMode();
126 result = KJS::jsBoolean(cppValue);
130 QString cppValue =
value.rawName();
141 QFont cppValue =
value.resolve(arg0);
176 int arg0 = KJSEmbed::
extractInt(exec, args, 0);
181 int arg0 = KJSEmbed::
extractInt(exec, args, 0);
196 int arg0 = KJSEmbed::
extractInt(exec, args, 0);
206 QFont::Style arg0 = (QFont::Style) KJSEmbed::
extractInt(exec, args, 0);
211 QFont::StyleHint arg0 = (QFont::StyleHint) KJSEmbed::
extractInt(exec, args, 0);
212 QFont::StyleStrategy arg1 = (QFont::StyleStrategy) KJSEmbed::
extractInt(exec, args, 1);
217 QFont::StyleStrategy arg0 = (QFont::StyleStrategy) KJSEmbed::
extractInt(exec, args, 0);
227 int arg0 = KJSEmbed::
extractInt(exec, args, 0);
232 int cppValue =
value.stretch();
233 result = KJS::jsNumber(cppValue);
237 bool cppValue =
value.strikeOut();
238 result = KJS::jsBoolean(cppValue);
243 result = KJS::jsNumber(cppValue);
247 QFont::StyleHint cppValue =
value.styleHint();
248 result = KJS::jsNumber(cppValue);
252 QFont::StyleStrategy cppValue =
value.styleStrategy();
253 result = KJS::jsNumber(cppValue);
258 QString cppValue =
value.substitute(arg0);
264 QStringList cppValue =
value.substitutes(arg0);
269 QStringList cppValue =
value.substitutions();
274 QString cppValue =
value.toString();
279 bool cppValue =
value.underline();
280 result = KJS::jsBoolean(cppValue);
284 int cppValue =
value.weight();
285 result = KJS::jsNumber(cppValue);
290 {
"bold", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::callbold},
291 {
"exactMatch", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::callexactMatch},
292 {
"family", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::callfamily},
293 {
"fixedPitch", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::callfixedPitch},
294 {
"fromString", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::callfromString},
295 {
"insertSubstitution", 1, KJS::DontDelete|KJS::ReadOnly, &FontNS::callinsertSubstitution},
296 {
"insertSubstitutions", 1, KJS::DontDelete|KJS::ReadOnly, &FontNS::callinsertSubstitutions},
297 {
"isCopyOf", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::callisCopyOf},
298 {
"italic", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::callitalic},
299 {
"kerning", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::callkerning},
300 {
"key", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::callkey},
301 {
"lastResortFamily", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::calllastResortFamily},
302 {
"lastResortFont", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::calllastResortFont},
303 {
"overline", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::calloverline},
304 {
"pixelSize", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::callpixelSize},
305 {
"pointSize", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::callpointSize},
306 {
"rawMode", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::callrawMode},
307 {
"rawName", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::callrawName},
308 {
"removeSubstitution", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::callremoveSubstitution},
309 {
"resolve", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::callresolve},
310 {
"setBold", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::callsetBold},
311 {
"setFamily", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::callsetFamily},
312 {
"setFixedPitch", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::callsetFixedPitch},
313 {
"setItalic", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::callsetItalic},
314 {
"setKerning", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::callsetKerning},
315 {
"setOverline", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::callsetOverline},
316 {
"setPixelSize", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::callsetPixelSize},
317 {
"setPointSize", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::callsetPointSize},
318 {
"setRawMode", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::callsetRawMode},
319 {
"setRawName", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::callsetRawName},
320 {
"setStretch", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::callsetStretch},
321 {
"setStrikeOut", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::callsetStrikeOut},
322 {
"setStyle", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::callsetStyle},
323 {
"setStyleHint", 1, KJS::DontDelete|KJS::ReadOnly, &FontNS::callsetStyleHint},
324 {
"setStyleStrategy", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::callsetStyleStrategy},
325 {
"setUnderline", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::callsetUnderline},
326 {
"setWeight", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::callsetWeight},
327 {
"stretch", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::callstretch},
328 {
"strikeOut", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::callstrikeOut},
329 {
"style", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::callstyle},
330 {
"styleHint", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::callstyleHint},
331 {
"styleStrategy", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::callstyleStrategy},
332 {
"substitute", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::callsubstitute},
333 {
"substitutes", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::callsubstitutes},
334 {
"substitutions", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::callsubstitutions},
335 {
"toString", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::calltoString},
336 {
"underline", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::callunderline},
337 {
"weight", 0, KJS::DontDelete|KJS::ReadOnly, &FontNS::callweight}
344 if( args.size() == 0 )
static const KJS::ClassInfo info
value setFixedPitch(arg0)
static void publish(KJS::ExecState *exec, KJS::JSObject *object, const Method *methods)
Publishes an array of Methods to an object.
KJS::JSValue * createVariant(KJS::ExecState *exec, const KJS::UString &className, const T &value)
Can create any known KJSEmbed::VariantBinding object and set the value.
value insertSubstitution(arg0, arg1)
bool KJSEMBED_EXPORT extractBool(KJS::ExecState *exec, const KJS::List &args, int idx, bool defaultValue=false)
Extracts a bool from an argument list.
static const KJS::ClassInfo info
int KJSEMBED_EXPORT extractInt(KJS::ExecState *exec, const KJS::List &args, int idx, int defaultValue=0)
Extracts an integer from an argument list.
value setStyleStrategy(arg0)
KJS::JSValue * createQStringList(KJS::ExecState *exec, const QStringList &value)
Create a new KJS::JSValue with the value of the QStringList.
value setStyleHint(arg0, arg1)
FontBinding(KJS::ExecState *exec, const QFont &value)
#define START_CTOR(TYPE, JSNAME, ARGS)
value insertSubstitutions(arg0, arg1)
QStringList KJSEMBED_EXPORT extractQStringList(KJS::ExecState *exec, const KJS::List &args, int idx, const QStringList &defaultValue=QStringList())
Extracts a QStringList from an argument list.
static const Method * methods()
END_QOBJECT_METHOD QString key
KJS::JSCell * jsString(const QString &s)
END_OBJECT_METHOD QBrush cppValue
value removeSubstitution(arg0)
#define END_VARIANT_METHOD
End a variant method started by START_VARIANT_METHOD.
END_OBJECT_METHOD QPolygon arg0
#define START_VARIANT_METHOD(METHODNAME, TYPE)
A simple variant syle method.
QString KJSEMBED_EXPORT extractQString(KJS::ExecState *exec, const KJS::List &args, int idx, const QString defaultValue=QString())
Extracts a QString from an argument list.
QVariant KJSEMBED_EXPORT extractVariant(KJS::ExecState *exec, KJS::JSValue *value)
Extracts a QVariant from a KJS::JSValue if the conversion fails a QVariant::Null is returned...
KJS::JSValue * style(KJS::ExecState *exec, KJS::JSObject *self, const KJS::List &args)