diff options
author | Aurélien Gâteau <agateau@kde.org> | 2010-11-10 22:37:56 (GMT) |
---|---|---|
committer | Gabriel de Dietrich <gabriel.dietrich-de@nokia.com> | 2011-06-20 10:27:59 (GMT) |
commit | 9aeadca09ab4e27ebf299873f90490d585b4fb7f (patch) | |
tree | 86245350cc017124ba51059c59c5adaec9dde8f9 /src/gui/widgets/qmenubar_p.h | |
parent | 68d633cc840c5526a0ad77985404f53ada6ba91a (diff) | |
download | Qt-9aeadca09ab4e27ebf299873f90490d585b4fb7f.zip Qt-9aeadca09ab4e27ebf299873f90490d585b4fb7f.tar.gz Qt-9aeadca09ab4e27ebf299873f90490d585b4fb7f.tar.bz2 |
Introduce QAbstractPlatformMenuBar
Merge-request: 1254
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
Diffstat (limited to 'src/gui/widgets/qmenubar_p.h')
-rw-r--r-- | src/gui/widgets/qmenubar_p.h | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/src/gui/widgets/qmenubar_p.h b/src/gui/widgets/qmenubar_p.h index 341b1f7..9a1f758 100644 --- a/src/gui/widgets/qmenubar_p.h +++ b/src/gui/widgets/qmenubar_p.h @@ -47,7 +47,7 @@ // ------------- // // This file is not part of the Qt API. It exists purely as an -// implementation detail. This header file may change from version to +// platformMenuBarementation detail. This header file may change from version to // version without notice, or even be removed. // // We mean it. @@ -61,6 +61,10 @@ #include "qguifunctions_wince.h" #endif +#ifdef Q_WS_X11 +#include "qabstractplatformmenubar_p.h" +#endif + #ifndef QT_NO_MENUBAR #ifdef Q_WS_S60 class CCoeControl; @@ -71,21 +75,27 @@ class CEikMenuBar; QT_BEGIN_NAMESPACE #ifndef QT_NO_MENUBAR +class QToolBar; class QMenuBarExtension; class QMenuBarPrivate : public QWidgetPrivate { Q_DECLARE_PUBLIC(QMenuBar) public: QMenuBarPrivate() : itemsDirty(0), currentAction(0), mouseDown(0), - closePopupMode(0), defaultPopDown(1), popupState(0), keyboardState(0), altPressed(0), - nativeMenuBar(-1), doChildEffects(false) + closePopupMode(0), defaultPopDown(1), popupState(0), keyboardState(0), altPressed(0) +#ifndef Q_WS_X11 + , nativeMenuBar(-1) +#endif + , doChildEffects(false) #ifdef QT3_SUPPORT , doAutoResize(false) #endif #ifdef Q_WS_MAC , mac_menubar(0) #endif - +#ifdef Q_WS_X11 + , platformMenuBar(0) +#endif #ifdef Q_WS_WINCE , wce_menubar(0), wceClassicMenu(false) #endif @@ -96,6 +106,9 @@ public: { } ~QMenuBarPrivate() { +#ifdef Q_WS_X11 + delete platformMenuBar; +#endif #ifdef Q_WS_MAC delete mac_menubar; #endif @@ -136,8 +149,9 @@ public: uint keyboardState : 1, altPressed : 1; QPointer<QWidget> keyboardFocusWidget; - +#ifndef Q_WS_X11 int nativeMenuBar : 3; // Only has values -1, 0, and 1 +#endif //firing of events void activateAction(QAction *, QAction::ActionEvent); @@ -173,6 +187,9 @@ public: #ifdef QT3_SUPPORT bool doAutoResize; #endif +#ifdef Q_WS_X11 + QAbstractPlatformMenuBar *platformMenuBar; +#endif #ifdef Q_WS_MAC //mac menubar binding struct QMacMenuBarPrivate { @@ -273,6 +290,12 @@ public: #ifdef QT_SOFTKEYS_ENABLED QAction *menuBarAction; #endif + +#ifdef Q_WS_X11 + void updateCornerWidgetToolBar(); + QToolBar *cornerWidgetToolBar; + QWidget *cornerWidgetContainer; +#endif }; #endif |