• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ QTSCRIPT_IS_GENERATED_FUNCTION函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中QTSCRIPT_IS_GENERATED_FUNCTION函数的典型用法代码示例。如果您正苦于以下问题:C++ QTSCRIPT_IS_GENERATED_FUNCTION函数的具体用法?C++ QTSCRIPT_IS_GENERATED_FUNCTION怎么用?C++ QTSCRIPT_IS_GENERATED_FUNCTION使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了QTSCRIPT_IS_GENERATED_FUNCTION函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: startElement

bool  QtScriptShell_QXmlDefaultHandler::startElement(const QString&  namespaceURI, const QString&  localName, const QString&  qName, const QXmlAttributes&  atts)
{
    QScriptValue _q_function = __qtscript_self.property("startElement");
    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
        || (__qtscript_self.propertyFlags("startElement") & QScriptValue::QObjectMember)) {
        return QXmlDefaultHandler::startElement(namespaceURI, localName, qName, atts);
    } else {
        QScriptEngine *_q_engine = __qtscript_self.engine();
        return qscriptvalue_cast<bool >(_q_function.call(__qtscript_self,
            QScriptValueList()
            << qScriptValueFromValue(_q_engine, namespaceURI)
            << qScriptValueFromValue(_q_engine, localName)
            << qScriptValueFromValue(_q_engine, qName)
            << qScriptValueFromValue(_q_engine, atts)));
    }
}
开发者ID:eric3361229,项目名称:qcad,代码行数:16,代码来源:qtscriptshell_QXmlDefaultHandler.cpp


示例2: drawItems

void QtScriptShell_QGraphicsView::drawItems(QPainter*  painter, int  numItems, QGraphicsItem**  items, const QStyleOptionGraphicsItem*  options)
{
    QScriptValue _q_function = __qtscript_self.property("drawItems");
    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
        || (__qtscript_self.propertyFlags("drawItems") & QScriptValue::QObjectMember)) {
        QGraphicsView::drawItems(painter, numItems, items, options);
    } else {
        QScriptEngine *_q_engine = __qtscript_self.engine();
        _q_function.call(__qtscript_self,
            QScriptValueList()
            << qScriptValueFromValue(_q_engine, painter)
            << qScriptValueFromValue(_q_engine, numItems)
            << qScriptValueFromValue(_q_engine, items)
            << qScriptValueFromValue(_q_engine, const_cast<QStyleOptionGraphicsItem *>(options)));
    }
}
开发者ID:Alpha-Kand,项目名称:qcad,代码行数:16,代码来源:qtscriptshell_QGraphicsView.cpp


示例3: subControlRect

QRect  QtScriptShell_QWindowsStyle::subControlRect(QStyle::ComplexControl  cc, const QStyleOptionComplex*  opt, QStyle::SubControl  sc, const QWidget*  w) const
{
    QScriptValue _q_function = __qtscript_self.property("subControlRect");
    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
        || (__qtscript_self.propertyFlags("subControlRect") & QScriptValue::QObjectMember)) {
        return QWindowsStyle::subControlRect(cc, opt, sc, w);
    } else {
        QScriptEngine *_q_engine = __qtscript_self.engine();
        return qscriptvalue_cast<QRect >(_q_function.call(__qtscript_self,
            QScriptValueList()
            << qScriptValueFromValue(_q_engine, cc)
            << qScriptValueFromValue(_q_engine, const_cast<QStyleOptionComplex *>(opt))
            << qScriptValueFromValue(_q_engine, sc)
            << qScriptValueFromValue(_q_engine, const_cast<QWidget *>(w))));
    }
}
开发者ID:SSMN,项目名称:MuseScore,代码行数:16,代码来源:qtscriptshell_QWindowsStyle.cpp


示例4: setHeaderData

bool  QtScriptShell_QSqlTableModel::setHeaderData(int  section, Qt::Orientation  orientation, const QVariant&  value, int  role)
{
    QScriptValue _q_function = __qtscript_self.property("setHeaderData");
    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
        || (__qtscript_self.propertyFlags("setHeaderData") & QScriptValue::QObjectMember)) {
        return QSqlTableModel::setHeaderData(section, orientation, value, role);
    } else {
        QScriptEngine *_q_engine = __qtscript_self.engine();
        return qscriptvalue_cast<bool >(_q_function.call(__qtscript_self,
            QScriptValueList()
            << qScriptValueFromValue(_q_engine, section)
            << qScriptValueFromValue(_q_engine, orientation)
            << qScriptValueFromValue(_q_engine, value)
            << qScriptValueFromValue(_q_engine, role)));
    }
}
开发者ID:Alpha-Kand,项目名称:qcad,代码行数:16,代码来源:qtscriptshell_QSqlTableModel.cpp


示例5: drawControl

void QtScriptShell_QWindowsStyle::drawControl(QStyle::ControlElement  element, const QStyleOption*  opt, QPainter*  p, const QWidget*  w) const
{
    QScriptValue _q_function = __qtscript_self.property("drawControl");
    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
        || (__qtscript_self.propertyFlags("drawControl") & QScriptValue::QObjectMember)) {
        QWindowsStyle::drawControl(element, opt, p, w);
    } else {
        QScriptEngine *_q_engine = __qtscript_self.engine();
        _q_function.call(__qtscript_self,
            QScriptValueList()
            << qScriptValueFromValue(_q_engine, element)
            << qScriptValueFromValue(_q_engine, const_cast<QStyleOption *>(opt))
            << qScriptValueFromValue(_q_engine, p)
            << qScriptValueFromValue(_q_engine, const_cast<QWidget *>(w)));
    }
}
开发者ID:SSMN,项目名称:MuseScore,代码行数:16,代码来源:qtscriptshell_QWindowsStyle.cpp


示例6: sizeFromContents

QSize  QtScriptShell_QWindowsStyle::sizeFromContents(QStyle::ContentsType  ct, const QStyleOption*  opt, const QSize&  contentsSize, const QWidget*  widget) const
{
    QScriptValue _q_function = __qtscript_self.property("sizeFromContents");
    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
        || (__qtscript_self.propertyFlags("sizeFromContents") & QScriptValue::QObjectMember)) {
        return QWindowsStyle::sizeFromContents(ct, opt, contentsSize, widget);
    } else {
        QScriptEngine *_q_engine = __qtscript_self.engine();
        return qscriptvalue_cast<QSize >(_q_function.call(__qtscript_self,
            QScriptValueList()
            << qScriptValueFromValue(_q_engine, ct)
            << qScriptValueFromValue(_q_engine, const_cast<QStyleOption *>(opt))
            << qScriptValueFromValue(_q_engine, contentsSize)
            << qScriptValueFromValue(_q_engine, const_cast<QWidget *>(widget))));
    }
}
开发者ID:SSMN,项目名称:MuseScore,代码行数:16,代码来源:qtscriptshell_QWindowsStyle.cpp


示例7: styleHint

int  QtScriptShell_QWindowsStyle::styleHint(QStyle::StyleHint  hint, const QStyleOption*  opt, const QWidget*  widget, QStyleHintReturn*  returnData) const
{
    QScriptValue _q_function = __qtscript_self.property("styleHint");
    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
        || (__qtscript_self.propertyFlags("styleHint") & QScriptValue::QObjectMember)) {
        return QWindowsStyle::styleHint(hint, opt, widget, returnData);
    } else {
        QScriptEngine *_q_engine = __qtscript_self.engine();
        return qscriptvalue_cast<int >(_q_function.call(__qtscript_self,
            QScriptValueList()
            << qScriptValueFromValue(_q_engine, hint)
            << qScriptValueFromValue(_q_engine, const_cast<QStyleOption *>(opt))
            << qScriptValueFromValue(_q_engine, const_cast<QWidget *>(widget))
            << qScriptValueFromValue(_q_engine, returnData)));
    }
}
开发者ID:SSMN,项目名称:MuseScore,代码行数:16,代码来源:qtscriptshell_QWindowsStyle.cpp


示例8: drawItemPixmap

void QtScriptShell_QWindowsStyle::drawItemPixmap(QPainter*  painter, const QRect&  rect, int  alignment, const QPixmap&  pixmap) const
{
    QScriptValue _q_function = __qtscript_self.property("drawItemPixmap");
    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
        || (__qtscript_self.propertyFlags("drawItemPixmap") & QScriptValue::QObjectMember)) {
        QWindowsStyle::drawItemPixmap(painter, rect, alignment, pixmap);
    } else {
        QScriptEngine *_q_engine = __qtscript_self.engine();
        _q_function.call(__qtscript_self,
            QScriptValueList()
            << qScriptValueFromValue(_q_engine, painter)
            << qScriptValueFromValue(_q_engine, rect)
            << qScriptValueFromValue(_q_engine, alignment)
            << qScriptValueFromValue(_q_engine, pixmap));
    }
}
开发者ID:SSMN,项目名称:MuseScore,代码行数:16,代码来源:qtscriptshell_QWindowsStyle.cpp


示例9: create

QObject*  QtScriptShell_QWebPluginFactory::create(const QString&  mimeType, const QUrl&  arg__2, const QStringList&  argumentNames, const QStringList&  argumentValues) const
{
    QScriptValue _q_function = __qtscript_self.property("create");
    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
        || (__qtscript_self.propertyFlags("create") & QScriptValue::QObjectMember)) {
        qFatal("QWebPluginFactory::create() is abstract!");
    } else {
        QScriptEngine *_q_engine = __qtscript_self.engine();
        return qscriptvalue_cast<QObject* >(_q_function.call(__qtscript_self,
            QScriptValueList()
            << qScriptValueFromValue(_q_engine, mimeType)
            << qScriptValueFromValue(_q_engine, arg__2)
            << qScriptValueFromValue(_q_engine, argumentNames)
            << qScriptValueFromValue(_q_engine, argumentValues)));
    }
}
开发者ID:Alpha-Kand,项目名称:qcad,代码行数:16,代码来源:qtscriptshell_QWebPluginFactory.cpp


示例10: unparsedEntityDecl

bool  QtScriptShell_QXmlDefaultHandler::unparsedEntityDecl(const QString&  name, const QString&  publicId, const QString&  systemId, const QString&  notationName)
{
    QScriptValue _q_function = __qtscript_self.property("unparsedEntityDecl");
    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
        || (__qtscript_self.propertyFlags("unparsedEntityDecl") & QScriptValue::QObjectMember)) {
        return QXmlDefaultHandler::unparsedEntityDecl(name, publicId, systemId, notationName);
    } else {
        QScriptEngine *_q_engine = __qtscript_self.engine();
        return qscriptvalue_cast<bool >(_q_function.call(__qtscript_self,
            QScriptValueList()
            << qScriptValueFromValue(_q_engine, name)
            << qScriptValueFromValue(_q_engine, publicId)
            << qScriptValueFromValue(_q_engine, systemId)
            << qScriptValueFromValue(_q_engine, notationName)));
    }
}
开发者ID:eric3361229,项目名称:qcad,代码行数:16,代码来源:qtscriptshell_QXmlDefaultHandler.cpp


示例11: getContentsMargins

void QtScriptShell_QGraphicsWidget::getContentsMargins(qreal*  left, qreal*  top, qreal*  right, qreal*  bottom) const
{
    QScriptValue _q_function = __qtscript_self.property("getContentsMargins");
    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
        || (__qtscript_self.propertyFlags("getContentsMargins") & QScriptValue::QObjectMember)) {
        QGraphicsWidget::getContentsMargins(left, top, right, bottom);
    } else {
        QScriptEngine *_q_engine = __qtscript_self.engine();
        _q_function.call(__qtscript_self,
            QScriptValueList()
            << qScriptValueFromValue(_q_engine, left)
            << qScriptValueFromValue(_q_engine, top)
            << qScriptValueFromValue(_q_engine, right)
            << qScriptValueFromValue(_q_engine, bottom));
    }
}
开发者ID:Mistobaan,项目名称:MuseScore,代码行数:16,代码来源:qtscriptshell_QGraphicsWidget.cpp


