From 0241d63994c12fe0d0592b4a5eb9b6f29343280e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20G=C3=A2teau?= Date: Thu, 14 Apr 2011 10:00:36 +0200 Subject: Renamed QAbstractMenuBarImpl to QAbstractMenuBarInterface Merge-request: 916 Reviewed-by: Thierry Bastian (cherry picked from commit 3d188ffae259584c4351c5fa766a49da9b189112) --- src/gui/widgets/qabstractmenubarimpl_p.h | 116 -------------------------- src/gui/widgets/qabstractmenubarinterface_p.h | 116 ++++++++++++++++++++++++++ src/gui/widgets/qmenubar_p.h | 4 +- src/gui/widgets/qmenubarimpl.cpp | 2 +- src/gui/widgets/qmenubarimpl_p.h | 4 +- src/gui/widgets/widgets.pri | 2 +- 6 files changed, 122 insertions(+), 122 deletions(-) delete mode 100644 src/gui/widgets/qabstractmenubarimpl_p.h create mode 100644 src/gui/widgets/qabstractmenubarinterface_p.h (limited to 'src/gui') diff --git a/src/gui/widgets/qabstractmenubarimpl_p.h b/src/gui/widgets/qabstractmenubarimpl_p.h deleted file mode 100644 index 156ee6ab72..0000000000 --- a/src/gui/widgets/qabstractmenubarimpl_p.h +++ /dev/null @@ -1,116 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#ifndef QABSTRACTMENUBARIMPL_P_H -#define QABSTRACTMENUBARIMPL_P_H - -#include -#include -#include - -#ifndef QT_NO_MENUBAR - -QT_BEGIN_NAMESPACE - -class QAction; -class QActionEvent; -class QEvent; -class QMenuBar; -class QObject; -class QWidget; - -class QAbstractMenuBarImpl; - -struct QMenuBarImplFactoryInterface : public QFactoryInterface -{ - virtual QAbstractMenuBarImpl* createImpl() = 0; -}; - -#define QMenuBarImplFactoryInterface_iid "com.nokia.qt.QMenuBarImplFactoryInterface" -Q_DECLARE_INTERFACE(QMenuBarImplFactoryInterface, QMenuBarImplFactoryInterface_iid) - -/** - * The platform-specific implementation of a menubar - */ -class QAbstractMenuBarImpl -{ -public: - QAbstractMenuBarImpl() {} - virtual ~QAbstractMenuBarImpl() {} - - // QMenuBarPrivate::init() - virtual void init(QMenuBar *) = 0; - - virtual void setVisible(bool visible) = 0; - - virtual void actionEvent(QActionEvent *) = 0; - - // QMenuBar::handleReparent() - virtual void handleReparent(QWidget *oldParent, QWidget *newParent, QWidget *oldWindow, QWidget *newWindow) = 0; - - // QMenuBarPrivate::updateGeometries() - // QMenuBar::minimumSizeHint() - // QMenuBar::sizeHint() - // QMenuBar::heightForWidth() - virtual bool allowCornerWidgets() const = 0; - - // QMenuBar::_q_internalShortcutActivated() - virtual void popupAction(QAction*) = 0; - - // QMenuBar::setNativeMenuBar() - virtual void setNativeMenuBar(bool) = 0; - - virtual bool isNativeMenuBar() const = 0; - - /** - * Return true if the native menubar is capable of listening to the - * shortcut keys. If false is returned, QMenuBar will trigger actions on - * shortcut itself. - */ - virtual bool shortcutsHandledByNativeMenuBar() const = 0; - - virtual bool menuBarEventFilter(QObject *, QEvent *event) = 0; -}; - -QT_END_NAMESPACE - -#endif // QT_NO_MENUBAR - -#endif // QABSTRACTMENUBARIMPL_P_H diff --git a/src/gui/widgets/qabstractmenubarinterface_p.h b/src/gui/widgets/qabstractmenubarinterface_p.h new file mode 100644 index 0000000000..a014bc121e --- /dev/null +++ b/src/gui/widgets/qabstractmenubarinterface_p.h @@ -0,0 +1,116 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#ifndef QABSTRACTMENUBARINTERFACE_P_H +#define QABSTRACTMENUBARINTERFACE_P_H + +#include +#include +#include + +#ifndef QT_NO_MENUBAR + +QT_BEGIN_NAMESPACE + +class QAction; +class QActionEvent; +class QEvent; +class QMenuBar; +class QObject; +class QWidget; + +class QAbstractMenuBarInterface; + +struct QMenuBarImplFactoryInterface : public QFactoryInterface +{ + virtual QAbstractMenuBarInterface* createImpl() = 0; +}; + +#define QMenuBarImplFactoryInterface_iid "com.nokia.qt.QMenuBarImplFactoryInterface" +Q_DECLARE_INTERFACE(QMenuBarImplFactoryInterface, QMenuBarImplFactoryInterface_iid) + +/** + * The platform-specific implementation of a menubar + */ +class QAbstractMenuBarInterface +{ +public: + QAbstractMenuBarInterface() {} + virtual ~QAbstractMenuBarInterface() {} + + // QMenuBarPrivate::init() + virtual void init(QMenuBar *) = 0; + + virtual void setVisible(bool visible) = 0; + + virtual void actionEvent(QActionEvent *) = 0; + + // QMenuBar::handleReparent() + virtual void handleReparent(QWidget *oldParent, QWidget *newParent, QWidget *oldWindow, QWidget *newWindow) = 0; + + // QMenuBarPrivate::updateGeometries() + // QMenuBar::minimumSizeHint() + // QMenuBar::sizeHint() + // QMenuBar::heightForWidth() + virtual bool allowCornerWidgets() const = 0; + + // QMenuBar::_q_internalShortcutActivated() + virtual void popupAction(QAction*) = 0; + + // QMenuBar::setNativeMenuBar() + virtual void setNativeMenuBar(bool) = 0; + + virtual bool isNativeMenuBar() const = 0; + + /** + * Return true if the native menubar is capable of listening to the + * shortcut keys. If false is returned, QMenuBar will trigger actions on + * shortcut itself. + */ + virtual bool shortcutsHandledByNativeMenuBar() const = 0; + + virtual bool menuBarEventFilter(QObject *, QEvent *event) = 0; +}; + +QT_END_NAMESPACE + +#endif // QT_NO_MENUBAR + +#endif // QABSTRACTMENUBARINTERFACE_P_H diff --git a/src/gui/widgets/qmenubar_p.h b/src/gui/widgets/qmenubar_p.h index b49e03931d..427cd30908 100644 --- a/src/gui/widgets/qmenubar_p.h +++ b/src/gui/widgets/qmenubar_p.h @@ -61,7 +61,7 @@ #include "qguifunctions_wince.h" #endif -#include "qabstractmenubarimpl_p.h" +#include "qabstractmenubarinterface_p.h" #ifndef QT_NO_MENUBAR #ifdef Q_WS_S60 @@ -160,7 +160,7 @@ public: #ifdef QT3_SUPPORT bool doAutoResize; #endif - QAbstractMenuBarImpl *impl; + QAbstractMenuBarInterface *impl; #ifdef QT_SOFTKEYS_ENABLED QAction *menuBarAction; #endif diff --git a/src/gui/widgets/qmenubarimpl.cpp b/src/gui/widgets/qmenubarimpl.cpp index 1ca2e11966..4f2ad72474 100644 --- a/src/gui/widgets/qmenubarimpl.cpp +++ b/src/gui/widgets/qmenubarimpl.cpp @@ -239,7 +239,7 @@ bool QMenuBarImpl::menuBarEventFilter(QObject *, QEvent *) struct QMenuBarImplFactory : public QMenuBarImplFactoryInterface { - QAbstractMenuBarImpl* createImpl() { return new QMenuBarImpl; } + QAbstractMenuBarInterface* createImpl() { return new QMenuBarImpl; } virtual QStringList keys() const { return QStringList(); } }; diff --git a/src/gui/widgets/qmenubarimpl_p.h b/src/gui/widgets/qmenubarimpl_p.h index e7a3bdeae7..08ac6a0c00 100644 --- a/src/gui/widgets/qmenubarimpl_p.h +++ b/src/gui/widgets/qmenubarimpl_p.h @@ -43,13 +43,13 @@ #ifndef QT_NO_MENUBAR -#include "qabstractmenubarimpl_p.h" +#include "qabstractmenubarinterface_p.h" QT_BEGIN_NAMESPACE class QMenuBar; -class QMenuBarImpl : public QAbstractMenuBarImpl +class QMenuBarImpl : public QAbstractMenuBarInterface { public: ~QMenuBarImpl(); diff --git a/src/gui/widgets/widgets.pri b/src/gui/widgets/widgets.pri index f39b941f86..97d23f7f00 100644 --- a/src/gui/widgets/widgets.pri +++ b/src/gui/widgets/widgets.pri @@ -4,7 +4,7 @@ HEADERS += \ widgets/qbuttongroup.h \ widgets/qabstractbutton.h \ widgets/qabstractbutton_p.h \ - widgets/qabstractmenubarimpl_p.h \ + widgets/qabstractmenubarinterface_p.h \ widgets/qabstractslider.h \ widgets/qabstractslider_p.h \ widgets/qabstractspinbox.h \ -- cgit v1.2.3