QtGui: Rename all QEvent members according to the m_ convention
As they are protected, they need to be excluded from the Python bindings, which is best done by a pattern. Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: I667aa3b8e229e11b3b46635adfddbd62ce4747c1 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This commit is contained in:
parent
044cb3ce20
commit
ea2ae140e9
@ -150,7 +150,7 @@ QEnterEvent::~QEnterEvent()
|
||||
\internal
|
||||
*/
|
||||
QInputEvent::QInputEvent(Type type, const QInputDevice *dev, Qt::KeyboardModifiers modifiers)
|
||||
: QEvent(type), m_dev(dev), modState(modifiers), ts(0)
|
||||
: QEvent(type), m_dev(dev), m_modState(modifiers)
|
||||
{}
|
||||
|
||||
/*!
|
||||
@ -804,7 +804,7 @@ Qt::MouseEventFlags QMouseEvent::flags() const
|
||||
*/
|
||||
QHoverEvent::QHoverEvent(Type type, const QPointF &pos, const QPointF &oldPos,
|
||||
Qt::KeyboardModifiers modifiers, const QPointingDevice *device)
|
||||
: QSinglePointEvent(type, device, pos, pos, pos, Qt::NoButton, Qt::NoButton, modifiers), op(oldPos)
|
||||
: QSinglePointEvent(type, device, pos, pos, pos, Qt::NoButton, Qt::NoButton, modifiers), m_oldPos(oldPos)
|
||||
{
|
||||
}
|
||||
|
||||
@ -1088,9 +1088,9 @@ QWheelEvent::~QWheelEvent()
|
||||
*/
|
||||
QKeyEvent::QKeyEvent(Type type, int key, Qt::KeyboardModifiers modifiers, const QString& text,
|
||||
bool autorep, ushort count)
|
||||
: QInputEvent(type, QInputDevice::primaryKeyboard(), modifiers), txt(text), k(key),
|
||||
nScanCode(0), nVirtualKey(0), nModifiers(0),
|
||||
c(count), autor(autorep)
|
||||
: QInputEvent(type, QInputDevice::primaryKeyboard(), modifiers), m_text(text), m_key(key),
|
||||
m_scanCode(0), m_virtualKey(0), m_modifiers(0),
|
||||
m_count(count), m_autoRepeat(autorep)
|
||||
{
|
||||
if (type == QEvent::ShortcutOverride)
|
||||
ignore();
|
||||
@ -1117,9 +1117,9 @@ QKeyEvent::QKeyEvent(Type type, int key, Qt::KeyboardModifiers modifiers, const
|
||||
QKeyEvent::QKeyEvent(Type type, int key, Qt::KeyboardModifiers modifiers,
|
||||
quint32 nativeScanCode, quint32 nativeVirtualKey, quint32 nativeModifiers,
|
||||
const QString &text, bool autorep, ushort count, const QInputDevice *device)
|
||||
: QInputEvent(type, device, modifiers), txt(text), k(key),
|
||||
nScanCode(nativeScanCode), nVirtualKey(nativeVirtualKey), nModifiers(nativeModifiers),
|
||||
c(count), autor(autorep)
|
||||
: QInputEvent(type, device, modifiers), m_text(text), m_key(key),
|
||||
m_scanCode(nativeScanCode), m_virtualKey(nativeVirtualKey), m_modifiers(nativeModifiers),
|
||||
m_count(count), m_autoRepeat(autorep)
|
||||
{
|
||||
if (type == QEvent::ShortcutOverride)
|
||||
ignore();
|
||||
@ -1422,7 +1422,7 @@ QPaintEvent::~QPaintEvent()
|
||||
\a pos and \a oldPos respectively.
|
||||
*/
|
||||
QMoveEvent::QMoveEvent(const QPoint &pos, const QPoint &oldPos)
|
||||
: QEvent(Move), p(pos), oldp(oldPos)
|
||||
: QEvent(Move), m_pos(pos), m_oldPos(oldPos)
|
||||
{}
|
||||
|
||||
/*!
|
||||
@ -1469,7 +1469,7 @@ QMoveEvent::~QMoveEvent()
|
||||
*/
|
||||
QExposeEvent::QExposeEvent(const QRegion &exposeRegion)
|
||||
: QEvent(Expose)
|
||||
, rgn(exposeRegion)
|
||||
, m_region(exposeRegion)
|
||||
{
|
||||
}
|
||||
|
||||
@ -1554,7 +1554,7 @@ QPlatformSurfaceEvent::~QPlatformSurfaceEvent()
|
||||
size and \a oldSize respectively.
|
||||
*/
|
||||
QResizeEvent::QResizeEvent(const QSize &size, const QSize &oldSize)
|
||||
: QEvent(Resize), s(size), olds(oldSize)
|
||||
: QEvent(Resize), m_size(size), m_oldSize(oldSize)
|
||||
{}
|
||||
|
||||
/*!
|
||||
@ -1726,7 +1726,7 @@ QContextMenuEvent::QContextMenuEvent(Reason reason, const QPoint &pos, const QPo
|
||||
*/
|
||||
QContextMenuEvent::QContextMenuEvent(Reason reason, const QPoint &pos, const QPoint &globalPos,
|
||||
Qt::KeyboardModifiers modifiers)
|
||||
: QInputEvent(ContextMenu, QPointingDevice::primaryPointingDevice(), modifiers), p(pos), gp(globalPos), reas(reason)
|
||||
: QInputEvent(ContextMenu, QPointingDevice::primaryPointingDevice(), modifiers), m_pos(pos), m_globalPos(globalPos), m_reason(reason)
|
||||
{}
|
||||
|
||||
|
||||
@ -1749,10 +1749,10 @@ QContextMenuEvent::~QContextMenuEvent()
|
||||
position explicitly.
|
||||
*/
|
||||
QContextMenuEvent::QContextMenuEvent(Reason reason, const QPoint &pos)
|
||||
: QInputEvent(ContextMenu, QInputDevice::primaryKeyboard()), p(pos), reas(reason)
|
||||
: QInputEvent(ContextMenu, QInputDevice::primaryKeyboard()), m_pos(pos), m_reason(reason)
|
||||
{
|
||||
#ifndef QT_NO_CURSOR
|
||||
gp = QCursor::pos();
|
||||
m_globalPos = QCursor::pos();
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -2025,7 +2025,7 @@ QContextMenuEvent::QContextMenuEvent(Reason reason, const QPoint &pos)
|
||||
\sa setCommitString()
|
||||
*/
|
||||
QInputMethodEvent::QInputMethodEvent()
|
||||
: QEvent(QEvent::InputMethod), replace_from(0), replace_length(0)
|
||||
: QEvent(QEvent::InputMethod), m_replacementStart(0), m_replacementLength(0)
|
||||
{
|
||||
}
|
||||
|
||||
@ -2040,8 +2040,8 @@ QInputMethodEvent::QInputMethodEvent()
|
||||
\sa preeditString(), attributes()
|
||||
*/
|
||||
QInputMethodEvent::QInputMethodEvent(const QString &preeditText, const QList<Attribute> &attributes)
|
||||
: QEvent(QEvent::InputMethod), preedit(preeditText), attrs(attributes),
|
||||
replace_from(0), replace_length(0)
|
||||
: QEvent(QEvent::InputMethod), m_preedit(preeditText), m_attributes(attributes),
|
||||
m_replacementStart(0), m_replacementLength(0)
|
||||
{
|
||||
}
|
||||
|
||||
@ -2049,8 +2049,8 @@ QInputMethodEvent::QInputMethodEvent(const QString &preeditText, const QList<Att
|
||||
Constructs a copy of \a other.
|
||||
*/
|
||||
QInputMethodEvent::QInputMethodEvent(const QInputMethodEvent &other)
|
||||
: QEvent(QEvent::InputMethod), preedit(other.preedit), attrs(other.attrs),
|
||||
commit(other.commit), replace_from(other.replace_from), replace_length(other.replace_length)
|
||||
: QEvent(QEvent::InputMethod), m_preedit(other.m_preedit), m_attributes(other.m_attributes),
|
||||
m_commit(other.m_commit), m_replacementStart(other.m_replacementStart), m_replacementLength(other.m_replacementLength)
|
||||
{
|
||||
}
|
||||
|
||||
@ -2076,9 +2076,9 @@ QInputMethodEvent::~QInputMethodEvent()
|
||||
*/
|
||||
void QInputMethodEvent::setCommitString(const QString &commitString, int replaceFrom, int replaceLength)
|
||||
{
|
||||
commit = commitString;
|
||||
replace_from = replaceFrom;
|
||||
replace_length = replaceLength;
|
||||
m_commit = commitString;
|
||||
m_replacementStart = replaceFrom;
|
||||
m_replacementLength = replaceLength;
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -2325,10 +2325,10 @@ QTabletEvent::QTabletEvent(Type type, const QPointingDevice *dev, const QPointF
|
||||
Qt::KeyboardModifiers keyState,
|
||||
Qt::MouseButton button, Qt::MouseButtons buttons)
|
||||
: QSinglePointEvent(type, dev, pos, pos, globalPos, button, buttons, keyState),
|
||||
mXT(xTilt),
|
||||
mYT(yTilt),
|
||||
mZ(z),
|
||||
mTangential(tangentialPressure)
|
||||
m_xTilt(xTilt),
|
||||
m_yTilt(yTilt),
|
||||
m_zTilt(z),
|
||||
m_tangential(tangentialPressure)
|
||||
{
|
||||
QMutableEventPoint &mut = QMutableEventPoint::from(m_point);
|
||||
mut.setPressure(pressure);
|
||||
@ -2597,8 +2597,9 @@ QTabletEvent::~QTabletEvent()
|
||||
*/
|
||||
QNativeGestureEvent::QNativeGestureEvent(Qt::NativeGestureType type, const QPointingDevice *device, const QPointF &localPos, const QPointF &scenePos,
|
||||
const QPointF &globalPos, qreal realValue, ulong sequenceId, quint64 intValue)
|
||||
: QSinglePointEvent(QEvent::NativeGesture, device, localPos, scenePos, globalPos, Qt::NoButton, Qt::NoButton, Qt::NoModifier), mGestureType(type),
|
||||
mRealValue(realValue), mSequenceId(sequenceId), mIntValue(intValue)
|
||||
: QSinglePointEvent(QEvent::NativeGesture, device, localPos, scenePos, globalPos, Qt::NoButton, Qt::NoButton, Qt::NoModifier),
|
||||
m_gestureType(type), m_realValue(realValue), m_sequenceId(sequenceId),
|
||||
m_intValue(intValue)
|
||||
{
|
||||
}
|
||||
|
||||
@ -2685,7 +2686,7 @@ QNativeGestureEvent::~QNativeGestureEvent()
|
||||
QDragMoveEvent::QDragMoveEvent(const QPoint& pos, Qt::DropActions actions, const QMimeData *data,
|
||||
Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Type type)
|
||||
: QDropEvent(pos, actions, data, buttons, modifiers, type)
|
||||
, rect(pos, QSize(1, 1))
|
||||
, m_rect(pos, QSize(1, 1))
|
||||
{}
|
||||
|
||||
/*!
|
||||
@ -2797,12 +2798,12 @@ QDragMoveEvent::~QDragMoveEvent()
|
||||
*/
|
||||
QDropEvent::QDropEvent(const QPointF& pos, Qt::DropActions actions, const QMimeData *data,
|
||||
Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Type type)
|
||||
: QEvent(type), p(pos), mouseState(buttons),
|
||||
modState(modifiers), act(actions),
|
||||
mdata(data)
|
||||
: QEvent(type), m_pos(pos), m_mouseState(buttons),
|
||||
m_modState(modifiers), m_actions(actions),
|
||||
m_data(data)
|
||||
{
|
||||
default_action = QGuiApplicationPrivate::platformIntegration()->drag()->defaultAction(act, modifiers);
|
||||
drop_action = default_action;
|
||||
m_defaultAction = m_dropAction =
|
||||
QGuiApplicationPrivate::platformIntegration()->drag()->defaultAction(m_actions, modifiers);
|
||||
ignore();
|
||||
}
|
||||
|
||||
@ -2833,9 +2834,9 @@ QObject* QDropEvent::source() const
|
||||
|
||||
void QDropEvent::setDropAction(Qt::DropAction action)
|
||||
{
|
||||
if (!(action & act) && action != Qt::IgnoreAction)
|
||||
action = default_action;
|
||||
drop_action = action;
|
||||
if (!(action & m_actions) && action != Qt::IgnoreAction)
|
||||
action = m_defaultAction;
|
||||
m_dropAction = action;
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -3041,7 +3042,7 @@ QDragLeaveEvent::~QDragLeaveEvent()
|
||||
\sa pos(), globalPos()
|
||||
*/
|
||||
QHelpEvent::QHelpEvent(Type type, const QPoint &pos, const QPoint &globalPos)
|
||||
: QEvent(type), p(pos), gp(globalPos)
|
||||
: QEvent(type), m_pos(pos), m_globalPos(globalPos)
|
||||
{}
|
||||
|
||||
/*!
|
||||
@ -3150,7 +3151,7 @@ QHelpEvent::~QHelpEvent()
|
||||
\sa tip()
|
||||
*/
|
||||
QStatusTipEvent::QStatusTipEvent(const QString &tip)
|
||||
: QEvent(StatusTip), s(tip)
|
||||
: QEvent(StatusTip), m_tip(tip)
|
||||
{}
|
||||
|
||||
/*! \internal
|
||||
@ -3190,7 +3191,7 @@ QStatusTipEvent::~QStatusTipEvent()
|
||||
\sa href()
|
||||
*/
|
||||
QWhatsThisClickedEvent::QWhatsThisClickedEvent(const QString &href)
|
||||
: QEvent(WhatsThisClicked), s(href)
|
||||
: QEvent(WhatsThisClicked), m_href(href)
|
||||
{}
|
||||
|
||||
/*! \internal
|
||||
@ -3236,7 +3237,7 @@ QWhatsThisClickedEvent::~QWhatsThisClickedEvent()
|
||||
action \a before. If \a before is \nullptr, the action is appended.
|
||||
*/
|
||||
QActionEvent::QActionEvent(int type, QAction *action, QAction *before)
|
||||
: QEvent(static_cast<QEvent::Type>(type)), act(action), bef(before)
|
||||
: QEvent(static_cast<QEvent::Type>(type)), m_action(action), m_before(before)
|
||||
{}
|
||||
|
||||
/*! \internal
|
||||
@ -3370,7 +3371,7 @@ QShowEvent::~QShowEvent()
|
||||
Constructs a file open event for the given \a file.
|
||||
*/
|
||||
QFileOpenEvent::QFileOpenEvent(const QString &file)
|
||||
: QEvent(FileOpen), f(file), m_url(QUrl::fromLocalFile(file))
|
||||
: QEvent(FileOpen), m_file(file), m_url(QUrl::fromLocalFile(file))
|
||||
{
|
||||
}
|
||||
|
||||
@ -3380,7 +3381,7 @@ QFileOpenEvent::QFileOpenEvent(const QString &file)
|
||||
Constructs a file open event for the given \a url.
|
||||
*/
|
||||
QFileOpenEvent::QFileOpenEvent(const QUrl &url)
|
||||
: QEvent(FileOpen), f(url.toLocalFile()), m_url(url)
|
||||
: QEvent(FileOpen), m_file(url.toLocalFile()), m_url(url)
|
||||
{
|
||||
}
|
||||
|
||||
@ -3418,7 +3419,7 @@ QFileOpenEvent::~QFileOpenEvent()
|
||||
*/
|
||||
bool QFileOpenEvent::openFile(QFile &file, QIODevice::OpenMode flags) const
|
||||
{
|
||||
file.setFileName(f);
|
||||
file.setFileName(m_file);
|
||||
return file.open(flags);
|
||||
}
|
||||
|
||||
@ -3444,7 +3445,7 @@ bool QFileOpenEvent::openFile(QFile &file, QIODevice::OpenMode flags) const
|
||||
Construct a QToolBarChangeEvent given the current button state in \a state.
|
||||
*/
|
||||
QToolBarChangeEvent::QToolBarChangeEvent(bool t)
|
||||
: QEvent(ToolBarChange), tog(t)
|
||||
: QEvent(ToolBarChange), m_toggle(t)
|
||||
{}
|
||||
|
||||
/*! \internal
|
||||
@ -3480,7 +3481,7 @@ QToolBarChangeEvent::~QToolBarChangeEvent()
|
||||
for the same key sequence.
|
||||
*/
|
||||
QShortcutEvent::QShortcutEvent(const QKeySequence &key, int id, bool ambiguous)
|
||||
: QEvent(Shortcut), sequence(key), ambig(ambiguous), sid(id)
|
||||
: QEvent(Shortcut), m_sequence(key), m_ambiguous(ambiguous), m_shortcutId(id)
|
||||
{
|
||||
}
|
||||
|
||||
@ -4026,8 +4027,8 @@ QDebug operator<<(QDebug dbg, const QEvent *e)
|
||||
|
||||
/*! \internal
|
||||
*/
|
||||
QWindowStateChangeEvent::QWindowStateChangeEvent(Qt::WindowStates s, bool isOverride)
|
||||
: QEvent(WindowStateChange), ostate(s), m_override(isOverride)
|
||||
QWindowStateChangeEvent::QWindowStateChangeEvent(Qt::WindowStates oldState, bool isOverride)
|
||||
: QEvent(WindowStateChange), m_oldStates(oldState), m_override(isOverride)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -76,15 +76,15 @@ public:
|
||||
~QInputEvent();
|
||||
const QInputDevice *device() const { return m_dev; }
|
||||
QInputDevice::DeviceType deviceType() const { return m_dev ? m_dev->type() : QInputDevice::DeviceType::Unknown; }
|
||||
inline Qt::KeyboardModifiers modifiers() const { return modState; }
|
||||
inline void setModifiers(Qt::KeyboardModifiers amodifiers) { modState = amodifiers; }
|
||||
inline ulong timestamp() const { return ts; }
|
||||
inline void setTimestamp(ulong atimestamp) { ts = atimestamp; }
|
||||
inline Qt::KeyboardModifiers modifiers() const { return m_modState; }
|
||||
inline void setModifiers(Qt::KeyboardModifiers modifiers) { m_modState = modifiers; }
|
||||
inline ulong timestamp() const { return m_timeStamp; }
|
||||
inline void setTimestamp(ulong timestamp) { m_timeStamp = timestamp; }
|
||||
|
||||
protected:
|
||||
const QInputDevice *m_dev = nullptr;
|
||||
Qt::KeyboardModifiers modState = Qt::NoModifier;
|
||||
ulong ts;
|
||||
Qt::KeyboardModifiers m_modState = Qt::NoModifier;
|
||||
ulong m_timeStamp = 0;
|
||||
qint64 m_extra = 0; // reserved, unused for now
|
||||
};
|
||||
|
||||
@ -330,12 +330,12 @@ public:
|
||||
#endif // QT_DEPRECATED_SINCE(6, 0)
|
||||
|
||||
// TODO deprecate when we figure out an actual replacement (point history?)
|
||||
inline QPoint oldPos() const { return op.toPoint(); }
|
||||
inline QPointF oldPosF() const { return op; }
|
||||
inline QPoint oldPos() const { return m_oldPos.toPoint(); }
|
||||
inline QPointF oldPosF() const { return m_oldPos; }
|
||||
|
||||
protected:
|
||||
quint32 mReserved : 16;
|
||||
QPointF op; // TODO remove?
|
||||
quint32 m_reserved : 16;
|
||||
QPointF m_oldPos; // TODO remove?
|
||||
};
|
||||
|
||||
#if QT_CONFIG(wheelevent)
|
||||
@ -406,15 +406,15 @@ public:
|
||||
#endif
|
||||
inline qreal pressure() const { return point(0).pressure(); }
|
||||
inline qreal rotation() const { return point(0).rotation(); }
|
||||
inline int z() const { return mZ; }
|
||||
inline qreal tangentialPressure() const { return mTangential; }
|
||||
inline int xTilt() const { return mXT; }
|
||||
inline int yTilt() const { return mYT; }
|
||||
inline int z() const { return m_zTilt; }
|
||||
inline qreal tangentialPressure() const { return m_tangential; }
|
||||
inline int xTilt() const { return m_xTilt; }
|
||||
inline int yTilt() const { return m_yTilt; }
|
||||
|
||||
protected:
|
||||
quint32 mReserved : 16;
|
||||
int mXT, mYT, mZ;
|
||||
qreal mTangential;
|
||||
quint32 m_reserved : 16;
|
||||
int m_xTilt, m_yTilt, m_zTilt;
|
||||
qreal m_tangential;
|
||||
};
|
||||
#endif // QT_CONFIG(tabletevent)
|
||||
|
||||
@ -425,8 +425,8 @@ public:
|
||||
QNativeGestureEvent(Qt::NativeGestureType type, const QPointingDevice *dev, const QPointF &localPos, const QPointF &scenePos,
|
||||
const QPointF &globalPos, qreal value, ulong sequenceId, quint64 intArgument);
|
||||
~QNativeGestureEvent();
|
||||
Qt::NativeGestureType gestureType() const { return Qt::NativeGestureType(mGestureType); }
|
||||
qreal value() const { return mRealValue; }
|
||||
Qt::NativeGestureType gestureType() const { return Qt::NativeGestureType(m_gestureType); }
|
||||
qreal value() const { return m_realValue; }
|
||||
|
||||
#if QT_DEPRECATED_SINCE(6, 0)
|
||||
#ifndef QT_NO_INTEGER_EVENT_COORDINATES
|
||||
@ -444,11 +444,11 @@ public:
|
||||
#endif
|
||||
|
||||
protected:
|
||||
quint32 mGestureType : 4;
|
||||
quint32 mReserved : 12;
|
||||
qreal mRealValue;
|
||||
ulong mSequenceId;
|
||||
quint64 mIntValue;
|
||||
quint32 m_gestureType : 4;
|
||||
quint32 m_reserved : 12;
|
||||
qreal m_realValue;
|
||||
ulong m_sequenceId;
|
||||
quint64 m_intValue;
|
||||
};
|
||||
#endif // QT_CONFIG(gestures)
|
||||
|
||||
@ -463,27 +463,27 @@ public:
|
||||
const QInputDevice *device = QInputDevice::primaryKeyboard());
|
||||
~QKeyEvent();
|
||||
|
||||
int key() const { return k; }
|
||||
int key() const { return m_key; }
|
||||
#if QT_CONFIG(shortcut)
|
||||
bool matches(QKeySequence::StandardKey key) const;
|
||||
#endif
|
||||
Qt::KeyboardModifiers modifiers() const;
|
||||
inline QString text() const { return txt; }
|
||||
inline bool isAutoRepeat() const { return autor; }
|
||||
inline int count() const { return int(c); }
|
||||
inline QString text() const { return m_text; }
|
||||
inline bool isAutoRepeat() const { return m_autoRepeat; }
|
||||
inline int count() const { return int(m_count); }
|
||||
|
||||
inline quint32 nativeScanCode() const { return nScanCode; }
|
||||
inline quint32 nativeVirtualKey() const { return nVirtualKey; }
|
||||
inline quint32 nativeModifiers() const { return nModifiers; }
|
||||
inline quint32 nativeScanCode() const { return m_scanCode; }
|
||||
inline quint32 nativeVirtualKey() const { return m_virtualKey; }
|
||||
inline quint32 nativeModifiers() const { return m_modifiers; }
|
||||
|
||||
protected:
|
||||
QString txt;
|
||||
int k;
|
||||
quint32 nScanCode;
|
||||
quint32 nVirtualKey;
|
||||
quint32 nModifiers;
|
||||
ushort c;
|
||||
ushort autor:1;
|
||||
QString m_text;
|
||||
int m_key;
|
||||
quint32 m_scanCode;
|
||||
quint32 m_virtualKey;
|
||||
quint32 m_modifiers;
|
||||
ushort m_count;
|
||||
ushort m_autoRepeat:1;
|
||||
// ushort reserved:15;
|
||||
};
|
||||
|
||||
@ -526,23 +526,23 @@ public:
|
||||
QMoveEvent(const QPoint &pos, const QPoint &oldPos);
|
||||
~QMoveEvent();
|
||||
|
||||
inline const QPoint &pos() const { return p; }
|
||||
inline const QPoint &oldPos() const { return oldp;}
|
||||
inline const QPoint &pos() const { return m_pos; }
|
||||
inline const QPoint &oldPos() const { return m_oldPos;}
|
||||
protected:
|
||||
QPoint p, oldp;
|
||||
QPoint m_pos, m_oldPos;
|
||||
friend class QApplication;
|
||||
};
|
||||
|
||||
class Q_GUI_EXPORT QExposeEvent : public QEvent
|
||||
{
|
||||
public:
|
||||
explicit QExposeEvent(const QRegion &rgn);
|
||||
explicit QExposeEvent(const QRegion &m_region);
|
||||
~QExposeEvent();
|
||||
|
||||
inline const QRegion ®ion() const { return rgn; }
|
||||
inline const QRegion ®ion() const { return m_region; }
|
||||
|
||||
protected:
|
||||
QRegion rgn;
|
||||
QRegion m_region;
|
||||
};
|
||||
|
||||
class Q_GUI_EXPORT QPlatformSurfaceEvent : public QEvent
|
||||
@ -568,10 +568,10 @@ public:
|
||||
QResizeEvent(const QSize &size, const QSize &oldSize);
|
||||
~QResizeEvent();
|
||||
|
||||
inline const QSize &size() const { return s; }
|
||||
inline const QSize &oldSize()const { return olds;}
|
||||
inline const QSize &size() const { return m_size; }
|
||||
inline const QSize &oldSize()const { return m_oldSize;}
|
||||
protected:
|
||||
QSize s, olds;
|
||||
QSize m_size, m_oldSize;
|
||||
friend class QApplication;
|
||||
};
|
||||
|
||||
@ -619,20 +619,20 @@ public:
|
||||
QContextMenuEvent(Reason reason, const QPoint &pos);
|
||||
~QContextMenuEvent();
|
||||
|
||||
inline int x() const { return p.x(); }
|
||||
inline int y() const { return p.y(); }
|
||||
inline int globalX() const { return gp.x(); }
|
||||
inline int globalY() const { return gp.y(); }
|
||||
inline int x() const { return m_pos.x(); }
|
||||
inline int y() const { return m_pos.y(); }
|
||||
inline int globalX() const { return m_globalPos.x(); }
|
||||
inline int globalY() const { return m_globalPos.y(); }
|
||||
|
||||
inline const QPoint& pos() const { return p; }
|
||||
inline const QPoint& globalPos() const { return gp; }
|
||||
inline const QPoint& pos() const { return m_pos; }
|
||||
inline const QPoint& globalPos() const { return m_globalPos; }
|
||||
|
||||
inline Reason reason() const { return Reason(reas); }
|
||||
inline Reason reason() const { return Reason(m_reason); }
|
||||
|
||||
protected:
|
||||
QPoint p;
|
||||
QPoint gp;
|
||||
uint reas : 8;
|
||||
QPoint m_pos;
|
||||
QPoint m_globalPos;
|
||||
uint m_reason : 8;
|
||||
};
|
||||
#endif // QT_NO_CONTEXTMENU
|
||||
|
||||
@ -662,21 +662,21 @@ public:
|
||||
~QInputMethodEvent();
|
||||
|
||||
void setCommitString(const QString &commitString, int replaceFrom = 0, int replaceLength = 0);
|
||||
inline const QList<Attribute> &attributes() const { return attrs; }
|
||||
inline const QString &preeditString() const { return preedit; }
|
||||
inline const QList<Attribute> &attributes() const { return m_attributes; }
|
||||
inline const QString &preeditString() const { return m_preedit; }
|
||||
|
||||
inline const QString &commitString() const { return commit; }
|
||||
inline int replacementStart() const { return replace_from; }
|
||||
inline int replacementLength() const { return replace_length; }
|
||||
inline const QString &commitString() const { return m_commit; }
|
||||
inline int replacementStart() const { return m_replacementStart; }
|
||||
inline int replacementLength() const { return m_replacementLength; }
|
||||
|
||||
QInputMethodEvent(const QInputMethodEvent &other);
|
||||
|
||||
private:
|
||||
QString preedit;
|
||||
QList<Attribute> attrs;
|
||||
QString commit;
|
||||
int replace_from;
|
||||
int replace_length;
|
||||
QString m_preedit;
|
||||
QList<Attribute> m_attributes;
|
||||
QString m_commit;
|
||||
int m_replacementStart;
|
||||
int m_replacementLength;
|
||||
};
|
||||
Q_DECLARE_TYPEINFO(QInputMethodEvent::Attribute, Q_MOVABLE_TYPE);
|
||||
|
||||
@ -725,29 +725,29 @@ public:
|
||||
inline Qt::KeyboardModifiers keyboardModifiers() const { return modifiers(); }
|
||||
#endif // QT_DEPRECATED_SINCE(6, 0)
|
||||
|
||||
QPointF position() const { return p; }
|
||||
inline Qt::MouseButtons buttons() const { return mouseState; }
|
||||
inline Qt::KeyboardModifiers modifiers() const { return modState; }
|
||||
QPointF position() const { return m_pos; }
|
||||
inline Qt::MouseButtons buttons() const { return m_mouseState; }
|
||||
inline Qt::KeyboardModifiers modifiers() const { return m_modState; }
|
||||
|
||||
inline Qt::DropActions possibleActions() const { return act; }
|
||||
inline Qt::DropAction proposedAction() const { return default_action; }
|
||||
inline void acceptProposedAction() { drop_action = default_action; accept(); }
|
||||
inline Qt::DropActions possibleActions() const { return m_actions; }
|
||||
inline Qt::DropAction proposedAction() const { return m_defaultAction; }
|
||||
inline void acceptProposedAction() { m_dropAction = m_defaultAction; accept(); }
|
||||
|
||||
inline Qt::DropAction dropAction() const { return drop_action; }
|
||||
inline Qt::DropAction dropAction() const { return m_dropAction; }
|
||||
void setDropAction(Qt::DropAction action);
|
||||
|
||||
QObject* source() const;
|
||||
inline const QMimeData *mimeData() const { return mdata; }
|
||||
inline const QMimeData *mimeData() const { return m_data; }
|
||||
|
||||
protected:
|
||||
friend class QApplication;
|
||||
QPointF p;
|
||||
Qt::MouseButtons mouseState;
|
||||
Qt::KeyboardModifiers modState;
|
||||
Qt::DropActions act;
|
||||
Qt::DropAction drop_action;
|
||||
Qt::DropAction default_action;
|
||||
const QMimeData *mdata;
|
||||
QPointF m_pos;
|
||||
Qt::MouseButtons m_mouseState;
|
||||
Qt::KeyboardModifiers m_modState;
|
||||
Qt::DropActions m_actions;
|
||||
Qt::DropAction m_dropAction;
|
||||
Qt::DropAction m_defaultAction;
|
||||
const QMimeData *m_data;
|
||||
};
|
||||
|
||||
|
||||
@ -758,16 +758,16 @@ public:
|
||||
Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Type type = DragMove);
|
||||
~QDragMoveEvent();
|
||||
|
||||
inline QRect answerRect() const { return rect; }
|
||||
inline QRect answerRect() const { return m_rect; }
|
||||
|
||||
inline void accept() { QDropEvent::accept(); }
|
||||
inline void ignore() { QDropEvent::ignore(); }
|
||||
|
||||
inline void accept(const QRect & r) { accept(); rect = r; }
|
||||
inline void ignore(const QRect & r) { ignore(); rect = r; }
|
||||
inline void accept(const QRect & r) { accept(); m_rect = r; }
|
||||
inline void ignore(const QRect & r) { ignore(); m_rect = r; }
|
||||
|
||||
protected:
|
||||
QRect rect;
|
||||
QRect m_rect;
|
||||
};
|
||||
|
||||
|
||||
@ -795,17 +795,17 @@ public:
|
||||
QHelpEvent(Type type, const QPoint &pos, const QPoint &globalPos);
|
||||
~QHelpEvent();
|
||||
|
||||
inline int x() const { return p.x(); }
|
||||
inline int y() const { return p.y(); }
|
||||
inline int globalX() const { return gp.x(); }
|
||||
inline int globalY() const { return gp.y(); }
|
||||
inline int x() const { return m_pos.x(); }
|
||||
inline int y() const { return m_pos.y(); }
|
||||
inline int globalX() const { return m_globalPos.x(); }
|
||||
inline int globalY() const { return m_globalPos.y(); }
|
||||
|
||||
inline const QPoint& pos() const { return p; }
|
||||
inline const QPoint& globalPos() const { return gp; }
|
||||
inline const QPoint& pos() const { return m_pos; }
|
||||
inline const QPoint& globalPos() const { return m_globalPos; }
|
||||
|
||||
private:
|
||||
QPoint p;
|
||||
QPoint gp;
|
||||
QPoint m_pos;
|
||||
QPoint m_globalPos;
|
||||
};
|
||||
|
||||
#ifndef QT_NO_STATUSTIP
|
||||
@ -815,9 +815,9 @@ public:
|
||||
explicit QStatusTipEvent(const QString &tip);
|
||||
~QStatusTipEvent();
|
||||
|
||||
inline QString tip() const { return s; }
|
||||
inline QString tip() const { return m_tip; }
|
||||
private:
|
||||
QString s;
|
||||
QString m_tip;
|
||||
};
|
||||
#endif
|
||||
|
||||
@ -828,22 +828,22 @@ public:
|
||||
explicit QWhatsThisClickedEvent(const QString &href);
|
||||
~QWhatsThisClickedEvent();
|
||||
|
||||
inline QString href() const { return s; }
|
||||
inline QString href() const { return m_href; }
|
||||
private:
|
||||
QString s;
|
||||
QString m_href;
|
||||
};
|
||||
#endif
|
||||
|
||||
#if QT_CONFIG(action)
|
||||
class Q_GUI_EXPORT QActionEvent : public QEvent
|
||||
{
|
||||
QAction *act, *bef;
|
||||
QAction *m_action, *m_before;
|
||||
public:
|
||||
QActionEvent(int type, QAction *action, QAction *before = nullptr);
|
||||
~QActionEvent();
|
||||
|
||||
inline QAction *action() const { return act; }
|
||||
inline QAction *before() const { return bef; }
|
||||
inline QAction *action() const { return m_action; }
|
||||
inline QAction *before() const { return m_before; }
|
||||
};
|
||||
#endif // QT_CONFIG(action)
|
||||
|
||||
@ -854,11 +854,11 @@ public:
|
||||
explicit QFileOpenEvent(const QUrl &url);
|
||||
~QFileOpenEvent();
|
||||
|
||||
inline QString file() const { return f; }
|
||||
inline QString file() const { return m_file; }
|
||||
QUrl url() const { return m_url; }
|
||||
bool openFile(QFile &file, QIODevice::OpenMode flags) const;
|
||||
private:
|
||||
QString f;
|
||||
QString m_file;
|
||||
QUrl m_url;
|
||||
};
|
||||
|
||||
@ -869,9 +869,9 @@ public:
|
||||
explicit QToolBarChangeEvent(bool t);
|
||||
~QToolBarChangeEvent();
|
||||
|
||||
inline bool toggle() const { return tog; }
|
||||
inline bool toggle() const { return m_toggle; }
|
||||
private:
|
||||
uint tog : 1;
|
||||
uint m_toggle : 1;
|
||||
};
|
||||
#endif
|
||||
|
||||
@ -882,27 +882,27 @@ public:
|
||||
QShortcutEvent(const QKeySequence &key, int id, bool ambiguous = false);
|
||||
~QShortcutEvent();
|
||||
|
||||
inline const QKeySequence &key() const { return sequence; }
|
||||
inline int shortcutId() const { return sid; }
|
||||
inline bool isAmbiguous() const { return ambig; }
|
||||
inline const QKeySequence &key() const { return m_sequence; }
|
||||
inline int shortcutId() const { return m_shortcutId; }
|
||||
inline bool isAmbiguous() const { return m_ambiguous; }
|
||||
protected:
|
||||
QKeySequence sequence;
|
||||
bool ambig;
|
||||
int sid;
|
||||
QKeySequence m_sequence;
|
||||
bool m_ambiguous;
|
||||
int m_shortcutId;
|
||||
};
|
||||
#endif
|
||||
|
||||
class Q_GUI_EXPORT QWindowStateChangeEvent: public QEvent
|
||||
{
|
||||
public:
|
||||
explicit QWindowStateChangeEvent(Qt::WindowStates aOldState, bool isOverride = false);
|
||||
explicit QWindowStateChangeEvent(Qt::WindowStates oldState, bool isOverride = false);
|
||||
~QWindowStateChangeEvent();
|
||||
|
||||
inline Qt::WindowStates oldState() const { return ostate; }
|
||||
inline Qt::WindowStates oldState() const { return m_oldStates; }
|
||||
bool isOverride() const;
|
||||
|
||||
private:
|
||||
Qt::WindowStates ostate;
|
||||
Qt::WindowStates m_oldStates;
|
||||
bool m_override;
|
||||
};
|
||||
|
||||
|
@ -835,9 +835,11 @@ bool QApplication::compressEvent(QEvent *event, QObject *receiver, QPostEventLis
|
||||
|| cur.event->type() == QEvent::UpdateRequest) {
|
||||
;
|
||||
} else if (cur.event->type() == QEvent::Resize) {
|
||||
((QResizeEvent *)(cur.event))->s = ((QResizeEvent *)event)->s;
|
||||
static_cast<QResizeEvent *>(cur.event)->m_size =
|
||||
static_cast<const QResizeEvent *>(event)->size();
|
||||
} else if (cur.event->type() == QEvent::Move) {
|
||||
((QMoveEvent *)(cur.event))->p = ((QMoveEvent *)event)->p;
|
||||
static_cast<QMoveEvent *>(cur.event)->m_pos =
|
||||
static_cast<const QMoveEvent *>(event)->pos();
|
||||
} else if (cur.event->type() == QEvent::LanguageChange) {
|
||||
;
|
||||
} else {
|
||||
@ -3207,7 +3209,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
|
||||
}
|
||||
if (w->isWindow())
|
||||
break;
|
||||
dragEvent->p = w->mapToParent(dragEvent->p);
|
||||
dragEvent->m_pos = w->mapToParent(dragEvent->m_pos);
|
||||
w = w->parentWidget();
|
||||
}
|
||||
}
|
||||
@ -3232,7 +3234,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
|
||||
QDropEvent *dragEvent = static_cast<QDropEvent *>(e);
|
||||
QWidget *origReciver = static_cast<QWidget *>(receiver);
|
||||
while (origReciver && w != origReciver) {
|
||||
dragEvent->p = origReciver->mapToParent(dragEvent->p);
|
||||
dragEvent->m_pos = origReciver->mapToParent(dragEvent->m_pos);
|
||||
origReciver = origReciver->parentWidget();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user