示例12: dropMimeData

bool  QtScriptShell_QStandardItemModel::dropMimeData(const QMimeData*  data, Qt::DropAction  action, int  row, int  column, const QModelIndex&  parent)
{
    QScriptValue _q_function = __qtscript_self.property("dropMimeData");
    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
        || (__qtscript_self.propertyFlags("dropMimeData") & QScriptValue::QObjectMember)) {
        return QStandardItemModel::dropMimeData(data, action, row, column, parent);
    } else {
        QScriptEngine *_q_engine = __qtscript_self.engine();
        return qscriptvalue_cast<bool >(_q_function.call(__qtscript_self,
            QScriptValueList()
            << qScriptValueFromValue(_q_engine, const_cast<QMimeData *>(data))
            << qScriptValueFromValue(_q_engine, action)
            << qScriptValueFromValue(_q_engine, row)
            << qScriptValueFromValue(_q_engine, column)
            << qScriptValueFromValue(_q_engine, parent)));
    }
}
开发者ID:SSMN,项目名称:MuseScore,代码行数:17,代码来源:qtscriptshell_QStandardItemModel.cpp


示例13: attributeDecl

bool  QtScriptShell_QXmlDefaultHandler::attributeDecl(const QString&  eName, const QString&  aName, const QString&  type, const QString&  valueDefault, const QString&  value)
{
    QScriptValue _q_function = __qtscript_self.property("attributeDecl");
    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
        || (__qtscript_self.propertyFlags("attributeDecl") & QScriptValue::QObjectMember)) {
        return QXmlDefaultHandler::attributeDecl(eName, aName, type, valueDefault, value);
    } else {
        QScriptEngine *_q_engine = __qtscript_self.engine();
        return qscriptvalue_cast<bool >(_q_function.call(__qtscript_self,
            QScriptValueList()
            << qScriptValueFromValue(_q_engine, eName)
            << qScriptValueFromValue(_q_engine, aName)
            << qScriptValueFromValue(_q_engine, type)
            << qScriptValueFromValue(_q_engine, valueDefault)
            << qScriptValueFromValue(_q_engine, value)));
    }
}
开发者ID:Alpha-Kand,项目名称:qcad,代码行数:17,代码来源:qtscriptshell_QXmlDefaultHandler.cpp


示例14: match

QList<QModelIndex >  QtScriptShell_QStandardItemModel::match(const QModelIndex&  start, int  role, const QVariant&  value, int  hits, Qt::MatchFlags  flags) const
{
    QScriptValue _q_function = __qtscript_self.property("match");
    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
        || (__qtscript_self.propertyFlags("match") & QScriptValue::QObjectMember)) {
        return QStandardItemModel::match(start, role, value, hits, flags);
    } else {
        QScriptEngine *_q_engine = __qtscript_self.engine();
        return qscriptvalue_cast<QList<QModelIndex > >(_q_function.call(__qtscript_self,
            QScriptValueList()
            << qScriptValueFromValue(_q_engine, start)
            << qScriptValueFromValue(_q_engine, role)
            << qScriptValueFromValue(_q_engine, value)
            << qScriptValueFromValue(_q_engine, hits)
            << qScriptValueFromValue(_q_engine, flags)));
    }
}
开发者ID:SSMN,项目名称:MuseScore,代码行数:17,代码来源:qtscriptshell_QStandardItemModel.cpp


示例15: moveRows

