diff options
Diffstat (limited to 'src/controls/qquickmenuitem_p.h')
-rw-r--r-- | src/controls/qquickmenuitem_p.h | 79 |
1 files changed, 41 insertions, 38 deletions
diff --git a/src/controls/qquickmenuitem_p.h b/src/controls/qquickmenuitem_p.h index 4c60a9b8..ae7ed0e6 100644 --- a/src/controls/qquickmenuitem_p.h +++ b/src/controls/qquickmenuitem_p.h @@ -1,34 +1,37 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Quick Controls module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL3$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** Foundation and appearing in the file LICENSE.LGPL3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl.html. +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or later as published by the Free -** Software Foundation and appearing in the file LICENSE.GPL included in -** the packaging of this file. Please review the following information to -** ensure the GNU General Public License version 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** @@ -49,12 +52,12 @@ QT_BEGIN_NAMESPACE class QUrl; class QPlatformMenuItem; class QQuickItem; -class QQuickAction; +class QQuickAction1; class QQuickExclusiveGroup1; class QQuickMenu1; -class QQuickMenuItemContainer; +class QQuickMenuItemContainer1; -class QQuickMenuItemType +class QQuickMenuItemType1 { Q_GADGET Q_ENUMS(MenuItemType) @@ -68,11 +71,11 @@ public: }; }; -class QQuickMenuBase: public QObject +class QQuickMenuBase1: public QObject { Q_OBJECT Q_PROPERTY(bool visible READ visible WRITE setVisible NOTIFY visibleChanged) - Q_PROPERTY(QQuickMenuItemType::MenuItemType type READ type CONSTANT) + Q_PROPERTY(QQuickMenuItemType1::MenuItemType type READ type CONSTANT) Q_PROPERTY(QObject *__parentMenu READ parentMenuOrMenuBar CONSTANT) Q_PROPERTY(bool __isNative READ isNative CONSTANT) @@ -82,8 +85,8 @@ Q_SIGNALS: void visibleChanged(); public: - QQuickMenuBase(QObject *parent, int type); - ~QQuickMenuBase(); + QQuickMenuBase1(QObject *parent, int type); + ~QQuickMenuBase1(); bool visible() const { return m_visible; } virtual void setVisible(bool); @@ -92,8 +95,8 @@ public: QObject *parentMenuOrMenuBar() const; virtual void setParentMenu(QQuickMenu1 *parentMenu); - QQuickMenuItemContainer *container() const; - void setContainer(QQuickMenuItemContainer *); + QQuickMenuItemContainer1 *container() const; + void setContainer(QQuickMenuItemContainer1 *); inline QPlatformMenuItem *platformItem() { return m_platformItem; } void syncWithPlatformMenu(); @@ -101,26 +104,26 @@ public: QQuickItem *visualItem() const; void setVisualItem(QQuickItem *item); - QQuickMenuItemType::MenuItemType type() { return m_type; } + QQuickMenuItemType1::MenuItemType type() { return m_type; } virtual bool isNative() { return m_platformItem != 0; } private: bool m_visible; - QQuickMenuItemType::MenuItemType m_type; + QQuickMenuItemType1::MenuItemType m_type; QQuickMenu1 *m_parentMenu; - QQuickMenuItemContainer *m_container; + QQuickMenuItemContainer1 *m_container; QPlatformMenuItem *m_platformItem; QPointer<QQuickItem> m_visualItem; }; -class QQuickMenuSeparator : public QQuickMenuBase +class QQuickMenuSeparator1 : public QQuickMenuBase1 { Q_OBJECT public: - QQuickMenuSeparator(QObject *parent = 0); + QQuickMenuSeparator1(QObject *parent = 0); }; -class QQuickMenuText : public QQuickMenuBase +class QQuickMenuText1 : public QQuickMenuBase1 { Q_OBJECT Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged) @@ -138,8 +141,8 @@ Q_SIGNALS: void __iconChanged(); public: - QQuickMenuText(QObject *parent, QQuickMenuItemType::MenuItemType type); - ~QQuickMenuText(); + QQuickMenuText1(QObject *parent, QQuickMenuItemType1::MenuItemType type); + ~QQuickMenuText1(); bool enabled() const; virtual void setEnabled(bool enabled); @@ -156,7 +159,7 @@ public: protected: virtual QIcon icon() const; - virtual QQuickAction *action() const { return m_action; } + virtual QQuickAction1 *action() const { return m_action; } protected Q_SLOTS: virtual void updateText(); @@ -164,10 +167,10 @@ protected Q_SLOTS: void updateIcon(); private: - QQuickAction *m_action; + QQuickAction1 *m_action; }; -class QQuickMenuItem1 : public QQuickMenuText +class QQuickMenuItem1 : public QQuickMenuText1 { Q_OBJECT Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged) @@ -175,7 +178,7 @@ class QQuickMenuItem1 : public QQuickMenuText Q_PROPERTY(bool checked READ checked WRITE setChecked NOTIFY toggled) Q_PROPERTY(QQuickExclusiveGroup1 *exclusiveGroup READ exclusiveGroup WRITE setExclusiveGroup NOTIFY exclusiveGroupChanged) Q_PROPERTY(QVariant shortcut READ shortcut WRITE setShortcut NOTIFY shortcutChanged) - Q_PROPERTY(QQuickAction *action READ boundAction WRITE setBoundAction NOTIFY actionChanged) + Q_PROPERTY(QQuickAction1 *action READ boundAction WRITE setBoundAction NOTIFY actionChanged) public Q_SLOTS: void trigger(); @@ -201,8 +204,8 @@ public: QUrl iconSource() const; QString iconName() const; - QQuickAction *boundAction() { return m_boundAction; } - void setBoundAction(QQuickAction *a); + QQuickAction1 *boundAction() { return m_boundAction; } + void setBoundAction(QQuickAction1 *a); QVariant shortcut() const; void setShortcut(const QVariant &shortcut); @@ -222,15 +225,15 @@ protected Q_SLOTS: void updateShortcut(); void updateCheckable(); void updateChecked(); - void bindToAction(QQuickAction *action); + void bindToAction(QQuickAction1 *action); void unbindFromAction(QObject *action); protected: QIcon icon() const; - QQuickAction *action() const; + QQuickAction1 *action() const; private: - QQuickAction *m_boundAction; + QQuickAction1 *m_boundAction; }; QT_END_NAMESPACE |