QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
qwt3d_portability.h
1#ifndef QWT3D_PORTABILITY_H
2#define QWT3D_PORTABILITY_H
3
4#include <qnamespace.h>
5#include "qwt3d_global.h"
6
7#include <QMouseEvent>
8
9
10
11#define QWT3DLOCAL8BIT(qstring) (qstring.toLocal8Bit().constData())
12
13const Qt::TextFlag SingleLine = Qt::TextSingleLine;
14
21{
22public:
23 Qwt3DMouseState(Qt::MouseButtons mb = Qt::NoButton, Qt::KeyboardModifiers km = Qt::NoModifier) : mb_(mb), km_(km)
24 {
25 }
26
27 Qwt3DMouseState(Qt::MouseButton mb, Qt::KeyboardModifiers km = Qt::NoModifier) : mb_(mb), km_(km)
28 {
29 }
30
31 bool operator==(const Qwt3DMouseState& ms)
32 {
33 return mb_ == ms.mb_ && km_ == ms.km_;
34 }
35
36 bool operator!=(const Qwt3DMouseState& ms)
37 {
38 return !operator==(ms);
39 }
40
41private:
42 Qt::MouseButtons mb_;
43 Qt::KeyboardModifiers km_;
44};
45
52{
53public:
54 Qwt3DKeyboardState(int key = Qt::Key_unknown, Qt::KeyboardModifiers km = Qt::NoModifier) : key_(key), km_(km)
55 {
56 }
57
58 bool operator==(const Qwt3DKeyboardState& ms)
59 {
60 return key_ == ms.key_ && km_ == ms.km_;
61 }
62
63 bool operator!=(const Qwt3DKeyboardState& ms)
64 {
65 return !operator==(ms);
66 }
67
68private:
69 int key_;
70 Qt::KeyboardModifiers km_;
71};
72
73#endif // QWT3D_PORTABILITY_H
Creates a (key-button, modifier) pair
Definition qwt3d_portability.h:52
Creates a (mouse-button, modifier) pair
Definition qwt3d_portability.h:21