Qt 4.8
qmenu.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the QtGui module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 #ifndef QMENU_H
43 #define QMENU_H
44 
45 #include <QtGui/qwidget.h>
46 #include <QtCore/qstring.h>
47 #include <QtGui/qicon.h>
48 #include <QtGui/qaction.h>
49 
50 #ifdef QT3_SUPPORT
51 #include <QtGui/qpixmap.h>
52 #endif
53 
54 #ifdef Q_WS_WINCE
55 #include <windef.h> // for HMENU
56 #endif
57 
59 
61 
62 QT_MODULE(Gui)
63 
64 #ifndef QT_NO_MENU
65 
66 class QMenuPrivate;
68 #ifdef QT3_SUPPORT
69 class QMenuItem;
70 #endif
71 
72 class Q_GUI_EXPORT QMenu : public QWidget
73 {
74 private:
75  Q_OBJECT
77 
78  bool tearOffEnabled;
79  QString title;
80  QIcon icon;
81  bool separatorsCollapsible;
82 
83 public:
84  explicit QMenu(QWidget *parent = 0);
85  explicit QMenu(const QString &title, QWidget *parent = 0);
86  ~QMenu();
87 
88 #ifdef Q_NO_USING_KEYWORD
89  inline void addAction(QAction *action) { QWidget::addAction(action); }
90 #else
91  using QWidget::addAction;
92 #endif
93  QAction *addAction(const QString &text);
94  QAction *addAction(const QIcon &icon, const QString &text);
95  QAction *addAction(const QString &text, const QObject *receiver, const char* member, const QKeySequence &shortcut = 0);
96  QAction *addAction(const QIcon &icon, const QString &text, const QObject *receiver, const char* member, const QKeySequence &shortcut = 0);
97 
98  QAction *addMenu(QMenu *menu);
99  QMenu *addMenu(const QString &title);
100  QMenu *addMenu(const QIcon &icon, const QString &title);
101 
102  QAction *addSeparator();
103 
104  QAction *insertMenu(QAction *before, QMenu *menu);
105  QAction *insertSeparator(QAction *before);
106 
107  bool isEmpty() const;
108  void clear();
109 
110  void setTearOffEnabled(bool);
111  bool isTearOffEnabled() const;
112 
113  bool isTearOffMenuVisible() const;
114  void hideTearOffMenu();
115 
116  void setDefaultAction(QAction *);
117  QAction *defaultAction() const;
118 
119  void setActiveAction(QAction *act);
120  QAction *activeAction() const;
121 
122  void popup(const QPoint &pos, QAction *at=0);
123  QAction *exec();
124  QAction *exec(const QPoint &pos, QAction *at=0);
125 
126  // ### Qt 5: merge
127  static QAction *exec(QList<QAction*> actions, const QPoint &pos, QAction *at=0);
128  static QAction *exec(QList<QAction*> actions, const QPoint &pos, QAction *at, QWidget *parent);
129 
130  QSize sizeHint() const;
131 
132  QRect actionGeometry(QAction *) const;
133  QAction *actionAt(const QPoint &) const;
134 
135  QAction *menuAction() const;
136 
137  QString title() const;
138  void setTitle(const QString &title);
139 
140  QIcon icon() const;
141  void setIcon(const QIcon &icon);
142 
143  void setNoReplayFor(QWidget *widget);
144 #ifdef Q_WS_MAC
145  OSMenuRef macMenu(OSMenuRef merge=0);
146 #endif
147 
148 #ifdef Q_WS_WINCE
149  HMENU wceMenu();
150 #endif
151 
152  bool separatorsCollapsible() const;
153  void setSeparatorsCollapsible(bool collapse);
154 
155 Q_SIGNALS:
156  void aboutToShow();
157  void aboutToHide();
158  void triggered(QAction *action);
159  void hovered(QAction *action);
160 
161 protected:
162  int columnCount() const;
163 
164  void changeEvent(QEvent *);
165  void keyPressEvent(QKeyEvent *);
168  void mouseMoveEvent(QMouseEvent *);
169 #ifndef QT_NO_WHEELEVENT
170  void wheelEvent(QWheelEvent *);
171 #endif
172  void enterEvent(QEvent *);
173  void leaveEvent(QEvent *);
174  void hideEvent(QHideEvent *);
175  void paintEvent(QPaintEvent *);
176  void actionEvent(QActionEvent *);
177  void timerEvent(QTimerEvent *);
178  bool event(QEvent *);
179  bool focusNextPrevChild(bool next);
180  void initStyleOption(QStyleOptionMenuItem *option, const QAction *action) const;
181 
182 #ifdef Q_WS_WINCE
183  QAction* wceCommands(uint command);
184 #endif
185 
186 private Q_SLOTS:
187  void internalSetSloppyAction();
188  void internalDelayedPopup();
189 
190 private:
191  Q_PRIVATE_SLOT(d_func(), void _q_actionTriggered())
192  Q_PRIVATE_SLOT(d_func(), void _q_actionHovered())
193  Q_PRIVATE_SLOT(d_func(), void _q_overrideMenuActionDestroyed())
194 
195 public:
196 #ifdef QT3_SUPPORT
197  //menudata
198  inline QT3_SUPPORT uint count() const { return actions().count(); }
199  inline QT3_SUPPORT int insertItem(const QString &text, const QObject *receiver, const char* member,
200  const QKeySequence& shortcut = 0, int id = -1, int index = -1) {
201  return insertAny(0, &text, receiver, member, &shortcut, 0, id, index);
202  }
203  inline QT3_SUPPORT int insertItem(const QIcon& icon, const QString &text,
204  const QObject *receiver, const char* member,
205  const QKeySequence& shortcut = 0, int id = -1, int index = -1) {
206  return insertAny(&icon, &text, receiver, member, &shortcut, 0, id, index);
207  }
208  inline QT3_SUPPORT int insertItem(const QPixmap &pixmap, const QObject *receiver, const char* member,
209  const QKeySequence& shortcut = 0, int id = -1, int index = -1) {
210  QIcon icon(pixmap);
211  return insertAny(&icon, 0, receiver, member, &shortcut, 0, id, index);
212  }
213  inline QT3_SUPPORT int insertItem(const QString &text, int id=-1, int index=-1) {
214  return insertAny(0, &text, 0, 0, 0, 0, id, index);
215  }
216  inline QT3_SUPPORT int insertItem(const QIcon& icon, const QString &text, int id=-1, int index=-1) {
217  return insertAny(&icon, &text, 0, 0, 0, 0, id, index);
218  }
219  inline QT3_SUPPORT int insertItem(const QString &text, QMenu *popup, int id=-1, int index=-1) {
220  return insertAny(0, &text, 0, 0, 0, popup, id, index);
221  }
222  inline QT3_SUPPORT int insertItem(const QIcon& icon, const QString &text, QMenu *popup, int id=-1, int index=-1) {
223  return insertAny(&icon, &text, 0, 0, 0, popup, id, index);
224  }
225  inline QT3_SUPPORT int insertItem(const QPixmap &pixmap, int id=-1, int index=-1) {
226  QIcon icon(pixmap);
227  return insertAny(&icon, 0, 0, 0, 0, 0, id, index);
228  }
229  inline QT3_SUPPORT int insertItem(const QPixmap &pixmap, QMenu *popup, int id=-1, int index=-1) {
230  QIcon icon(pixmap);
231  return insertAny(&icon, 0, 0, 0, 0, popup, id, index);
232  }
233  QT3_SUPPORT int insertItem(QMenuItem *item, int id=-1, int index=-1);
234  QT3_SUPPORT int insertSeparator(int index=-1);
235  inline QT3_SUPPORT void removeItem(int id) {
236  if(QAction *act = findActionForId(id))
237  removeAction(act); }
238  inline QT3_SUPPORT void removeItemAt(int index) {
239  if(QAction *act = actions().value(index))
240  removeAction(act); }
241 #ifndef QT_NO_SHORTCUT
242  inline QT3_SUPPORT QKeySequence accel(int id) const {
243  if(QAction *act = findActionForId(id))
244  return act->shortcut();
245  return QKeySequence(); }
246  inline QT3_SUPPORT void setAccel(const QKeySequence& key, int id) {
247  if(QAction *act = findActionForId(id))
248  act->setShortcut(key);
249  }
250 #endif
251  inline QT3_SUPPORT QIcon iconSet(int id) const {
252  if(QAction *act = findActionForId(id))
253  return act->icon();
254  return QIcon(); }
255  inline QT3_SUPPORT QString text(int id) const {
256  if(QAction *act = findActionForId(id))
257  return act->text();
258  return QString(); }
259  inline QT3_SUPPORT QPixmap pixmap(int id) const {
260  if(QAction *act = findActionForId(id))
261  return act->icon().pixmap(QSize(22, 22));
262  return QPixmap(); }
263  inline QT3_SUPPORT void setWhatsThis(int id, const QString &w) {
264  if(QAction *act = findActionForId(id))
265  act->setWhatsThis(w); }
266  inline QT3_SUPPORT QString whatsThis(int id) const {
267  if(QAction *act = findActionForId(id))
268  return act->whatsThis();
269  return QString(); }
270 
271  inline QT3_SUPPORT void changeItem(int id, const QString &text) {
272  if(QAction *act = findActionForId(id))
273  act->setText(text); }
274  inline QT3_SUPPORT void changeItem(int id, const QPixmap &pixmap) {
275  if(QAction *act = findActionForId(id))
276  act->setIcon(QIcon(pixmap)); }
277  inline QT3_SUPPORT void changeItem(int id, const QIcon &icon, const QString &text) {
278  if(QAction *act = findActionForId(id)) {
279  act->setIcon(icon);
280  act->setText(text);
281  }
282  }
283  inline QT3_SUPPORT void setActiveItem(int id) {
284  setActiveAction(findActionForId(id));
285  }
286  inline QT3_SUPPORT bool isItemActive(int id) const {
287  return findActionForId(id) == activeAction();
288  }
289  inline QT3_SUPPORT bool isItemEnabled(int id) const {
290  if(QAction *act = findActionForId(id))
291  return act->isEnabled();
292  return false; }
293  inline QT3_SUPPORT void setItemEnabled(int id, bool enable) {
294  if(QAction *act = findActionForId(id))
295  act->setEnabled(enable);
296  }
297  inline QT3_SUPPORT bool isItemChecked(int id) const {
298  if(QAction *act = findActionForId(id))
299  return act->isChecked();
300  return false;
301  }
302  inline QT3_SUPPORT void setItemChecked(int id, bool check) {
303  if(QAction *act = findActionForId(id)) {
304  act->setCheckable(true);
305  act->setChecked(check);
306  }
307  }
308  inline QT3_SUPPORT bool isItemVisible(int id) const {
309  if(QAction *act = findActionForId(id))
310  return act->isVisible();
311  return false;
312  }
313  inline QT3_SUPPORT void setItemVisible(int id, bool visible) {
314  if(QAction *act = findActionForId(id))
315  act->setVisible(visible);
316  }
317  inline QT3_SUPPORT QRect itemGeometry(int index) {
318  if(QAction *act = actions().value(index))
319  return actionGeometry(act);
320  return QRect();
321  }
322  inline QT3_SUPPORT QFont itemFont(int id) const {
323  if(QAction *act = findActionForId(id))
324  return act->font();
325  return QFont();
326  }
327  inline QT3_SUPPORT void setItemFont(int id, const QFont &font) {
328  if(QAction *act = findActionForId(id))
329  act->setFont(font);
330  }
331  inline QT3_SUPPORT int indexOf(int id) const {
332  return actions().indexOf(findActionForId(id));
333  }
334  inline QT3_SUPPORT int idAt(int index) const {
335  return findIdForAction(actions().value(index));
336  }
337  QT3_SUPPORT void setId (int index, int id);
338  inline QT3_SUPPORT void activateItemAt(int index) {
339  if(QAction *ret = actions().value(index))
340  ret->activate(QAction::Trigger);
341  }
342  inline QT3_SUPPORT bool connectItem(int id, const QObject *receiver, const char* member) {
343  if(QAction *act = findActionForId(id)) {
344  QObject::connect(act, SIGNAL(activated(int)), receiver, member);
345  return true;
346  }
347  return false;
348  }
349  inline QT3_SUPPORT bool disconnectItem(int id,const QObject *receiver, const char* member) {
350  if(QAction *act = findActionForId(id)) {
351  QObject::disconnect(act, SIGNAL(triggered()), receiver, member);
352  return true;
353  }
354  return false;
355  }
356  inline QT3_SUPPORT QMenuItem *findItem(int id) const {
357  return reinterpret_cast<QMenuItem*>(findActionForId(id));
358  }
359 
360  inline QT3_SUPPORT void setCheckable(bool){}
361  inline QT3_SUPPORT bool isCheckable() const {return true;}
362 
363  QT3_SUPPORT QMenuItem *findPopup( QMenu *popup, int *index );
364 
365  QT3_SUPPORT bool setItemParameter(int id, int param);
366  QT3_SUPPORT int itemParameter(int id) const;
367 
368  //frame
369  QT3_SUPPORT int frameWidth() const;
370 
371  //popupmenu
372  inline QT3_SUPPORT void popup(const QPoint & pos, int indexAtPoint) { popup(pos, actions().value(indexAtPoint)); }
373  inline QT3_SUPPORT int insertTearOffHandle(int = 0, int = 0) {
374  setTearOffEnabled(true);
375  return -1;
376  }
377 
378 protected:
379  inline QT3_SUPPORT int itemAtPos(const QPoint &p, bool ignoreSeparator = true) {
380  QAction *ret = actionAt(p);
381  if(ignoreSeparator && ret && ret->isSeparator())
382  return -1;
383  return findIdForAction(ret);
384  }
385  inline QT3_SUPPORT int columns() const { return columnCount(); }
386  inline QT3_SUPPORT int itemHeight(int index) {
387  return actionGeometry(actions().value(index)).height();
388  }
389  inline QT3_SUPPORT int itemHeight(QMenuItem *mi) {
390  return actionGeometry(reinterpret_cast<QAction *>(mi)).height();
391  }
392 
393 Q_SIGNALS:
394  QT_MOC_COMPAT void activated(int itemId);
395  QT_MOC_COMPAT void highlighted(int itemId);
396 
397 private:
398  int insertAny(const QIcon *icon, const QString *text, const QObject *receiver, const char *member,
399  const QKeySequence *shorcut, const QMenu *popup, int id, int index);
400  QAction *findActionForId(int id) const;
401  int findIdForAction(QAction*) const;
402 #endif
403 
404 protected:
405  QMenu(QMenuPrivate &dd, QWidget* parent = 0);
406 
407 private:
409 
410  friend class QMenuBar;
413  friend class Q3PopupMenu;
414  friend class QComboBox;
415  friend class QAction;
417 
418 #ifdef Q_WS_MAC
419  friend void qt_mac_trayicon_activate_action(QMenu *, QAction *action);
420  friend bool qt_mac_watchingAboutToShow(QMenu *);
423  friend void qt_mac_emit_menuSignals(QMenu *, bool);
424  friend void qt_mac_menu_emit_hovered(QMenu *menu, QAction *action);
425 #endif
426 };
427 
428 #endif // QT_NO_MENU
429 
431 
433 
434 #endif // QMENU_H
bool isSeparator() const
Returns true if this action is a separator action; otherwise it returns false.
Definition: qaction.cpp:839
#define QT_MOC_COMPAT
Definition: qglobal.h:1128
bool isEnabled() const
Definition: qaction.cpp:1208
The QKeyEvent class describes a key event.
Definition: qevent.h:224
void setShortcut(const QKeySequence &shortcut)
Definition: qaction.cpp:450
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
QPointer< QWidget > widget
#define QT_MODULE(x)
Definition: qglobal.h:2783
QKeySequence shortcut
the action&#39;s primary shortcut key
Definition: qaction.h:83
#define QT_BEGIN_HEADER
Definition: qglobal.h:136
The QStyleOptionMenuItem class is used to describe the parameter necessary for drawing a menu item...
Definition: qstyleoption.h:435
void setFont(const QFont &font)
Definition: qaction.cpp:623
The QWheelEvent class contains parameters that describe a wheel event.
Definition: qevent.h:139
ActionEvent
This enum type is used when calling QAction::activate()
Definition: qaction.h:176
void setCheckable(bool)
Definition: qaction.cpp:1094
virtual void mouseReleaseEvent(QMouseEvent *)
This event handler, for event event, can be reimplemented in a subclass to receive mouse release even...
Definition: qwidget.cpp:9286
#define Q_GUI_EXPORT
Definition: qglobal.h:1450
#define at(className, varName)
QString text
the action&#39;s descriptive text
Definition: qaction.h:76
virtual void mousePressEvent(QMouseEvent *)
This event handler, for event event, can be reimplemented in a subclass to receive mouse press events...
Definition: qwidget.cpp:9261
virtual void leaveEvent(QEvent *)
This event handler can be reimplemented in a subclass to receive widget leave events which are passed...
Definition: qwidget.cpp:9491
virtual void timerEvent(QTimerEvent *)
This event handler can be reimplemented in a subclass to receive timer events for the object...
Definition: qobject.cpp:1294
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
static void clear(QVariant::Private *d)
Definition: qvariant.cpp:197
void setWhatsThis(const QString &what)
Definition: qaction.cpp:1003
#define Q_DISABLE_COPY(Class)
Disables the use of copy constructors and assignment operators for the given Class.
Definition: qglobal.h:2523
#define Q_PRIVATE_SLOT(d, signature)
Definition: qobjectdefs.h:73
int count(const T &t) const
Returns the number of occurrences of value in the list.
Definition: qlist.h:891
The QActionEvent class provides an event that is generated when a QAction is added, removed, or changed.
Definition: qevent.h:632
#define Q_SLOTS
Definition: qobjectdefs.h:71
int height() const
Returns the height of the rectangle.
Definition: qrect.h:306
The QString class provides a Unicode character string.
Definition: qstring.h:83
The QObject class is the base class of all Qt objects.
Definition: qobject.h:111
#define Q_SIGNALS
Definition: qobjectdefs.h:72
void addAction(QAction *action)
Appends the action action to this widget&#39;s list of actions.
Definition: qwidget.cpp:3317
void setEnabled(bool)
Definition: qaction.cpp:1192
virtual QSize sizeHint() const
bool isVisible() const
Definition: qaction.cpp:1246
void setWhatsThis(const QString &)
Definition: qwidget.cpp:11655
virtual void paintEvent(QPaintEvent *)
This event handler can be reimplemented in a subclass to receive paint events passed in event...
Definition: qwidget.cpp:9548
#define SIGNAL(a)
Definition: qobjectdefs.h:227
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
static bool isEmpty(const char *str)
friend class QPixmap
Definition: qwidget.h:748
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
Definition: qobject.cpp:2580
virtual void changeEvent(QEvent *)
This event handler can be reimplemented to handle state changes.
Definition: qwidget.cpp:9170
The QHideEvent class provides an event which is sent after a widget is hidden.
Definition: qevent.h:388
The QComboBox widget is a combined button and popup list.
Definition: qcombobox.h:62
QFont font
the action&#39;s font
Definition: qaction.h:81
QIcon icon
the action&#39;s icon
Definition: qaction.h:75
void setText(const QString &text)
Definition: qaction.cpp:860
unsigned int uint
Definition: qglobal.h:996
virtual void actionEvent(QActionEvent *)
This event handler is called with the given event whenever the widget&#39;s actions are changed...
Definition: qwidget.cpp:9600
bool qt_mac_watchingAboutToShow(QMenu *menu)
Definition: qmenu_mac.mm:119
signed long OSStatus
virtual void keyPressEvent(QKeyEvent *)
This event handler, for event event, can be reimplemented in a subclass to receive key press events f...
Definition: qwidget.cpp:9375
#define Q_OBJECT
Definition: qobjectdefs.h:157
struct OpaqueEventRef * EventRef
MenuRef OSMenuRef
The QMouseEvent class contains parameters that describe a mouse event.
Definition: qevent.h:85
static bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *member)
Disconnects signal in object sender from method in object receiver.
Definition: qobject.cpp:2895
void setVisible(bool)
Definition: qaction.cpp:1230
The QMenuBar class provides a horizontal menu bar.
Definition: qmenubar.h:62
The QKeySequence class encapsulates a key sequence as used by shortcuts.
Definition: qkeysequence.h:72
virtual void wheelEvent(QWheelEvent *)
This event handler, for event event, can be reimplemented in a subclass to receive wheel events for t...
Definition: qwidget.cpp:9326
int indexOf(const T &t, int from=0) const
Returns the index position of the first occurrence of value in the list, searching forward from index...
Definition: qlist.h:847
The QMenu class provides a menu widget for use in menu bars, context menus, and other popup menus...
Definition: qmenu.h:72
void setChecked(bool)
Definition: qaction.cpp:1138
The QTimerEvent class contains parameters that describe a timer event.
Definition: qcoreevent.h:341
virtual void hideEvent(QHideEvent *)
This event handler can be reimplemented in a subclass to receive widget hide events.
Definition: qwidget.cpp:9864
The QFont class specifies a font used for drawing text.
Definition: qfont.h:64
void removeAction(QAction *action)
Removes the action action from this widget&#39;s list of actions.
Definition: qwidget.cpp:3386
int key
The QPoint class defines a point in the plane using integer precision.
Definition: qpoint.h:53
virtual bool focusNextPrevChild(bool next)
Finds a new widget to give the keyboard focus to, as appropriate for Tab and Shift+Tab, and returns true if it can find a new widget, or false if it can&#39;t.
Definition: qwidget.cpp:6836
QString whatsThis
the action&#39;s "What&#39;s This?" help text
Definition: qaction.h:80
QList< QAction * > actions() const
Returns the (possibly empty) list of this widget&#39;s actions.
Definition: qwidget.cpp:3407
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
void setIcon(const QIcon &icon)
Definition: qaction.cpp:772
bool isChecked() const
Definition: qaction.cpp:1151
quint16 index
The QPixmap class is an off-screen image representation that can be used as a paint device...
Definition: qpixmap.h:71
QPixmap pixmap(const QSize &size, Mode mode=Normal, State state=Off) const
Returns a pixmap with the requested size, mode, and state, generating one if necessary.
Definition: qicon.cpp:693
OSStatus qt_mac_menu_event(EventHandlerCallRef er, EventRef event, void *)
Definition: qmenu_mac.mm:397
The QSize class defines the size of a two-dimensional object using integer point precision.
Definition: qsize.h:53
struct OpaqueEventHandlerCallRef * EventHandlerCallRef
#define Q_DECLARE_PRIVATE(Class)
Definition: qglobal.h:2467
bool qt_mac_activate_action(MenuRef menu, uint command, QAction::ActionEvent action_e, bool by_accel)
Definition: qmenu_mac.mm:209
bool event(QEvent *)
This is the main event handler; it handles event event.
Definition: qwidget.cpp:8636
virtual void mouseMoveEvent(QMouseEvent *)
This event handler, for event event, can be reimplemented in a subclass to receive mouse move events ...
Definition: qwidget.cpp:9239
#define class
The QPaintEvent class contains event parameters for paint events.
Definition: qevent.h:298
The QEvent class is the base class of all event classes.
Definition: qcoreevent.h:56
QString whatsThis() const
#define QT_END_HEADER
Definition: qglobal.h:137
The QAction class provides an abstract user interface action that can be inserted into widgets...
Definition: qaction.h:64
virtual void enterEvent(QEvent *)
This event handler can be reimplemented in a subclass to receive widget enter events which are passed...
Definition: qwidget.cpp:9475
#define text
Definition: qobjectdefs.h:80
The QList class is a template class that provides lists.
Definition: qdatastream.h:62
The QIcon class provides scalable icons in different modes and states.
Definition: qicon.h:60