⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qcoreevent.cpp

📁 奇趣公司比较新的qt/emd版本
💻 CPP
📖 第 1 页 / 共 2 页
字号:
    Setting the accept parameter indicates that the event receiver    wants the event. Unwanted events might be propagated to the parent    widget. By default, isAccepted() is set to true, but don't rely on    this as subclasses may choose to clear it in their constructor.    For convenience, the accept flag can also be set with accept(),    and cleared with ignore().*//*!    \fn void QEvent::accept()    Sets the accept flag of the event object, the equivalent of    callign setAccepted(true).    Setting the accept parameter indicates that the event receiver    wants the event. Unwanted events might be propagated to the parent    widget.    \sa ignore()*//*!    \fn void QEvent::ignore()    Clears the accept flag parameter of the event object, the    equivalent of calling setAccepted(false).    Clearing the accept parameter indicates that the event receiver    does not want the event. Unwanted events might be propgated to the    parent widget.    \sa accept()*//*!    \fn QEvent::Type QEvent::type() const    Returns the event type.*//*!    \fn bool QEvent::spontaneous() const    Returns true if the event originated outside the application (a    system event); otherwise returns false.    The return value of this function is not defined for paint events.*//*!    \class QTimerEvent qcoreevent.h    \brief The QTimerEvent class contains parameters that describe a    timer event.    \ingroup events    Timer events are sent at regular intervals to objects that have    started one or more timers. Each timer has a unique identifier. A    timer is started with QObject::startTimer().    The QTimer class provides a high-level programming interface that    uses signals instead of events. It also provides single-shot timers.    The event handler QObject::timerEvent() receives timer events.    \sa QTimer, QObject::timerEvent(), QObject::startTimer(),    QObject::killTimer()*//*!    Constructs a timer event object with the timer identifier set to    \a timerId.*/QTimerEvent::QTimerEvent(int timerId)    : QEvent(Timer), id(timerId){}/*! \internal*/QTimerEvent::~QTimerEvent(){}/*!    \fn int QTimerEvent::timerId() const    Returns the unique timer identifier, which is the same identifier    as returned from QObject::startTimer().*//*!    \class QChildEvent    \brief The QChildEvent class contains event parameters for child object    events.    \ingroup events    Child events are sent immediately to objects when children are    added or removed.    In both cases you can only rely on the child being a QObject (or,    if QObject::isWidgetType() returns true, a QWidget). This is    because in the QEvent::ChildAdded case the child is not yet fully    constructed; in the QEvent::ChildRemoved case it might have    already been destructed.    The handler for these events is QObject::childEvent().*//*!    Constructs a child event object of a particular \a type for the    \a child.    \a type can be QEvent::ChildAdded, QEvent::ChildRemoved,    QEvent::ChildPolished, or QEvent::ChildRemoved.    \sa child()*/QChildEvent::QChildEvent(Type type, QObject *child)    : QEvent(type), c(child){}/*! \internal*/QChildEvent::~QChildEvent(){}/*!    \fn QObject *QChildEvent::child() const    Returns the child object that was added or removed.*//*!    \fn bool QChildEvent::added() const    Returns true if type() is QEvent::ChildAdded; otherwise returns    false.*//*!    \fn bool QChildEvent::removed() const    Returns true if type() is QEvent::ChildRemoved; otherwise returns    false.*//*!    \fn bool QChildEvent::polished() const    Returns true if type() is QEvent::ChildPolished; otherwise returns    false.*//*!    \class QCustomEvent    \brief The QCustomEvent class provides support for custom events.    \compat    QCustomEvent has a \c{void *} that can be used to store custom    data.    In Qt 3, QObject::customEvent() took a QCustomEvent pointer. We    found out that this approach was unsatisfactory, because    there was often no safe way of deleting the data held in the    \c{void *}.    In Qt 4, QObject::customEvent() takes a plain QEvent pointer.    You can add custom data by subclassing.    \sa QObject::customEvent(), QCoreApplication::notify()*//*!    \fn QCustomEvent::QCustomEvent(int type, void *data)    Constructs a custom event object with the event \a type and a    pointer to \a data. The value of \a type must be at least as    large as QEvent::User. By default, the data pointer is set to 0.*/#ifdef QT3_SUPPORTQCustomEvent::QCustomEvent(int type, void *data)    : QEvent(static_cast<Type>(type)){    d = reinterpret_cast<QEventPrivate *>(data);}/*! \internal*/QCustomEvent::~QCustomEvent(){}#endif/*!    \fn void QCustomEvent::setData(void *data)    \compat    Sets the generic data pointer to \a data.    \sa data()*//*!    \fn void *QCustomEvent::data() const    \compat    Returns a pointer to the generic event data.    \sa setData()*//*!    \fn bool QChildEvent::inserted() const    \compat    A child has been inserted if the event's type() is ChildInserted.*//*!    \class QDynamicPropertyChangeEvent    \since 4.2    \brief The QDynamicPropertyChangeEvent class contains event parameters for dynamic    property change events.    \ingroup events    Dynamic property change events are sent to objects when properties are    dynamically added, changed or removed using QObject::setProperty().*//*!    Constructs a dynamic property change event object with the property name set to    \a name.*/QDynamicPropertyChangeEvent::QDynamicPropertyChangeEvent(const QByteArray &name)    : QEvent(QEvent::DynamicPropertyChange), n(name){}/*!    \internal*/QDynamicPropertyChangeEvent::~QDynamicPropertyChangeEvent(){}/*!    \fn QByteArray QDynamicPropertyChangeEvent::propertyName() const    Returns the name of the dynamic property that was added, changed or    removed.    \sa QObject::setProperty(), QObject::dynamicPropertyNames()*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -