1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850
|
#include <QtScript/QScriptEngine>
#include <QtScript/QScriptContext>
#include <QtScript/QScriptValue>
#include <QtCore/QStringList>
#include <QtCore/QDebug>
#include <qmetaobject.h>
#include <qtextformat.h>
#include <QVariant>
#include <qbrush.h>
#include <qcolor.h>
#include <qfont.h>
#include <qpen.h>
#include <qstringlist.h>
#include <qtextformat.h>
#include <qvector.h>
#include "qtscriptshell_QTextCharFormat.h"
static const char * const qtscript_QTextCharFormat_function_names[] = {
"QTextCharFormat"
// static
// prototype
, "anchorHref"
, "anchorNames"
, "font"
, "fontCapitalization"
, "fontFamily"
, "fontFixedPitch"
, "fontItalic"
, "fontKerning"
, "fontLetterSpacing"
, "fontOverline"
, "fontPointSize"
, "fontStrikeOut"
, "fontStyleHint"
, "fontStyleStrategy"
, "fontUnderline"
, "fontWeight"
, "fontWordSpacing"
, "isAnchor"
, "setAnchor"
, "setAnchorHref"
, "setAnchorNames"
, "setFont"
, "setFontCapitalization"
, "setFontFamily"
, "setFontFixedPitch"
, "setFontItalic"
, "setFontKerning"
, "setFontLetterSpacing"
, "setFontOverline"
, "setFontPointSize"
, "setFontStrikeOut"
, "setFontStyleHint"
, "setFontStyleStrategy"
, "setFontUnderline"
, "setFontWeight"
, "setFontWordSpacing"
, "setTableCellColumnSpan"
, "setTableCellRowSpan"
, "setTextOutline"
, "setToolTip"
, "setUnderlineColor"
, "setUnderlineStyle"
, "setVerticalAlignment"
, "tableCellColumnSpan"
, "tableCellRowSpan"
, "textOutline"
, "toolTip"
, "underlineColor"
, "underlineStyle"
, "verticalAlignment"
, "toString"
};
static const char * const qtscript_QTextCharFormat_function_signatures[] = {
""
// static
// prototype
, ""
, ""
, ""
, ""
, ""
, ""
, ""
, ""
, ""
, ""
, ""
, ""
, ""
, ""
, ""
, ""
, ""
, ""
, "bool anchor"
, "String value"
, "List names"
, "QFont font"
, "Capitalization capitalization"
, "String family"
, "bool fixedPitch"
, "bool italic"
, "bool enable"
, "qreal spacing"
, "bool overline"
, "qreal size"
, "bool strikeOut"
, "StyleHint hint, StyleStrategy strategy"
, "StyleStrategy strategy"
, "bool underline"
, "int weight"
, "qreal spacing"
, "int tableCellColumnSpan"
, "int tableCellRowSpan"
, "QPen pen"
, "String tip"
, "QColor color"
, "UnderlineStyle style"
, "VerticalAlignment alignment"
, ""
, ""
, ""
, ""
, ""
, ""
, ""
""
};
static QScriptValue qtscript_QTextCharFormat_throw_ambiguity_error_helper(
QScriptContext *context, const char *functionName, const char *signatures)
{
QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n'));
QStringList fullSignatures;
for (int i = 0; i < lines.size(); ++i)
fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i)));
return context->throwError(QString::fromLatin1("QTextCharFormat::%0(): could not find a function match; candidates are:\n%1")
.arg(functionName).arg(fullSignatures.join(QLatin1String("\n"))));
}
Q_DECLARE_METATYPE(QTextCharFormat)
Q_DECLARE_METATYPE(QTextCharFormat*)
Q_DECLARE_METATYPE(QtScriptShell_QTextCharFormat)
Q_DECLARE_METATYPE(QtScriptShell_QTextCharFormat*)
Q_DECLARE_METATYPE(QTextCharFormat::VerticalAlignment)
Q_DECLARE_METATYPE(QTextCharFormat::UnderlineStyle)
Q_DECLARE_METATYPE(QFont::Capitalization)
Q_DECLARE_METATYPE(QFont::StyleHint)
Q_DECLARE_METATYPE(QFont::StyleStrategy)
Q_DECLARE_METATYPE(QTextFormat*)
static QScriptValue qtscript_create_enum_class_helper(
QScriptEngine *engine,
QScriptEngine::FunctionSignature construct,
QScriptEngine::FunctionSignature valueOf,
QScriptEngine::FunctionSignature toString)
{
QScriptValue proto = engine->newObject();
proto.setProperty(QString::fromLatin1("valueOf"),
engine->newFunction(valueOf), QScriptValue::SkipInEnumeration);
proto.setProperty(QString::fromLatin1("toString"),
engine->newFunction(toString), QScriptValue::SkipInEnumeration);
return engine->newFunction(construct, proto, 1);
}
//
// QTextCharFormat::VerticalAlignment
//
static const QTextCharFormat::VerticalAlignment qtscript_QTextCharFormat_VerticalAlignment_values[] = {
QTextCharFormat::AlignNormal
, QTextCharFormat::AlignSuperScript
, QTextCharFormat::AlignSubScript
, QTextCharFormat::AlignMiddle
, QTextCharFormat::AlignTop
, QTextCharFormat::AlignBottom
};
static const char * const qtscript_QTextCharFormat_VerticalAlignment_keys[] = {
"AlignNormal"
, "AlignSuperScript"
, "AlignSubScript"
, "AlignMiddle"
, "AlignTop"
, "AlignBottom"
};
static QString qtscript_QTextCharFormat_VerticalAlignment_toStringHelper(QTextCharFormat::VerticalAlignment value)
{
if ((value >= QTextCharFormat::AlignNormal) && (value <= QTextCharFormat::AlignBottom))
return qtscript_QTextCharFormat_VerticalAlignment_keys[static_cast<int>(value)-static_cast<int>(QTextCharFormat::AlignNormal)];
return QString();
}
static QScriptValue qtscript_QTextCharFormat_VerticalAlignment_toScriptValue(QScriptEngine *engine, const QTextCharFormat::VerticalAlignment &value)
{
QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QTextCharFormat"));
return clazz.property(qtscript_QTextCharFormat_VerticalAlignment_toStringHelper(value));
}
static void qtscript_QTextCharFormat_VerticalAlignment_fromScriptValue(const QScriptValue &value, QTextCharFormat::VerticalAlignment &out)
{
out = qvariant_cast<QTextCharFormat::VerticalAlignment>(value.toVariant());
}
static QScriptValue qtscript_construct_QTextCharFormat_VerticalAlignment(QScriptContext *context, QScriptEngine *engine)
{
int arg = context->argument(0).toInt32();
if ((arg >= QTextCharFormat::AlignNormal) && (arg <= QTextCharFormat::AlignBottom))
return qScriptValueFromValue(engine, static_cast<QTextCharFormat::VerticalAlignment>(arg));
return context->throwError(QString::fromLatin1("VerticalAlignment(): invalid enum value (%0)").arg(arg));
}
static QScriptValue qtscript_QTextCharFormat_VerticalAlignment_valueOf(QScriptContext *context, QScriptEngine *engine)
{
QTextCharFormat::VerticalAlignment value = qscriptvalue_cast<QTextCharFormat::VerticalAlignment>(context->thisObject());
return QScriptValue(engine, static_cast<int>(value));
}
static QScriptValue qtscript_QTextCharFormat_VerticalAlignment_toString(QScriptContext *context, QScriptEngine *engine)
{
QTextCharFormat::VerticalAlignment value = qscriptvalue_cast<QTextCharFormat::VerticalAlignment>(context->thisObject());
return QScriptValue(engine, qtscript_QTextCharFormat_VerticalAlignment_toStringHelper(value));
}
static QScriptValue qtscript_create_QTextCharFormat_VerticalAlignment_class(QScriptEngine *engine, QScriptValue &clazz)
{
QScriptValue ctor = qtscript_create_enum_class_helper(
engine, qtscript_construct_QTextCharFormat_VerticalAlignment,
qtscript_QTextCharFormat_VerticalAlignment_valueOf, qtscript_QTextCharFormat_VerticalAlignment_toString);
qScriptRegisterMetaType<QTextCharFormat::VerticalAlignment>(engine, qtscript_QTextCharFormat_VerticalAlignment_toScriptValue,
qtscript_QTextCharFormat_VerticalAlignment_fromScriptValue, ctor.property(QString::fromLatin1("prototype")));
for (int i = 0; i < 6; ++i) {
clazz.setProperty(QString::fromLatin1(qtscript_QTextCharFormat_VerticalAlignment_keys[i]),
engine->newVariant(qVariantFromValue(qtscript_QTextCharFormat_VerticalAlignment_values[i])),
QScriptValue::ReadOnly | QScriptValue::Undeletable);
}
return ctor;
}
//
// QTextCharFormat::UnderlineStyle
//
static const QTextCharFormat::UnderlineStyle qtscript_QTextCharFormat_UnderlineStyle_values[] = {
QTextCharFormat::NoUnderline
, QTextCharFormat::SingleUnderline
, QTextCharFormat::DashUnderline
, QTextCharFormat::DotLine
, QTextCharFormat::DashDotLine
, QTextCharFormat::DashDotDotLine
, QTextCharFormat::WaveUnderline
, QTextCharFormat::SpellCheckUnderline
};
static const char * const qtscript_QTextCharFormat_UnderlineStyle_keys[] = {
"NoUnderline"
, "SingleUnderline"
, "DashUnderline"
, "DotLine"
, "DashDotLine"
, "DashDotDotLine"
, "WaveUnderline"
, "SpellCheckUnderline"
};
static QString qtscript_QTextCharFormat_UnderlineStyle_toStringHelper(QTextCharFormat::UnderlineStyle value)
{
if ((value >= QTextCharFormat::NoUnderline) && (value <= QTextCharFormat::SpellCheckUnderline))
return qtscript_QTextCharFormat_UnderlineStyle_keys[static_cast<int>(value)-static_cast<int>(QTextCharFormat::NoUnderline)];
return QString();
}
static QScriptValue qtscript_QTextCharFormat_UnderlineStyle_toScriptValue(QScriptEngine *engine, const QTextCharFormat::UnderlineStyle &value)
{
QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QTextCharFormat"));
return clazz.property(qtscript_QTextCharFormat_UnderlineStyle_toStringHelper(value));
}
static void qtscript_QTextCharFormat_UnderlineStyle_fromScriptValue(const QScriptValue &value, QTextCharFormat::UnderlineStyle &out)
{
out = qvariant_cast<QTextCharFormat::UnderlineStyle>(value.toVariant());
}
static QScriptValue qtscript_construct_QTextCharFormat_UnderlineStyle(QScriptContext *context, QScriptEngine *engine)
{
int arg = context->argument(0).toInt32();
if ((arg >= QTextCharFormat::NoUnderline) && (arg <= QTextCharFormat::SpellCheckUnderline))
return qScriptValueFromValue(engine, static_cast<QTextCharFormat::UnderlineStyle>(arg));
return context->throwError(QString::fromLatin1("UnderlineStyle(): invalid enum value (%0)").arg(arg));
}
static QScriptValue qtscript_QTextCharFormat_UnderlineStyle_valueOf(QScriptContext *context, QScriptEngine *engine)
{
QTextCharFormat::UnderlineStyle value = qscriptvalue_cast<QTextCharFormat::UnderlineStyle>(context->thisObject());
return QScriptValue(engine, static_cast<int>(value));
}
static QScriptValue qtscript_QTextCharFormat_UnderlineStyle_toString(QScriptContext *context, QScriptEngine *engine)
{
QTextCharFormat::UnderlineStyle value = qscriptvalue_cast<QTextCharFormat::UnderlineStyle>(context->thisObject());
return QScriptValue(engine, qtscript_QTextCharFormat_UnderlineStyle_toStringHelper(value));
}
static QScriptValue qtscript_create_QTextCharFormat_UnderlineStyle_class(QScriptEngine *engine, QScriptValue &clazz)
{
QScriptValue ctor = qtscript_create_enum_class_helper(
engine, qtscript_construct_QTextCharFormat_UnderlineStyle,
qtscript_QTextCharFormat_UnderlineStyle_valueOf, qtscript_QTextCharFormat_UnderlineStyle_toString);
qScriptRegisterMetaType<QTextCharFormat::UnderlineStyle>(engine, qtscript_QTextCharFormat_UnderlineStyle_toScriptValue,
qtscript_QTextCharFormat_UnderlineStyle_fromScriptValue, ctor.property(QString::fromLatin1("prototype")));
for (int i = 0; i < 8; ++i) {
clazz.setProperty(QString::fromLatin1(qtscript_QTextCharFormat_UnderlineStyle_keys[i]),
engine->newVariant(qVariantFromValue(qtscript_QTextCharFormat_UnderlineStyle_values[i])),
QScriptValue::ReadOnly | QScriptValue::Undeletable);
}
return ctor;
}
//
// QTextCharFormat
//
static QScriptValue qtscript_QTextCharFormat_prototype_call(QScriptContext *context, QScriptEngine *)
{
#if QT_VERSION > 0x040400
Q_ASSERT(context->callee().isFunction());
uint _id = context->callee().data().toUInt32();
#else
uint _id;
if (context->callee().isFunction())
_id = context->callee().data().toUInt32();
else
_id = 0xBABE0000 + 50;
#endif
Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000);
_id &= 0x0000FFFF;
QTextCharFormat* _q_self = qscriptvalue_cast<QTextCharFormat*>(context->thisObject());
if (!_q_self) {
return context->throwError(QScriptContext::TypeError,
QString::fromLatin1("QTextCharFormat.%0(): this object is not a QTextCharFormat")
.arg(qtscript_QTextCharFormat_function_names[_id+1]));
}
switch (_id) {
case 0:
if (context->argumentCount() == 0) {
QString _q_result = _q_self->anchorHref();
return QScriptValue(context->engine(), _q_result);
}
break;
case 1:
if (context->argumentCount() == 0) {
QStringList _q_result = _q_self->anchorNames();
return qScriptValueFromSequence(context->engine(), _q_result);
}
break;
case 2:
if (context->argumentCount() == 0) {
QFont _q_result = _q_self->font();
return qScriptValueFromValue(context->engine(), _q_result);
}
break;
case 3:
if (context->argumentCount() == 0) {
QFont::Capitalization _q_result = _q_self->fontCapitalization();
return qScriptValueFromValue(context->engine(), _q_result);
}
break;
case 4:
if (context->argumentCount() == 0) {
QString _q_result = _q_self->fontFamily();
return QScriptValue(context->engine(), _q_result);
}
break;
case 5:
if (context->argumentCount() == 0) {
bool _q_result = _q_self->fontFixedPitch();
return QScriptValue(context->engine(), _q_result);
}
break;
case 6:
if (context->argumentCount() == 0) {
bool _q_result = _q_self->fontItalic();
return QScriptValue(context->engine(), _q_result);
}
break;
case 7:
if (context->argumentCount() == 0) {
bool _q_result = _q_self->fontKerning();
return QScriptValue(context->engine(), _q_result);
}
break;
case 8:
if (context->argumentCount() == 0) {
qreal _q_result = _q_self->fontLetterSpacing();
return qScriptValueFromValue(context->engine(), _q_result);
}
break;
case 9:
if (context->argumentCount() == 0) {
bool _q_result = _q_self->fontOverline();
return QScriptValue(context->engine(), _q_result);
}
break;
case 10:
if (context->argumentCount() == 0) {
qreal _q_result = _q_self->fontPointSize();
return qScriptValueFromValue(context->engine(), _q_result);
}
break;
case 11:
if (context->argumentCount() == 0) {
bool _q_result = _q_self->fontStrikeOut();
return QScriptValue(context->engine(), _q_result);
}
break;
case 12:
if (context->argumentCount() == 0) {
QFont::StyleHint _q_result = _q_self->fontStyleHint();
return qScriptValueFromValue(context->engine(), _q_result);
}
break;
case 13:
if (context->argumentCount() == 0) {
QFont::StyleStrategy _q_result = _q_self->fontStyleStrategy();
return qScriptValueFromValue(context->engine(), _q_result);
}
break;
case 14:
if (context->argumentCount() == 0) {
bool _q_result = _q_self->fontUnderline();
return QScriptValue(context->engine(), _q_result);
}
break;
case 15:
if (context->argumentCount() == 0) {
int _q_result = _q_self->fontWeight();
return QScriptValue(context->engine(), _q_result);
}
break;
case 16:
if (context->argumentCount() == 0) {
qreal _q_result = _q_self->fontWordSpacing();
return qScriptValueFromValue(context->engine(), _q_result);
}
break;
case 17:
if (context->argumentCount() == 0) {
bool _q_result = _q_self->isAnchor();
return QScriptValue(context->engine(), _q_result);
}
break;
case 18:
if (context->argumentCount() == 1) {
bool _q_arg0 = context->argument(0).toBoolean();
_q_self->setAnchor(_q_arg0);
return context->engine()->undefinedValue();
}
break;
case 19:
if (context->argumentCount() == 1) {
QString _q_arg0 = context->argument(0).toString();
_q_self->setAnchorHref(_q_arg0);
return context->engine()->undefinedValue();
}
break;
case 20:
if (context->argumentCount() == 1) {
QStringList _q_arg0;
qScriptValueToSequence(context->argument(0), _q_arg0);
_q_self->setAnchorNames(_q_arg0);
return context->engine()->undefinedValue();
}
break;
case 21:
if (context->argumentCount() == 1) {
QFont _q_arg0 = qscriptvalue_cast<QFont>(context->argument(0));
_q_self->setFont(_q_arg0);
return context->engine()->undefinedValue();
}
break;
case 22:
if (context->argumentCount() == 1) {
QFont::Capitalization _q_arg0 = qscriptvalue_cast<QFont::Capitalization>(context->argument(0));
_q_self->setFontCapitalization(_q_arg0);
return context->engine()->undefinedValue();
}
break;
case 23:
if (context->argumentCount() == 1) {
QString _q_arg0 = context->argument(0).toString();
_q_self->setFontFamily(_q_arg0);
return context->engine()->undefinedValue();
}
break;
case 24:
if (context->argumentCount() == 1) {
bool _q_arg0 = context->argument(0).toBoolean();
_q_self->setFontFixedPitch(_q_arg0);
return context->engine()->undefinedValue();
}
break;
case 25:
if (context->argumentCount() == 1) {
bool _q_arg0 = context->argument(0).toBoolean();
_q_self->setFontItalic(_q_arg0);
return context->engine()->undefinedValue();
}
break;
case 26:
if (context->argumentCount() == 1) {
bool _q_arg0 = context->argument(0).toBoolean();
_q_self->setFontKerning(_q_arg0);
return context->engine()->undefinedValue();
}
break;
case 27:
if (context->argumentCount() == 1) {
qreal _q_arg0 = qscriptvalue_cast<qreal>(context->argument(0));
_q_self->setFontLetterSpacing(_q_arg0);
return context->engine()->undefinedValue();
}
break;
case 28:
if (context->argumentCount() == 1) {
bool _q_arg0 = context->argument(0).toBoolean();
_q_self->setFontOverline(_q_arg0);
return context->engine()->undefinedValue();
}
break;
case 29:
if (context->argumentCount() == 1) {
qreal _q_arg0 = qscriptvalue_cast<qreal>(context->argument(0));
_q_self->setFontPointSize(_q_arg0);
return context->engine()->undefinedValue();
}
break;
case 30:
if (context->argumentCount() == 1) {
bool _q_arg0 = context->argument(0).toBoolean();
_q_self->setFontStrikeOut(_q_arg0);
return context->engine()->undefinedValue();
}
break;
case 31:
if (context->argumentCount() == 1) {
QFont::StyleHint _q_arg0 = qscriptvalue_cast<QFont::StyleHint>(context->argument(0));
_q_self->setFontStyleHint(_q_arg0);
return context->engine()->undefinedValue();
}
if (context->argumentCount() == 2) {
QFont::StyleHint _q_arg0 = qscriptvalue_cast<QFont::StyleHint>(context->argument(0));
QFont::StyleStrategy _q_arg1 = qscriptvalue_cast<QFont::StyleStrategy>(context->argument(1));
_q_self->setFontStyleHint(_q_arg0, _q_arg1);
return context->engine()->undefinedValue();
}
break;
case 32:
if (context->argumentCount() == 1) {
QFont::StyleStrategy _q_arg0 = qscriptvalue_cast<QFont::StyleStrategy>(context->argument(0));
_q_self->setFontStyleStrategy(_q_arg0);
return context->engine()->undefinedValue();
}
break;
case 33:
if (context->argumentCount() == 1) {
bool _q_arg0 = context->argument(0).toBoolean();
_q_self->setFontUnderline(_q_arg0);
return context->engine()->undefinedValue();
}
break;
case 34:
if (context->argumentCount() == 1) {
int _q_arg0 = context->argument(0).toInt32();
_q_self->setFontWeight(_q_arg0);
return context->engine()->undefinedValue();
}
break;
case 35:
if (context->argumentCount() == 1) {
qreal _q_arg0 = qscriptvalue_cast<qreal>(context->argument(0));
_q_self->setFontWordSpacing(_q_arg0);
return context->engine()->undefinedValue();
}
break;
case 36:
if (context->argumentCount() == 1) {
int _q_arg0 = context->argument(0).toInt32();
_q_self->setTableCellColumnSpan(_q_arg0);
return context->engine()->undefinedValue();
}
break;
case 37:
if (context->argumentCount() == 1) {
int _q_arg0 = context->argument(0).toInt32();
_q_self->setTableCellRowSpan(_q_arg0);
return context->engine()->undefinedValue();
}
break;
case 38:
if (context->argumentCount() == 1) {
QPen _q_arg0 = qscriptvalue_cast<QPen>(context->argument(0));
_q_self->setTextOutline(_q_arg0);
return context->engine()->undefinedValue();
}
break;
case 39:
if (context->argumentCount() == 1) {
QString _q_arg0 = context->argument(0).toString();
_q_self->setToolTip(_q_arg0);
return context->engine()->undefinedValue();
}
break;
case 40:
if (context->argumentCount() == 1) {
QColor _q_arg0 = qscriptvalue_cast<QColor>(context->argument(0));
_q_self->setUnderlineColor(_q_arg0);
return context->engine()->undefinedValue();
}
break;
case 41:
if (context->argumentCount() == 1) {
QTextCharFormat::UnderlineStyle _q_arg0 = qscriptvalue_cast<QTextCharFormat::UnderlineStyle>(context->argument(0));
_q_self->setUnderlineStyle(_q_arg0);
return context->engine()->undefinedValue();
}
break;
case 42:
if (context->argumentCount() == 1) {
QTextCharFormat::VerticalAlignment _q_arg0 = qscriptvalue_cast<QTextCharFormat::VerticalAlignment>(context->argument(0));
_q_self->setVerticalAlignment(_q_arg0);
return context->engine()->undefinedValue();
}
break;
case 43:
if (context->argumentCount() == 0) {
int _q_result = _q_self->tableCellColumnSpan();
return QScriptValue(context->engine(), _q_result);
}
break;
case 44:
if (context->argumentCount() == 0) {
int _q_result = _q_self->tableCellRowSpan();
return QScriptValue(context->engine(), _q_result);
}
break;
case 45:
if (context->argumentCount() == 0) {
QPen _q_result = _q_self->textOutline();
return qScriptValueFromValue(context->engine(), _q_result);
}
break;
case 46:
if (context->argumentCount() == 0) {
QString _q_result = _q_self->toolTip();
return QScriptValue(context->engine(), _q_result);
}
break;
case 47:
if (context->argumentCount() == 0) {
QColor _q_result = _q_self->underlineColor();
return qScriptValueFromValue(context->engine(), _q_result);
}
break;
case 48:
if (context->argumentCount() == 0) {
QTextCharFormat::UnderlineStyle _q_result = _q_self->underlineStyle();
return qScriptValueFromValue(context->engine(), _q_result);
}
break;
case 49:
if (context->argumentCount() == 0) {
QTextCharFormat::VerticalAlignment _q_result = _q_self->verticalAlignment();
return qScriptValueFromValue(context->engine(), _q_result);
}
break;
case 50: {
QString result = QString::fromLatin1("QTextCharFormat");
return QScriptValue(context->engine(), result);
}
default:
Q_ASSERT(false);
}
return qtscript_QTextCharFormat_throw_ambiguity_error_helper(context,
qtscript_QTextCharFormat_function_names[_id+1],
qtscript_QTextCharFormat_function_signatures[_id+1]);
}
static QScriptValue qtscript_QTextCharFormat_static_call(QScriptContext *context, QScriptEngine *)
{
uint _id = context->callee().data().toUInt32();
Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000);
_id &= 0x0000FFFF;
switch (_id) {
case 0:
if (context->thisObject().strictlyEquals(context->engine()->globalObject())) {
return context->throwError(QString::fromLatin1("QTextCharFormat(): Did you forget to construct with 'new'?"));
}
if (context->argumentCount() == 0) {
QtScriptShell_QTextCharFormat _q_cpp_result;
QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QTextCharFormat)_q_cpp_result));
_q_cpp_result.__qtscript_self = _q_result;
return _q_result;
}
break;
default:
Q_ASSERT(false);
}
return qtscript_QTextCharFormat_throw_ambiguity_error_helper(context,
qtscript_QTextCharFormat_function_names[_id],
qtscript_QTextCharFormat_function_signatures[_id]);
}
QScriptValue qtscript_create_QTextCharFormat_class(QScriptEngine *engine)
{
static const int function_lengths[] = {
0
// static
// prototype
, 0
, 0
, 0
, 0
, 0
, 0
, 0
, 0
, 0
, 0
, 0
, 0
, 0
, 0
, 0
, 0
, 0
, 0
, 1
, 1
, 1
, 1
, 1
, 1
, 1
, 1
, 1
, 1
, 1
, 1
, 1
, 2
, 1
, 1
, 1
, 1
, 1
, 1
, 1
, 1
, 1
, 1
, 1
, 0
, 0
, 0
, 0
, 0
, 0
, 0
, 0
};
engine->setDefaultPrototype(qMetaTypeId<QTextCharFormat*>(), QScriptValue());
QScriptValue proto = engine->newVariant(qVariantFromValue((QTextCharFormat*)0));
proto.setPrototype(engine->defaultPrototype(qMetaTypeId<QTextFormat*>()));
for (int i = 0; i < 51; ++i) {
QScriptValue fun = engine->newFunction(qtscript_QTextCharFormat_prototype_call, function_lengths[i+1]);
fun.setData(QScriptValue(engine, uint(0xBABE0000 + i)));
proto.setProperty(QString::fromLatin1(qtscript_QTextCharFormat_function_names[i+1]),
fun, QScriptValue::SkipInEnumeration);
}
engine->setDefaultPrototype(qMetaTypeId<QTextCharFormat>(), proto);
engine->setDefaultPrototype(qMetaTypeId<QTextCharFormat*>(), proto);
QScriptValue ctor = engine->newFunction(qtscript_QTextCharFormat_static_call, proto, function_lengths[0]);
ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0)));
ctor.setProperty(QString::fromLatin1("VerticalAlignment"),
qtscript_create_QTextCharFormat_VerticalAlignment_class(engine, ctor));
ctor.setProperty(QString::fromLatin1("UnderlineStyle"),
qtscript_create_QTextCharFormat_UnderlineStyle_class(engine, ctor));
return ctor;
}
|