diff options
Diffstat (limited to 'src/designer/src/lib/shared/newactiondialog_p.h')
-rw-r--r-- | src/designer/src/lib/shared/newactiondialog_p.h | 49 |
1 files changed, 16 insertions, 33 deletions
diff --git a/src/designer/src/lib/shared/newactiondialog_p.h b/src/designer/src/lib/shared/newactiondialog_p.h index f6e3b1dd7..de42d16f0 100644 --- a/src/designer/src/lib/shared/newactiondialog_p.h +++ b/src/designer/src/lib/shared/newactiondialog_p.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Designer of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** 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-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 #ifndef NEWACTIONDIALOG_P_H #define NEWACTIONDIALOG_P_H @@ -44,6 +19,7 @@ #include <QtWidgets/qdialog.h> #include <QtGui/qkeysequence.h> +#include <QtCore/qcompare.h> QT_BEGIN_NAMESPACE @@ -59,7 +35,8 @@ struct ActionData { enum ChangeMask { TextChanged = 0x1, NameChanged = 0x2, ToolTipChanged = 0x4, - IconChanged = 0x8, CheckableChanged = 0x10, KeysequenceChanged = 0x20 + IconChanged = 0x8, CheckableChanged = 0x10, KeysequenceChanged = 0x20, + MenuRoleChanged = 0x40 }; // Returns a combination of ChangeMask flags @@ -71,10 +48,14 @@ struct ActionData { PropertySheetIconValue icon; bool checkable{false}; PropertySheetKeySequenceValue keysequence; -}; + PropertySheetFlagValue menuRole; -inline bool operator==(const ActionData &a1, const ActionData &a2) { return a1.compare(a2) == 0u; } -inline bool operator!=(const ActionData &a1, const ActionData &a2) { return a1.compare(a2) != 0u; } + friend bool comparesEqual(const ActionData &lhs, const ActionData &rhs) noexcept + { + return lhs.compare(rhs) == 0; + } + Q_DECLARE_EQUALITY_COMPARABLE(ActionData) +}; class NewActionDialog: public QDialog { @@ -95,10 +76,12 @@ public slots: void focusTooltip(); void focusShortcut(); void focusCheckable(); + void focusMenuRole(); private slots: - void on_editActionText_textEdited(const QString &text); - void on_editObjectName_textEdited(const QString &text); + void onEditActionTextTextEdited(const QString &text); + void onEditObjectNameTextEdited(const QString &text); + void slotEditToolTip(); void slotResetKeySequence(); |