CFx SDK Documentation  2020SP3
FxUIEvent.h
Go to the documentation of this file.
1 #pragma once
2 #include "../FxCommonFramework.h"
3 
4 #include <QtCore/QRect>
5 #include <QtGui/QRegion>
6 
12 {
13 public:
14 
18  enum Type {
19  None = 0,
20  FocusIn = 8,
21  FocusOut = 9,
22  Paint = 12,
23  Resize = 14,
24  Show = 17,
25  Hide = 18
26  };
27 
33  explicit CFxUIEvent(Type type);
34  //CFxUIEvent(const CFxUIEvent &other);
35 
37  virtual ~CFxUIEvent();
38  //CFxUIEvent &operator=(const CFxUIEvent &other);
39 
45  inline Type type() const { return static_cast<Type>(t); }
46 
47 protected:
49 
50  //...
51 };
52 
57 {
58 public:
59 
62 
65 
66  //...
67 };
68 
73 {
74 public:
75 
78 
81 
82  //...
83 };
84 
89 {
90 public:
96  explicit CFxUIPaintEvent(const QRegion& paintRegion);
97 
103  explicit CFxUIPaintEvent(const QRect &paintRect);
104 
107 
113  inline const QRect &rect() const { return m_rect; }
114 
120  inline const QRegion &region() const { return m_region; }
121 
122 protected:
123  QRect m_rect;
124  QRegion m_region;
125  bool m_erased;
126 
127  //...
128 };
129 
134 {
135 public:
143  CFxUIResizeEvent(const QSize &size, const QSize &oldSize);
144 
147 
153  inline const QSize &size() const { return s; }
154 
160  inline const QSize &oldSize()const { return olds; }
161 protected:
162  QSize s, olds;
163 
164  //...
165 };
166 
171 {
172 public:
176  enum FocusReason {
185  NoFocusReason
186  };
187 
195  explicit CFxUIFocusEvent(Type type, FocusReason reason = OtherFocusReason);
196 
199 
205  inline bool gotFocus() const { return type() == FocusIn; }
206 
212  inline bool lostFocus() const { return type() == FocusOut; }
213 
220 
221 private:
222  FocusReason m_reason;
223 
224  //...
225 };
CFxUIShowEvent::~CFxUIShowEvent
~CFxUIShowEvent()
CFxUIResizeEvent::CFxUIResizeEvent
CFxUIResizeEvent(const QSize &size, const QSize &oldSize)
CFxUIResizeEvent
Definition: FxUIEvent.h:134
CFxUIEvent::CFxUIEvent
CFxUIEvent(Type type)
CFxUIFocusEvent::OtherFocusReason
@ OtherFocusReason
Another reason, usually application-specific.
Definition: FxUIEvent.h:184
CFxUIEvent::FocusIn
@ FocusIn
keyboard focus received
Definition: FxUIEvent.h:20
CFxUIFocusEvent::reason
FocusReason reason() const
CFxUIFocusEvent::PopupFocusReason
@ PopupFocusReason
The application opened/closed a pop-up that grabbed/released the keyboard focus.
Definition: FxUIEvent.h:181
CFxUIResizeEvent::size
const QSize & size() const
Definition: FxUIEvent.h:153
CFxUIFocusEvent::BacktabFocusReason
@ BacktabFocusReason
Back Tab key is pressed.
Definition: FxUIEvent.h:179
type
GLuint GLsizei GLsizei GLint GLenum * type
Definition: gles2_ext.h:274
CFxUIPaintEvent::rect
const QRect & rect() const
Definition: FxUIEvent.h:113
CFxUIPaintEvent::region
const QRegion & region() const
Definition: FxUIEvent.h:120
CFxUIEvent::~CFxUIEvent
virtual ~CFxUIEvent()
CFxUIFocusEvent::lostFocus
bool lostFocus() const
Definition: FxUIEvent.h:212
ushort
unsigned short ushort
Definition: FxQtCore.h:71
size
GLsizeiptr size
Definition: gles2_ext.h:182
CFxUIEvent::t
ushort t
Definition: FxUIEvent.h:48
CFxUIFocusEvent::FocusReason
FocusReason
Definition: FxUIEvent.h:176
CFxUIPaintEvent::CFxUIPaintEvent
CFxUIPaintEvent(const QRect &paintRect)
CFxUIEvent
Definition: FxUIEvent.h:12
CFxUIFocusEvent::TabFocusReason
@ TabFocusReason
Tab key is pressed.
Definition: FxUIEvent.h:178
CFxUIPaintEvent
Definition: FxUIEvent.h:89
CFxUIFocusEvent::ShortcutFocusReason
@ ShortcutFocusReason
The user typed a label's buddy shortcut.
Definition: FxUIEvent.h:182
CFxUIPaintEvent::CFxUIPaintEvent
CFxUIPaintEvent(const QRegion &paintRegion)
CFxUIPaintEvent::~CFxUIPaintEvent
~CFxUIPaintEvent()
CFxUIShowEvent
Definition: FxUIEvent.h:57
CFxUIEvent::Type
Type
Definition: FxUIEvent.h:18
CFxUIFocusEvent::gotFocus
bool gotFocus() const
Definition: FxUIEvent.h:205
CFxUIFocusEvent
Definition: FxUIEvent.h:171
CFxUIEvent::FocusOut
@ FocusOut
keyboard focus lost
Definition: FxUIEvent.h:21
CFxUIEvent::type
Type type() const
Definition: FxUIEvent.h:45
CFxUIHideEvent::~CFxUIHideEvent
~CFxUIHideEvent()
CFxUIResizeEvent::~CFxUIResizeEvent
~CFxUIResizeEvent()
CFxUIFocusEvent::MenuBarFocusReason
@ MenuBarFocusReason
The menu bar took focus.
Definition: FxUIEvent.h:183
CFxUIFocusEvent::CFxUIFocusEvent
CFxUIFocusEvent(Type type, FocusReason reason=OtherFocusReason)
COMMONUI_API
#define COMMONUI_API
Definition: FxCommonFramework.h:4
CFxUIFocusEvent::~CFxUIFocusEvent
~CFxUIFocusEvent()
CFxUIPaintEvent::m_rect
QRect m_rect
Definition: FxUIEvent.h:123
CFxUIShowEvent::CFxUIShowEvent
CFxUIShowEvent()
CFxUIHideEvent::CFxUIHideEvent
CFxUIHideEvent()
CFxUIResizeEvent::s
QSize s
Definition: FxUIEvent.h:162
CFxUIPaintEvent::m_region
QRegion m_region
Definition: FxUIEvent.h:124
CFxUIResizeEvent::oldSize
const QSize & oldSize() const
Definition: FxUIEvent.h:160
CFxUIHideEvent
Definition: FxUIEvent.h:73
CFxUIPaintEvent::m_erased
bool m_erased
Definition: FxUIEvent.h:125
CFxUIFocusEvent::MouseFocusReason
@ MouseFocusReason
A mouse action occurred.
Definition: FxUIEvent.h:177
CFxUIFocusEvent::ActiveWindowFocusReason
@ ActiveWindowFocusReason
Either window active or inactive.
Definition: FxUIEvent.h:180