bool  QtScriptShell_QStandardItemModel::moveRows(const QModelIndex&  sourceParent, int  sourceRow, int  count, const QModelIndex&  destinationParent, int  destinationChild)
{
    QScriptValue _q_function = __qtscript_self.property("moveRows");
    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
        || (__qtscript_self.propertyFlags("moveRows") & QScriptValue::QObjectMember)) {
        return QStandardItemModel::moveRows(sourceParent, sourceRow, count, destinationParent, destinationChild);
    } else {
        QScriptEngine *_q_engine = __qtscript_self.engine();
        return qscriptvalue_cast<bool >(_q_function.call(__qtscript_self,
            QScriptValueList()
            << qScriptValueFromValue(_q_engine, sourceParent)
            << qScriptValueFromValue(_q_engine, sourceRow)
            << qScriptValueFromValue(_q_engine, count)
            << qScriptValueFromValue(_q_engine, destinationParent)
            << qScriptValueFromValue(_q_engine, destinationChild)));
    }
}
开发者ID:Alpha-Kand,项目名称:qcad,代码行数:17,代码来源:qtscriptshell_QStandardItemModel.cpp


示例16: drawItemText

void QtScriptShell_QPlastiqueStyle::drawItemText(QPainter*  painter, const QRect&  rect, int  flags, const QPalette&  pal, bool  enabled, const QString&  text, QPalette::ColorRole  textRole) const
{
    QScriptValue _q_function = __qtscript_self.property("drawItemText");
    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
        || (__qtscript_self.propertyFlags("drawItemText") & QScriptValue::QObjectMember)) {
        QPlastiqueStyle::drawItemText(painter, rect, flags, pal, enabled, text, textRole);
    } else {
        QScriptEngine *_q_engine = __qtscript_self.engine();
        _q_function.call(__qtscript_self,
            QScriptValueList()
            << qScriptValueFromValue(_q_engine, painter)
            << qScriptValueFromValue(_q_engine, rect)
            << qScriptValueFromValue(_q_engine, flags)
            << qScriptValueFromValue(_q_engine, pal)
            << qScriptValueFromValue(_q_engine, enabled)
            << qScriptValueFromValue(_q_engine, text)
            << qScriptValueFromValue(_q_engine, textRole));
    }
}
开发者ID:Mistobaan,项目名称:MuseScore,代码行数:19,代码来源:qtscriptshell_QPlastiqueStyle.cpp


示例17: QTSCRIPT_IS_GENERATED_FUNCTION

      void REcmaShellSnapDistance::setDistance(
                double d
            ) {
                QScriptEngine* engine = __qtscript_self.engine();
                //REcmaHelper::shellFunctionStart("REcmaShellSnapDistance::setDistance", engine);
                QScriptValue _q_function = __qtscript_self.property("setDistance");



                if (!_q_function.isFunction() || 
                    QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) ||
                    QTSCRIPT_IS_FUNCTION_IN_CALL(_q_function)
                    
                    /* function might have more arguments than expected:
                    || _q_function.property("length").toInt32()!=1*/
                    /*|| (__qtscript_self.propertyFlags("atEnd") & QScriptValue::QObjectMember)*/
                    ) {
                    //QString cppSig = "RSnapDistance::setDistance";
                    
                        // re-enable recursion for calls from C++ into ECMAScript functions
                        // leave it marked as generated though if appropriate:
                        
                        quint32 prev = _q_function.data().toUInt32();
                        //if (cppSig!="RGraphicsViewQt::event") {
                            _q_function.setData(QScriptValue(engine, prev & 0xFFFF0000));
                        //}
                        RSnapDistance::setDistance(
                            d
                        );

                        // block recursion again:
                        _q_function.setData(QScriptValue(engine, prev));

                        //REcmaHelper::shellFunctionEnd("REcmaShellSnapDistance::setDistance", engine);

                        
                            return;
                          
                }
                    // prevent recursion if script implementation calls base implementation
                    // mark function as 'in call':
                    quint32 prev = _q_function.data().toUInt32();
                    _q_function.setData(QScriptValue(engine, uint(prev | 0x0000B000)));
                    
                            _q_function.call(__qtscript_self,
                                QScriptValueList()
                                



    // type: double, copyable: true
        << qScriptValueFromValue(engine, 

        d
        )
      
                            )
                        
                    ;
                    _q_function.setData(QScriptValue(engine, prev));

                    //REcmaHelper::shellFunctionEnd("REcmaShellSnapDistance::setDistance", engine);

                    
            }
