56 #include "QtGui/qmenubar.h" 57 #include "QtGui/qstyleoption.h" 58 #include "QtCore/qdatetime.h" 59 #include "QtCore/qmap.h" 60 #include "QtCore/qhash.h" 61 #include "QtCore/qbasictimer.h" 62 #include "private/qwidget_p.h" 66 #define QT_SYMBIAN_FIRST_MENU_ITEM 32000 67 #define QT_SYMBIAN_LAST_MENU_ITEM 41999 // 10000 items ought to be enough for anybody... 74 void qt_symbian_next_menu_from_action(
QWidget* actionContainer);
75 void qt_symbian_show_toplevel(CEikMenuPane* menuPane);
76 void qt_symbian_show_submenu(CEikMenuPane* menuPane,
int id);
92 #ifndef QT_MAC_USE_COCOA 101 #ifndef QT_MAC_USE_COCOA 114 #ifndef QT_MAC_USE_COCOA 135 struct QSymbianMenuAction {
138 CEikMenuPane* menuPane;
140 QSymbianMenuAction() :
command(0) {}
148 QMenuPrivate() : itemsDirty(0), maxIconWidth(0), tabWidth(0), ncols(0),
149 collapsibleSeparators(true), activationRecursionGuard(false), hasHadMouse(0), aboutToHide(0), motions(0),
151 #ifdef QT_KEYPAD_NAVIGATION
155 scroll(0), eventLoop(0), tearoff(0), tornoff(0), tearoffHighlighted(0),
156 hasCheckableItems(0), sloppyDelayTimer(0), sloppyAction(0), doChildEffects(false)
158 ,emitHighlighted(false)
176 #if defined(Q_WS_WINCE) && !defined(QT_NO_MENUBAR) 187 int scrollerHeight()
const;
196 void updateActionRects()
const;
197 void updateActionRects(
const QRect &screen)
const;
199 QRect popupGeometry(
int screen = -1)
const;
202 QSize adjustMenuSizeForScreen(
const QRect & screen);
203 int getLastVisibleAction()
const;
214 #ifdef QT_KEYPAD_NAVIGATION 221 SelectedFromElsewhere
223 QWidget *topCausedWidget()
const;
225 void setFirstActionActive();
226 void setCurrentAction(
QAction *,
int popup = -1,
SelectionReason reason = SelectedFromElsewhere,
bool activateFirst =
false);
227 void popupAction(
QAction *,
int,
bool);
228 void setSyncAction();
238 QMenuScroller() : scrollFlags(ScrollNone), scrollDirection(ScrollNone), scrollOffset(0) { }
264 void hideUpToMenuBar();
265 void hideMenu(
QMenu *
menu,
bool justRegister =
false);
269 inline int indexOf(
QAction *act)
const {
return q_func()->actions().indexOf(act); }
288 void setOverrideMenuAction(
QAction *);
289 void _q_overrideMenuActionDestroyed();
295 void _q_actionTriggered();
296 void _q_actionHovered();
298 bool hasMouseMoved(
const QPoint &globalPos);
300 void updateLayoutDirection();
321 for(
int i = 0; i < actionItems.
size(); i++) {
330 #ifndef QT_MAC_USE_COCOA 331 void setMacMenuEnabled(
bool enable =
true);
333 void syncSeparatorsCollapsible(
bool collapsible);
340 bool emitHighlighted;
343 #if defined(Q_WS_WINCE) && !defined(QT_NO_MENUBAR) 357 for(
int i = 0; i < actionItems.
size(); i++) {
368 #if defined(Q_WS_S60) 369 struct QSymbianMenuPrivate {
371 QSymbianMenuPrivate();
372 ~QSymbianMenuPrivate();
373 void addAction(
QAction *, QSymbianMenuAction* =0);
374 void addAction(QSymbianMenuAction *, QSymbianMenuAction* =0);
375 void syncAction(QSymbianMenuAction *);
376 inline void syncAction(
QAction *
a) { syncAction(findAction(a)); }
377 void removeAction(QSymbianMenuAction *);
378 void rebuild(
bool reCreate =
false);
379 inline void removeAction(
QAction *a) { removeAction(findAction(a)); }
380 inline QSymbianMenuAction *findAction(
QAction *a) {
381 for(
int i = 0; i < actionItems.
size(); i++) {
382 QSymbianMenuAction *act = actionItems[i];
#define QT_END_NAMESPACE
This macro expands to.
QPointer< QWidget > widget
ActionEvent
This enum type is used when calling QAction::activate()
long ASN1_INTEGER_get ASN1_INTEGER * a
The QString class provides a Unicode character string.
The QHash class is a template class that provides a hash-table-based dictionary.
#define QT_BEGIN_NAMESPACE
This macro expands to.
The QEventLoop class provides a means of entering and leaving an event loop.
The QRegion class specifies a clip region for a painter.
The QMouseEvent class contains parameters that describe a mouse event.
#define Q_DECLARE_PUBLIC(Class)
static QTestResult::TestLocation location
The QPoint class defines a point in the plane using integer precision.
int size() const
Returns the number of items in the list.
if(void) toggleToolbarShown
The QRect class defines a rectangle in the plane using integer precision.
The QBasicTimer class provides timer events for objects.
The QSize class defines the size of a two-dimensional object using integer point precision.
The QAction class provides an abstract user interface action that can be inserted into widgets...
The QList class is a template class that provides lists.
Qt::LayoutDirection direction