void setKeymap(char *p, int lineno, int verbose) { unsigned char *map = NULL; char *s, *emsg; int c, f; s = getQWord(&p); c = getKey(s); if (c < 0) { /* error */ if (lineno > 0) /* FIXME: gettextize? */ emsg = Sprintf("line %d: unknown key '%s'", lineno, s)->ptr; else /* FIXME: gettextize? */ emsg = Sprintf("defkey: unknown key '%s'", s)->ptr; record_err_message(emsg); if (verbose) disp_message_nsec(emsg, FALSE, 1, TRUE, FALSE); return; } s = getWord(&p); f = getFuncList(s); if (f < 0) { if (lineno > 0) /* FIXME: gettextize? */ emsg = Sprintf("line %d: invalid command '%s'", lineno, s)->ptr; else /* FIXME: gettextize? */ emsg = Sprintf("defkey: invalid command '%s'", s)->ptr; record_err_message(emsg); if (verbose) disp_message_nsec(emsg, FALSE, 1, TRUE, FALSE); return; } if (c & K_MULTI) { unsigned char **mmap = NULL; int i, j, m = MULTI_KEY(c); if (m & K_ESCD) map = EscDKeymap; else if (m & K_ESCB) map = EscBKeymap; else if (m & K_ESC) map = EscKeymap; else map = GlobalKeymap; if (map[m & 0x7F] == FUNCNAME_multimap) mmap = (unsigned char **)getKeyData(m); else map[m & 0x7F] = FUNCNAME_multimap; if (!mmap) { mmap = New_N(unsigned char *, 4); for (i = 0; i < 4; i++) { mmap[i] = New_N(unsigned char, 128); for (j = 0; j < 128; j++) mmap[i][j] = FUNCNAME_nulcmd; } mmap[0][ESC_CODE] = FUNCNAME_escmap; mmap[1]['['] = FUNCNAME_escbmap; mmap[1]['O'] = FUNCNAME_escbmap; }
int MessageListScript::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = MessageList::qt_metacall(_c, _id, _a); if (_id < 0) return _id; #ifndef QT_NO_PROPERTIES if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< QColor*>(_v) = criColor(); break; case 1: *reinterpret_cast< QColor*>(_v) = attColor(); break; case 2: *reinterpret_cast< QColor*>(_v) = normColor(); break; case 3: *reinterpret_cast< QColor*>(_v) = backColor(); break; case 4: *reinterpret_cast< vtlmeta::types::NamedList*>(_v) = getList(); break; case 5: *reinterpret_cast< QString*>(_v) = sourcerName(); break; case 6: *reinterpret_cast< QString*>(_v) = toolTip(); break; case 7: *reinterpret_cast< VISIBLE*>(_v) = getVisible(); break; case 8: *reinterpret_cast< bool*>(_v) = useMask(); break; case 9: *reinterpret_cast< QString*>(_v) = globalListName(); break; case 10: *reinterpret_cast< QFont*>(_v) = font(); break; case 11: *reinterpret_cast< QRect*>(_v) = geometry(); break; case 12: *reinterpret_cast< Shape*>(_v) = frameShape(); break; case 13: *reinterpret_cast< Shadow*>(_v) = frameShadow(); break; case 14: *reinterpret_cast< int*>(_v) = lineWidth(); break; case 15: *reinterpret_cast< int*>(_v) = midLineWidth(); break; case 16: *reinterpret_cast< int*>(_v) = margin(); break; case 17: *reinterpret_cast< vtlmeta::types::NamedList*>(_v) = getFuncList(); break; } _id -= 18; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setCriColor(*reinterpret_cast< QColor*>(_v)); break; case 1: setAttColor(*reinterpret_cast< QColor*>(_v)); break; case 2: setNormColor(*reinterpret_cast< QColor*>(_v)); break; case 3: setBackColor(*reinterpret_cast< QColor*>(_v)); break; case 4: setList(*reinterpret_cast< vtlmeta::types::NamedList*>(_v)); break; case 5: setSourcerName(*reinterpret_cast< QString*>(_v)); break; case 6: setToolTip(*reinterpret_cast< QString*>(_v)); break; case 7: setVisible(*reinterpret_cast< VISIBLE*>(_v)); break; case 8: setUseMask(*reinterpret_cast< bool*>(_v)); break; case 9: setGlobalListName(*reinterpret_cast< QString*>(_v)); break; case 10: setFont(*reinterpret_cast< QFont*>(_v)); break; case 11: setGeometry(*reinterpret_cast< QRect*>(_v)); break; case 12: setFrameShape(*reinterpret_cast< Shape*>(_v)); break; case 13: setFrameShadow(*reinterpret_cast< Shadow*>(_v)); break; case 14: setLineWidth(*reinterpret_cast< int*>(_v)); break; case 15: setMidLineWidth(*reinterpret_cast< int*>(_v)); break; case 16: setMargin(*reinterpret_cast< int*>(_v)); break; case 17: setFuncList(*reinterpret_cast< vtlmeta::types::NamedList*>(_v)); break; } _id -= 18; } else if (_c == QMetaObject::ResetProperty) { _id -= 18; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 18; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 18; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 18; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 18; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 18; } #endif // QT_NO_PROPERTIES return _id; }