开发者ID:Jackieee,项目名称:qcad,代码行数:65,代码来源:REcmaShellSnapDistance.cpp


示例18: QTSCRIPT_IS_GENERATED_FUNCTION

      RVector REcmaShellSnap::snap(
                const RVector & position, RGraphicsView & view, double range
            ) {
                QScriptEngine* engine = __qtscript_self.engine();
                //REcmaHelper::shellFunctionStart("REcmaShellSnap::snap", engine);
                QScriptValue _q_function = __qtscript_self.property("snap");



                if (!_q_function.isFunction() || 
                    QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) ||
                    QTSCRIPT_IS_FUNCTION_IN_CALL(_q_function)
                    
                    /* function might have more arguments than expected:
                    || _q_function.property("length").toInt32()!=3*/
                    /*|| (__qtscript_self.propertyFlags("atEnd") & QScriptValue::QObjectMember)*/
                    ) {
                    //QString cppSig = "RSnap::snap";
                    
                        qFatal("RSnap::snap is pure virtual.");
                      
                }
                    // prevent recursion if script implementation calls base implementation
                    // mark function as 'in call':
                    quint32 prev = _q_function.data().toUInt32();
                    _q_function.setData(QScriptValue(engine, uint(prev | 0x0000B000)));
                    RVector res;
                      
                          res = qscriptvalue_cast< 
                            RVector
                          >(
                        
                            _q_function.call(__qtscript_self,
                                QScriptValueList()
                                



    // type: RVector &, copyable: true
        << qScriptValueFromValue(engine, 

        
            // const reference argument - make a new object:
            new RVector(position)
        )
      



    // type: RGraphicsView &, copyable: false
        << qScriptValueFromValue(engine, 

        &view
        )
      



    // type: double, copyable: true
        << qScriptValueFromValue(engine, 

        range
        )
      
                            )
                        
                      )
                    
                    ;
                    _q_function.setData(QScriptValue(engine, prev));

                    //REcmaHelper::shellFunctionEnd("REcmaShellSnap::snap", engine);

                    
                            return res;
                          
            }
开发者ID:fallenwind,项目名称:qcad,代码行数:77,代码来源:REcmaShellSnap.cpp


示例19: QTSCRIPT_IS_GENERATED_FUNCTION

      RFileImporter * REcmaShellFileImporterFactoryAdapter::instantiate(
                RDocument & document, RMessageHandler * messageHandler, RProgressHandler * progressHandler
            ) {
                QScriptEngine* engine = __qtscript_self.engine();
                //REcmaHelper::shellFunctionStart("REcmaShellFileImporterFactoryAdapter::instantiate", engine);
                QScriptValue _q_function = __qtscript_self.property("instantiate");



                if (!_q_function.isFunction() || 
                    QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) ||
                    QTSCRIPT_IS_FUNCTION_IN_CALL(_q_function)
                    
                    /* function might have more arguments than expected:
                    || _q_function.property("length").toInt32()!=3*/
                    /*|| (__qtscript_self.propertyFlags("atEnd") & QScriptValue::QObjectMember)*/
                    ) {
                    //QString cppSig = "RFileImporterFactoryAdapter::instantiate";
                    
                        // re-enable recursion for calls from C++ into ECMAScript functions
                        // leave it marked as generated though if appropriate:
                        
                        quint32 prev = _q_function.data().toUInt32();
                        //if (cppSig!="RGraphicsViewQt::event") {
                            _q_function.setData(QScriptValue(engine, prev & 0xFFFF0000));
                        //}
                        RFileImporter * ret =
                        RFileImporterFactoryAdapter::instantiate(
                            document, messageHandler, progressHandler
                        );

                        // block recursion again:
                        _q_function.setData(QScriptValue(engine, prev));

                        //REcmaHelper::shellFunctionEnd("REcmaShellFileImporterFactoryAdapter::instantiate", engine);

                        
                            return ret;
                          
                }
                    // prevent recursion if script implementation calls base implementation
                    // mark function as 'in call':
                    quint32 prev = _q_function.data().toUInt32();
                    _q_function.setData(QScriptValue(engine, uint(prev | 0x0000B000)));
                    RFileImporter * res;
                      
                          res = qscriptvalue_cast< 
                            RFileImporter *
                          >(
                        
                            _q_function.call(__qtscript_self,
                                QScriptValueList()
                                



    // type: RDocument &, copyable: false
        << qScriptValueFromValue(engine, 

        &document
        )
      



    // type: RMessageHandler *, copyable: false
        << qScriptValueFromValue(engine, 

        messageHandler
        )
      



    // type: RProgressHandler *, copyable: false
        << qScriptValueFromValue(engine, 

        progressHandler
        )
      
                            )
                        
                      )
                    
                    ;
                    _q_function.setData(QScriptValue(engine, prev));

                    //REcmaHelper::shellFunctionEnd("REcmaShellFileImporterFactoryAdapter::instantiate", engine);

                    
                            return res;
                          
            }
开发者ID:fallenwind,项目名称:qcad,代码行数:93,代码来源:REcmaShellFileImporterFactoryAdapter.cpp


示例20: QTSCRIPT_IS_GENERATED_FUNCTION

      bool REcmaShellFileImporterAdapter::importFile(
                const QString & fileName, const QString & nameFilter
            ) {
                QScriptEngine* engine = __qtscript_self.engine();
                //REcmaHelper::shellFunctionStart("REcmaShellFileImporterAdapter::importFile", engine);
                QScriptValue _q_function = __qtscript_self.property("importFile");



                if (!_q_function.isFunction() || 
                    QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) ||
                    QTSCRIPT_IS_FUNCTION_IN_CALL(_q_function)
                    
                    /* function might have more arguments than expected:
                    || _q_function.property("length").toInt32()!=2*/
                    /*|| (__qtscript_self.propertyFlags("atEnd") & QScriptValue::QObjectMember)*/
                    ) {
                    //QString cppSig = "RFileImporterAdapter::importFile";
                    
                        // re-enable recursion for calls from C++ into ECMAScript functions
                        // leave it marked as generated though if appropriate:
                        
                        quint32 prev = _q_function.data().toUInt32();
                        //if (cppSig!="RGraphicsViewQt::event") {
                            _q_function.setData(QScriptValue(engine, prev & 0xFFFF0000));
                        //}
                        bool ret =
                        RFileImporterAdapter::importFile(
                            fileName, nameFilter
                        );

                        // block recursion again:
                        _q_function.setData(QScriptValue(engine, prev));

                        //REcmaHelper::shellFunctionEnd("REcmaShellFileImporterAdapter::importFile", engine);

                        
                          return ret;
                        
                } else {
                    // prevent recursion if script implementation calls base implementation
                    // mark function as 'in call':
                    quint32 prev = _q_function.data().toUInt32();
                    _q_function.setData(QScriptValue(engine, uint(prev | 0x0000B000)));
                    bool res = qscriptvalue_cast< 
                        bool
                      >(
                    
                            _q_function.call(__qtscript_self,
                                QScriptValueList()
                                



    // type: QString &, copyable: true
        << qScriptValueFromValue(engine, 

        fileName
        )
      



    // type: QString &, copyable: true
        << qScriptValueFromValue(engine, 

        nameFilter
        )
      
                            )
                        
                      )
                    
                    ;
                    _q_function.setData(QScriptValue(engine, prev));

                    //REcmaHelper::shellFunctionEnd("REcmaShellFileImporterAdapter::importFile", engine);

                    
                            return res;
                          
                }
            }
开发者ID:Alpha-Kand,项目名称:qcad,代码行数:83,代码来源:REcmaShellFileImporterAdapter.cpp



注:本文中的QTSCRIPT_IS_GENERATED_FUNCTION函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ QTSS_GetValue函数代码示例发布时间:2022-05-30
下一篇:
C++ QTRY_COMPARE函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap