summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/dbusmenu/qdbusplatformmenu_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/platformsupport/dbusmenu/qdbusplatformmenu_p.h')
-rw-r--r--src/platformsupport/dbusmenu/qdbusplatformmenu_p.h51
1 files changed, 29 insertions, 22 deletions
diff --git a/src/platformsupport/dbusmenu/qdbusplatformmenu_p.h b/src/platformsupport/dbusmenu/qdbusplatformmenu_p.h
index 6d2d27463f..f641ff5d8e 100644
--- a/src/platformsupport/dbusmenu/qdbusplatformmenu_p.h
+++ b/src/platformsupport/dbusmenu/qdbusplatformmenu_p.h
@@ -1,31 +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 QtGui module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 3 as published by the Free Software
+** 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-3.0.html.
**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** 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$
**
@@ -91,6 +97,8 @@ public:
void setCheckable(bool checkable) Q_DECL_OVERRIDE;
bool isChecked() const { return m_isChecked; }
void setChecked(bool isChecked) Q_DECL_OVERRIDE;
+ bool hasExclusiveGroup() const { return m_hasExclusiveGroup; }
+ void setHasExclusiveGroup(bool hasExclusiveGroup) Q_DECL_OVERRIDE;
QKeySequence shortcut() const { return m_shortcut; }
void setShortcut(const QKeySequence& shortcut) Q_DECL_OVERRIDE;
void setIconSize(int size) Q_DECL_OVERRIDE { Q_UNUSED(size); }
@@ -117,7 +125,8 @@ private:
bool m_isCheckable : 1;
bool m_isChecked : 1;
int m_dbusID : 16;
- int m_reserved : 7;
+ bool m_hasExclusiveGroup : 1;
+ int m_reserved : 6;
QKeySequence m_shortcut;
};
@@ -130,6 +139,7 @@ public:
~QDBusPlatformMenu();
void insertMenuItem(QPlatformMenuItem *menuItem, QPlatformMenuItem *before) Q_DECL_OVERRIDE;
void removeMenuItem(QPlatformMenuItem *menuItem) Q_DECL_OVERRIDE;
+ void syncSubMenu(const QDBusPlatformMenu *menu);
void syncMenuItem(QPlatformMenuItem *menuItem) Q_DECL_OVERRIDE;
void syncSeparatorsCollapsible(bool enable) Q_DECL_OVERRIDE { Q_UNUSED(enable); }
@@ -138,14 +148,16 @@ public:
const QString text() const { return m_text; }
void setText(const QString &text) Q_DECL_OVERRIDE;
+ QIcon icon() const { return m_icon; }
void setIcon(const QIcon &icon) Q_DECL_OVERRIDE;
+ bool isEnabled() const Q_DECL_OVERRIDE { return m_isEnabled; }
void setEnabled(bool enabled) Q_DECL_OVERRIDE;
+ bool isVisible() const { return m_isVisible; }
void setVisible(bool visible) Q_DECL_OVERRIDE;
void setMinimumWidth(int width) Q_DECL_OVERRIDE { Q_UNUSED(width); }
void setFont(const QFont &font) Q_DECL_OVERRIDE { Q_UNUSED(font); }
void setMenuType(MenuType type) Q_DECL_OVERRIDE { Q_UNUSED(type); }
-
- int dbusID() const { return m_dbusID; }
+ void setContainingMenuItem(QDBusPlatformMenuItem *item);
void showPopup(const QWindow *parentWindow, const QRect &targetRect, const QPlatformMenuItem *item) Q_DECL_OVERRIDE
{
@@ -166,9 +178,6 @@ public:
bool operator==(const QDBusPlatformMenu& other) { return m_tag == other.m_tag; }
- static QDBusPlatformMenu* byId(int id);
- static QList<QDBusPlatformMenu *> topLevelMenus() { return m_topLevelMenus; }
-
uint revision() const { return m_revision; }
void emitUpdated();
@@ -184,12 +193,10 @@ private:
bool m_isEnabled;
bool m_isVisible;
bool m_isSeparator;
- int m_dbusID;
uint m_revision;
QHash<quintptr, QDBusPlatformMenuItem *> m_itemsByTag;
QList<QDBusPlatformMenuItem *> m_items;
QDBusPlatformMenuItem *m_containingMenuItem;
- static QList<QDBusPlatformMenu *> m_topLevelMenus;
};
QT_END_NAMESPACE