コード例 #1
0
ファイル: RMouseEvent.cpp プロジェクト: ppiecuch/qcad
RMouseEvent::RMouseEvent(const QMouseEvent& mouseEvent, RGraphicsScene& s,
        RGraphicsView& v, qreal devicePixelRatio) :
    QMouseEvent(mouseEvent),
    RInputEvent(RVector(mouseEvent.posF().x(), mouseEvent.posF().y()), s, v, devicePixelRatio) {

    setAccepted(mouseEvent.isAccepted());
}
コード例 #2
0
ファイル: BuildLedger.cpp プロジェクト: Empresaria/rippled
std::shared_ptr<Ledger>
buildLedgerImpl(
    std::shared_ptr<Ledger const> const& parent,
    NetClock::time_point closeTime,
    const bool closeTimeCorrect,
    NetClock::duration closeResolution,
    Application& app,
    beast::Journal j,
    ApplyTxs&& applyTxs)
{
    auto buildLCL = std::make_shared<Ledger>(*parent, closeTime);

    if (buildLCL->rules().enabled(featureSHAMapV2) &&
        !buildLCL->stateMap().is_v2())
    {
        buildLCL->make_v2();
    }

    // Set up to write SHAMap changes to our database,
    //   perform updates, extract changes

    {
        OpenView accum(&*buildLCL);
        assert(!accum.open());
        applyTxs(accum, buildLCL);
        accum.apply(*buildLCL);
    }

    buildLCL->updateSkipList();

    {
        // Write the final version of all modified SHAMap
        // nodes to the node store to preserve the new LCL

        int const asf = buildLCL->stateMap().flushDirty(
            hotACCOUNT_NODE, buildLCL->info().seq);
        int const tmf = buildLCL->txMap().flushDirty(
            hotTRANSACTION_NODE, buildLCL->info().seq);
        JLOG(j.debug()) << "Flushed " << asf << " accounts and " << tmf
                        << " transaction nodes";
    }
    buildLCL->unshare();

    // Accept ledger
    buildLCL->setAccepted(
        closeTime, closeResolution, closeTimeCorrect, app.config());

    return buildLCL;
}
コード例 #3
0
int QDeclarativePinchEvent::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QObject::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< QPointF*>(_v) = center(); break;
        case 1: *reinterpret_cast< QPointF*>(_v) = startCenter(); break;
        case 2: *reinterpret_cast< QPointF*>(_v) = previousCenter(); break;
        case 3: *reinterpret_cast< qreal*>(_v) = scale(); break;
        case 4: *reinterpret_cast< qreal*>(_v) = previousScale(); break;
        case 5: *reinterpret_cast< qreal*>(_v) = angle(); break;
        case 6: *reinterpret_cast< qreal*>(_v) = previousAngle(); break;
        case 7: *reinterpret_cast< qreal*>(_v) = rotation(); break;
        case 8: *reinterpret_cast< QPointF*>(_v) = point1(); break;
        case 9: *reinterpret_cast< QPointF*>(_v) = startPoint1(); break;
        case 10: *reinterpret_cast< QPointF*>(_v) = point2(); break;
        case 11: *reinterpret_cast< QPointF*>(_v) = startPoint2(); break;
        case 12: *reinterpret_cast< int*>(_v) = pointCount(); break;
        case 13: *reinterpret_cast< bool*>(_v) = accepted(); break;
        }
        _id -= 14;
    } else if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 13: setAccepted(*reinterpret_cast< bool*>(_v)); break;
        }
        _id -= 14;
    } else if (_c == QMetaObject::ResetProperty) {
        _id -= 14;
    } else if (_c == QMetaObject::QueryPropertyDesignable) {
        _id -= 14;
    } else if (_c == QMetaObject::QueryPropertyScriptable) {
        _id -= 14;
    } else if (_c == QMetaObject::QueryPropertyStored) {
        _id -= 14;
    } else if (_c == QMetaObject::QueryPropertyEditable) {
        _id -= 14;
    } else if (_c == QMetaObject::QueryPropertyUser) {
        _id -= 14;
    }
#endif // QT_NO_PROPERTIES
    return _id;
}
コード例 #4
0
/*!
    Clears the accept flag parameter of the given \a gesture object, the equivalent
    of calling \l{QGestureEvent::setAccepted()}{setAccepted(gesture, false)}.

    Clearing the accept flag indicates that the event receiver does not
    want the gesture. Unwanted gestures may be propagated to the parent widget.

    \sa QGestureEvent::accept()
*/
void QGestureEvent::ignore(QGesture *gesture)
{
    if (gesture)
        setAccepted(gesture->gestureType(), false);
}
コード例 #5
0
/*!
    Sets the accept flag of the given \a gesture object to the specified \a value.

    Setting the accept flag indicates that the event receiver wants the \a gesture.
    Unwanted gestures may be propagated to the parent widget.

    By default, gestures in events of type QEvent::Gesture are accepted, and
    gestures in QEvent::GestureOverride events are ignored.

    For convenience, the accept flag can also be set with
    \l{QGestureEvent::accept()}{accept(gesture)}, and cleared with
    \l{QGestureEvent::ignore()}{ignore(gesture)}.
*/
void QGestureEvent::setAccepted(QGesture *gesture, bool value)
{
    if (gesture)
        setAccepted(gesture->gestureType(), value);
}
コード例 #6
0
/*!
    Sets the accept flag of the given \a gesture object, the equivalent of calling
    \l{QGestureEvent::setAccepted()}{setAccepted(gesture, true)}.

    Setting the accept flag indicates that the event receiver wants the
    gesture. Unwanted gestures may be propagated to the parent widget.

    \sa QGestureEvent::ignore()
*/
void QGestureEvent::accept(QGesture *gesture)
{
    if (gesture)
        setAccepted(gesture->gestureType(), true);
}
コード例 #7
0
/*!
    Clears the accept flag parameter of the given \a gestureType, the equivalent
    of calling \l{QGestureEvent::setAccepted()}{setAccepted(gesture, false)}.

    Clearing the accept flag indicates that the event receiver does not
    want the gesture. Unwanted gestures may be propgated to the parent widget.

    \sa QGestureEvent::accept()
*/
void QGestureEvent::ignore(Qt::GestureType gestureType)
{
    setAccepted(gestureType, false);
}
コード例 #8
0
/*!
    Sets the accept flag of the given \a gestureType, the equivalent of calling
    \l{QGestureEvent::setAccepted()}{setAccepted(gestureType, true)}.

    Setting the accept flag indicates that the event receiver wants the
    gesture. Unwanted gestures may be propagated to the parent widget.

    \sa QGestureEvent::ignore()
*/
void QGestureEvent::accept(Qt::GestureType gestureType)
{
    setAccepted(gestureType, true);
}
コード例 #9
0
/*!
    Sets the accept flag of the given \a gestureType object to the specified
    \a value.

    Setting the accept flag indicates that the event receiver wants to receive
    gestures of the specified type, \a gestureType. Unwanted gestures may be
    propagated to the parent widget.

    By default, gestures in events of type QEvent::Gesture are accepted, and
    gestures in QEvent::GestureOverride events are ignored.

    For convenience, the accept flag can also be set with
    \l{QGestureEvent::accept()}{accept(gestureType)}, and cleared with
    \l{QGestureEvent::ignore()}{ignore(gestureType)}.
*/
void QGestureEvent::setAccepted(Qt::GestureType gestureType, bool value)
{
    setAccepted(false);
    m_accepted[gestureType] = value;
}
コード例 #10
0
ファイル: f_event.hpp プロジェクト: dreamsxin/3FEngine
		void ignore() { setAccepted(false); }
コード例 #11
0
ファイル: f_event.hpp プロジェクト: dreamsxin/3FEngine
		void accept() { setAccepted(true); }