代码拉取完成,页面将自动刷新
#ifndef QQTEVENT_H
#define QQTEVENT_H
#include <QEvent>
#include <QMouseEvent>
#include "qqt-qt.h"
#include <qqt-local.h>
/**
* @brief The QQtMouseEvent class
* 在QQtDoubleClickeHelper里面用于保存鼠标事件对象。
*/
class QQTSHARED_EXPORT QQtMouseEvent : public QMouseEvent
{
public:
QQtMouseEvent() :
QMouseEvent ( MouseButtonPress, QPointF(), QPointF(), QPointF(),
Qt::LeftButton, Qt::LeftButton, Qt::NoModifier ) {
}
virtual ~QQtMouseEvent() {}
public:
//设置
QQtMouseEvent& operator= ( const QMouseEvent& other ) {
QQtMouseEvent& ref = *this;
ref.setType ( other.type() );
ref.localPos() = other.localPos();
ref.windowPos() = other.windowPos();
ref.screenPos() = other.screenPos();
#ifndef QT_NO_INTEGER_EVENT_COORDINATES
ref.pos() = other.pos();
ref.globalPos() = other.globalPos();
#endif
ref.button() = other.button();
ref.buttons() = other.buttons();
ref.setModifiers ( other.modifiers() );
//source 无解
return ref;
}
//读取
#ifndef QT_NO_INTEGER_EVENT_COORDINATES
inline QPoint& pos() { return _l; }
inline QPoint& globalPos() { return _s; }
inline int& x() { return _l.rx(); }
inline int& y() { return _l.ry(); }
inline int& globalX() { return _s.rx(); }
inline int& globalY() { return _s.ry(); }
#endif
QPointF& localPos() { return l; }
QPointF& windowPos() { return w; }
QPointF& screenPos() { return s; }
inline Qt::MouseButton& button() { return b; }
inline Qt::MouseButtons& buttons() { return mouseState; }
//inline Qt::MouseEventSource& source() { return sou}
//inline Qt::MouseEventFlags& flags();
inline void setType ( const Type& _t ) { t = _t; }
protected:
QPoint _l, _w, _s;
};
#endif // QQTEVENT_H
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。