Пример #1
0
void QSRectClass::write(QSObject *o, const QSMember &mem,
                        const QSObject &val) const
{
  if (mem.type() == QSMember::Custom) {
    int i = val.toInteger();
    switch (mem.idx) {
      case 0:
      case 1:
        rect(o)->setX(i);
        break;
      case 2:
      case 3:
        rect(o)->setY(i);
        break;
      case 4:
        rect(o)->setWidth(i);
        break;
      case 5:
        rect(o)->setHeight(i);
        break;
      case 6:
        rect(o)->setRight(i);
        break;
      case 7:
        rect(o)->setBottom(i);
        break;
      case 8:
        break;
      default:
        qFatal("QSRectClass::write: unhandled case");
    }
  } else {
    QSClass::write(o, mem, val);
  }
}
Пример #2
0
void QSPointClass::write(QSObject *objPtr, const QSMember &mem,
                         const QSObject &val) const
{
  if (mem.type() == QSMember::Custom) {
    switch (mem.idx) {
      case 0:
        point(objPtr)->setX(val.toInteger());
        break;
      case 1:
        point(objPtr)->setY(val.toInteger());
        break;
      default:
        qDebug("QSPointClass::write() Unhandled case");
    }
  } else {
    QSClass::write(objPtr, mem, val);
  }
}
Пример #3
0
void QSSizeClass::write(QSObject *objPtr, const QSMember &mem,
                        const QSObject &val) const
{
  if (mem.type() == QSMember::Custom) {
    switch (mem.idx) {
      case 0:
        size(objPtr)->setWidth(val.toInteger());
        break;
      case 1:
        size(objPtr)->setHeight(val.toInteger());
        break;
      default:
        qFatal("QSSizeClass::write, unhandled case");
        break;
    }
  } else {
    QSClass::write(objPtr, mem, val);
  }
}